Fix release publish recovery path#110
Conversation
Review Summary by QodoImprove release publish recovery with attested crate temp directory
WalkthroughsDescription• Keep attested .crate download outside checkout for clean cargo package re-run • Add skip-existing flag to PyPI publish for idempotent recovery reruns • Extend release publish invariants to validate crate recovery properties • Add new check_publish_crate validation function for crate job requirements Diagramflowchart LR
A["Attested .crate artifact"] -->|"Download to runner.temp"| B["Clean checkout for cargo package"]
B -->|"Re-package with --locked"| C["Byte-identity verification"]
C -->|"Pre-publish check"| D["Publish to crates.io"]
D -->|"Post-publish verification"| E["Download from crates.io"]
E -->|"Hash comparison"| F["Verify match"]
G["PyPI publish"] -->|"skip-existing: true"| H["Idempotent recovery reruns"]
I["Invariants validation"] -->|"check_publish_crate"| J["Validate crate job structure"]
I -->|"check_publish_pypi"| K["Validate PyPI job structure"]
File Changes1. tests/release_publish_invariants.py
|
There was a problem hiding this comment.
Code Review
This pull request updates tests/release_publish_invariants.py to enforce invariants for publishing crates and PyPI packages, including ensuring PyPI uploads set skip-existing: true and introducing a new check_publish_crate function to validate the publish-crate job. Feedback was provided to improve the verification step check in check_publish_crate by tracking unique step names to prevent false positives from duplicate steps.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Signed-off-by: Nelson Spence <nelson@projectnavi.ai>
f4d5c83 to
133c0de
Compare
Summary
.cratedownload outside the checkout so the crates.io publish job can re-runcargo package --lockedon a clean worktreeskip-existing: truewhile retaining the post-publish hash verification against PyPI-served filesValidation
bash tests/release_publish_invariants.shbash tests/release_signed_release_invariants.shpython3 -m py_compile tests/release_publish_invariants.pygit diff --check