test(release): make workflow contract role-aware - #396
Conversation
|
Droid encountered an error —— View job Droid is reviewing code and running a security check… |
|
Warning Review limit reached
Next review available in: 53 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Summary by CodeRabbit
WalkthroughThe release candidate smoke test now reads the repository role from policy and validates role-specific release workflow controls. It checks staged candidate metadata, all four targets, immutable artifact downloads, and publication permissions. ChangesRelease candidate workflow validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@apps/shiplog/tests/release_candidate_smoke.rs`:
- Around line 514-550: The repository-role validation in
release_workflow_binds_tag_push_identity_and_staged_contract currently branches
imperatively over swarm, source, and unsupported roles. Replace these checks
with three separate shiplog_testkit::bdd::Scenario::new(...).expect(...)
scenarios, each using the appropriate policy/workflow fixture and preserving the
existing assertions for its role, including rejection of unsupported roles.
- Around line 485-502: Strengthen the workflow assertions in the release smoke
test around the existing candidate-control checks and release-writer validation:
parse or otherwise inspect individual jobs so the release-writing job itself
requires release-candidate-ready, grants contents: write, uses
softprops/action-gh-release, and reads candidate/RELEASE_CANDIDATE.txt,
candidate/SHA256SUMS.txt, and checksum_manifest_sha256 from the staged candidate
artifact. Add negative fixtures covering split jobs and a writer without the
gate, asserting those workflows fail rather than relying on file-wide string
matches.
🪄 Autofix
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: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 8dfa213c-66b3-43b8-897e-9d7dd7b5054b
📒 Files selected for processing (1)
apps/shiplog/tests/release_candidate_smoke.rs
|
Droid encountered an error —— View job Droid is reviewing code and running a security check… |
What this does
The release workflow contract test previously required the swarm-only source handoff text in every repository. That made the promoted test reject the source-owned release writer even when the source workflow preserved the intended draft-release boundary.
Change:
release_candidate_smokereadspolicy/automation-authority.tomland applies the shared candidate identity checks plus the role-specific contract. Swarm requires handoff-only, read-only behavior. Source requiresRelease Candidate Readybefore the narrow draft writer, exact staged bytes, and explicit human publication authority. Existing candidate smoke behavior is unchanged.Verification
cargo clippy -p shiplog --all-targets --locked -- -D warningscargo fmt --all -- --check,git diff --checkcargo xtask ci-smallReview map
apps/shiplog/tests/release_candidate_smoke.rs: parses repository role, enforces common staged-candidate invariants, and separates swarm handoff assertions from source draft-writer assertions.