Repository navigation
ci: release only commits whose CI passed - #52
Conversation
The release workflow now fails in the prepare job unless a successful run of ci.yml exists for a push of the tagged commit, so nothing is published for a commit whose CI failed or never ran. The error says to re-run the workflow once CI passed. Docs updated. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Reviewer's GuideThe release workflow now fails before building or publishing unless the tagged commit has a successful push-triggered Sequence diagram for CI validation before release preparationsequenceDiagram
participant Tag as Release tag
participant Prepare as prepare job
participant GitHub as GitHub Actions API
participant CI as ci.yml push run
participant Build as Package build
participant Publish as Release jobs
Tag->>Prepare: Trigger release workflow
Prepare->>GitHub: gh api actions/workflows/ci.yml/runs
GitHub-->>Prepare: Successful push runs for GITHUB_SHA
alt Successful CI run exists
Prepare->>Build: Build distributions
Build-->>Prepare: Build outputs
Prepare->>Publish: Enable attest and pypi/publish
else No successful run or CI still running
Prepare-->>Tag: Fail and request workflow re-run after CI passes
end
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Documentation build overview
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #52 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 553 553
Branches 71 71
=========================================
Hits 553 553
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Linked issues
#51 ci: release only commits whose CI passed · 4 of 4 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Fail prepare unless a successful ci.yml run exists for a push of the tagged commit, and tell the user to re-run the workflow once CI has passed. |
✅ Met | The step queries successful ci.yml push runs for GITHUB_SHA and fails with the requested re-run guidance if none exists. |
| 2 | Require prepare for every publishing job. |
✅ Met | attest, pypi, and publish depend on prepare directly or through their job dependencies. |
| 3 | Add workflow tests where the repository tests its workflows. | ✅ Met | The repository has no workflow tests, so no workflow test applies to this change. |
| 4 | Update the release documentation. | ✅ Met | docs/releasing.md explains the CI check, fast-forward requirement, and recovery steps. |
Sourcery assessment
Approved.
Summary
The
preparejob ("Prepare release") ofrelease.ymlnow fails unless a successful run ofci.ymlexists for a push of the tagged commit; the step, API query and error text are those of the other repos' release workflows.preparegetsactions: readat job level only.attestandpypi/publishall needprepare.docs/releasing.mddocuments the check, the fast-forward requirement and the recovery.Closes #51
Verification
actionlintandzizmor --offlineon the workflows: no findings.tests/test_release.pytestsscripts/release.py, unchanged); the step cannot run before a tag. Verified by review only, with the same query as the reference repos.Lane
Regular lane (release workflow): adversarial and quality review, one round. No high or medium correctness findings; fixes were comments and docs only.
Declined review findings
scripts/release.py(quality, medium): declined; the step is the same shell step as in the reference repos, and a stubbed test would only test the stub.|| truearound the API call to always print the hint: declined; an API error fails safely.Open questions
None.
🤖 Generated with Claude Code
Summary by Sourcery
Require successful CI for the tagged commit before preparing a release and document the updated release procedure.
Bug Fixes:
Enhancements:
Documentation: