[codex] ci(release): target PyPI artifact downloads - #93
Conversation
Signed-off-by: Nelson Spence <nelson@projectnavi.ai>
There was a problem hiding this comment.
Code Review
This pull request updates the release-publish SBOM invariants script to enforce targeted artifact downloads (for wheels and source distributions) instead of downloading all artifacts and then deleting the SBOM. It also introduces an awk-based check to guard against broad artifact downloads into the dist/ directory. The review feedback suggests making the regular expressions and the awk parser more robust by anchoring patterns to the start of the line to avoid matching commented-out lines, and by supporting optional single or double quotes around YAML values.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Review Summary by QodoTarget PyPI artifact downloads to exclude SBOM and provenance
WalkthroughsDescription• Replace broad artifact downloads with targeted wheels and sdist downloads • Eliminate need for post-download cleanup by using download-artifact selectors • Simplify release publish invariant script to verify targeted downloads • Remove SBOM/provenance/Sigstore artifacts from PyPI upload directory Diagramflowchart LR
A["Broad artifact download<br/>+ cleanup step"] -->|Refactor| B["Targeted downloads<br/>wheels-* + sdist"]
B -->|Result| C["Clean dist/<br/>PyPI ready"]
D["Complex invariant<br/>script logic"] -->|Simplify| E["Targeted download<br/>verification"]
File Changes1. tests/release_publish_invariants.sh
|
Code Review by Qodo
1.
|
There was a problem hiding this comment.
Pull request overview
Updates the unified release.yml publish flow so the PyPI upload directory (dist/) only receives Python distribution artifacts (wheels + sdist), structurally preventing SBOM/provenance assets from breaking twine uploads and allowing the prior cleanup step to be removed.
Changes:
- Switch PyPI publish to targeted
actions/download-artifactdownloads:pattern: wheels-*andname: sdistintodist/. - Remove the “keep-only wheels/sdist”
find ... -deletecleanup step from the PyPI publish job. - Simplify
tests/release_publish_invariants.shto assert the targeted-download shape and retain the SBOM.gitignoreguard.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
tests/release_publish_invariants.sh |
Simplifies the release-publish invariant checks to focus on SBOM gitignore + targeted artifact downloads into dist/. |
.github/workflows/release.yml |
Updates the publish-pypi job to download only wheel and sdist artifacts into dist/ before trusted publishing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Nelson Spence <nelson@projectnavi.ai>
Signed-off-by: Nelson Spence <nelson@projectnavi.ai>
Summary
wheels-*artifacts and thesdistartifact into the PyPI uploaddist/directoryCloses #53.
Issue #29 is already obsolete on
main: the unifiedrelease.ymlhas no macOS x86_64 wheel leg, and Intel macOS users install from the sdist.Validation
bash tests/release_publish_invariants.shbash tests/release_signed_release_invariants.shactionlintv1.7.12zizmor --offline --persona=regular .github/workflows/