fix(release): separate stable artifact identity - #267
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe stable release workflow adds read-only PREFLIGHT mode and separate artifact SHA input. The finalizer supports historical replay by validating existing tags, GitHub Releases, and npm latest states against the artifact SHA. Tests cover workflow wiring, SHA validation, authorization, and mutation isolation. ChangesStable release verification
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: 🔵 Low · up to The new preflight mode avoids release mutations by behavior, but it still runs with permissions capable of modifying repository state or obtaining federated credentials. The PR is mergeable with explicit owner awareness and follow-up to isolate preflight with read-only permissions and non-persistent checkout credentials. Sequence Diagram(s)sequenceDiagram
participant ReleaseWorkflow
participant Finalizer
participant GitHub
participant NpmRegistry
ReleaseWorkflow->>Finalizer: invoke PREFLIGHT with expectedSha and artifactSha
Finalizer->>GitHub: verify exact tags and Releases
Finalizer->>NpmRegistry: verify latest package state
Finalizer-->>ReleaseWorkflow: return JSON verification result
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 3 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
Refs #265
Type
Summary
preflight_onlyworkflow mode that exercises live Git/GitHub/npm reads without mutation.Evidence
Run
33290154328correctly stopped before mutation because existing stable tags peel to publication SHAf531cd1892b6e194a44637447f9f7b35426abfc1, while current master authorization usesef35bd4119dc5dfb741e4a0581f03821ca4b088f.Changes
.github/workflows/release-stable.ymlartifact_sha.scripts/release-finalize-stable.mjsscripts/release-finalize-stable.test.mjsscripts/release-policy-contract.test.mjsTest plan
pnpm format:checkpnpm nx affected --target=lint --base=origin/mastergit diff --checkContributor checklist
type:*labelCo-Authored-BytrailersSummary by CodeRabbit
New Features
Bug Fixes
Tests