Skip to content

fix: testpypi-smoke app must not inherit the script's argv#794

Merged
derks merged 2 commits into
mainfrom
fix/testpypi-smoke-argv
Jul 12, 2026
Merged

fix: testpypi-smoke app must not inherit the script's argv#794
derks merged 2 commits into
mainfrom
fix/testpypi-smoke-argv

Conversation

@derks

@derks derks commented Jul 12, 2026

Copy link
Copy Markdown
Member

Summary

Dry-run 29210928341 made it further than ever — preflight ✓, full gates ✓, isolated build ✓, and the first successful OIDC TestPyPI publish (fresh wheel+sdist with attestations) — then failed in testpypi-smoke:

smoke: error: unrecognized arguments: 3.0.15

App.run() parses sys.argv[1:] by default, so the smoke app's argparse saw (and correctly rejected) the version argument passed to the wrapper script itself. One-line fix: Meta.argv = [] on the smoke app.

Verified end-to-end locally: a fresh venv running the fixed script against real TestPyPI installs the exact cement-3.0.15 bytes published by that run and passes the import/round-trip/version assertions:

TestPyPI smoke OK: cement 3.0.15 on Python 3.14.3

Test plan

  • Merge, re-dispatch: gh workflow run release.yml -R datafolklabs/cement → green through dry-run-summary

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved TestPyPI smoke testing by preventing unrelated command-line arguments from being passed to the application.
    • Existing installation, import, and version validation behavior remains unchanged.

Dry-run 29210928341 got through preflight, gates, build, and the
first real OIDC TestPyPI publish, then failed in testpypi-smoke:
App.run() parses sys.argv[1:] by default, so the SmokeApp's argparse
rejected the version argument passed to the wrapper script itself
('smoke: error: unrecognized arguments: 3.0.15'). Set Meta.argv = []
on the smoke app.

Reproduced and verified end-to-end locally: a fresh venv running the
fixed script against real TestPyPI installs the exact cement-3.0.15
bytes published by that run and passes the round-trip.

Co-Authored-By: Claude Fable 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fc2fbfcd-a190-44ca-8c8f-0524ac725034

📥 Commits

Reviewing files that changed from the base of the PR and between 8f3e912 and 18a09b3.

📒 Files selected for processing (1)
  • scripts/testpypi-smoke.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/testpypi-smoke.py

📝 Walkthrough

Walkthrough

The TestPyPI smoke script configures SmokeApp to pass an empty argument list to its wrapped application, preventing unrelated smoke-script arguments from reaching application parsing.

Changes

TestPyPI smoke flow

Layer / File(s) Summary
Isolate SmokeApp arguments
scripts/testpypi-smoke.py
The inner Meta configuration imports ClassVar and sets argv to an empty list so App.run() does not inherit the smoke script’s command-line arguments.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main fix: preventing the testpypi-smoke app from inheriting wrapper-script argv.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/testpypi-smoke-argv

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/testpypi-smoke.py`:
- Around line 91-95: Update the class-level argv configuration in SmokeApp.Meta
by importing ClassVar from typing and annotating argv as ClassVar[list[str]]
while preserving its empty-list default and behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a3897075-a7fc-4246-b5e7-9a7ee7049438

📥 Commits

Reviewing files that changed from the base of the PR and between 64aefac and 8f3e912.

📒 Files selected for processing (1)
  • scripts/testpypi-smoke.py

Comment thread scripts/testpypi-smoke.py Outdated
@derks
derks merged commit fabaec1 into main Jul 12, 2026
14 checks passed
@derks
derks deleted the fix/testpypi-smoke-argv branch July 12, 2026 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant