fix(notify): allow staged rollout verification#122
Conversation
Grant the owner-gated helper rollout job the contents permission GitHub requires to resolve and download draft release assets before finalization. Keep the job read-only by policy, require the exact release to remain a draft, and surface draft-resolution failures explicitly.
📝 WalkthroughWalkthroughThe publish-safety policy now recognizes ChangesRollout safety enforcement
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 7✅ Passed checks (7 passed)
✨ Finishing Touches🧪 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 |
Accept both validated draft and published release states during read-only rollout verification so a failed post-finalization verification can resume without mutating existing assets. Keep invalid or missing release states fail-closed.
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/docker.yml (1)
1203-1206: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider using
jq -erto activate this error handling.Because the
// emptyfilter preventsjqfrom outputtingnull,jq -rwill exit with a0status code even ifdatabaseIdis absent. Since the input$lookupwas already verified as valid JSON on line 1199, this command will practically never fail, making the fallback block dead code.A missing ID falls through and is safely caught by the regex check on line 1207. If you want this specific parsing error message to be emitted when the ID is absent, add the
-eflag to makejqexit1on an empty stream.♻️ Proposed refactor
- release_id=$(jq -r '.data.repository.release.databaseId // empty' <<<"$lookup") || { + release_id=$(jq -er '.data.repository.release.databaseId // empty' <<<"$lookup") || { echo "::error::Draft release database ID could not be parsed." >&2 return 1 }🤖 Prompt for 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. In @.github/workflows/docker.yml around lines 1203 - 1206, Update the jq invocation assigning release_id in the release lookup flow to use the exit-status behavior that treats an empty result as failure, while preserving the existing .data.repository.release.databaseId filter and error handler so missing IDs emit the intended parse error.
🤖 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.
Nitpick comments:
In @.github/workflows/docker.yml:
- Around line 1203-1206: Update the jq invocation assigning release_id in the
release lookup flow to use the exit-status behavior that treats an empty result
as failure, while preserving the existing .data.repository.release.databaseId
filter and error handler so missing IDs emit the intended parse error.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 5bc8b46e-9abc-41a6-888b-613b277139f7
📒 Files selected for processing (2)
.github/scripts/notify-publish-safety.rb.github/workflows/docker.yml
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
.github/workflows/**/*.yml
⚙️ CodeRabbit configuration file
.github/workflows/**/*.yml: Review CI for correct Go test tags, Xcode/iOS simulator assumptions, secret scoping,
dependency integrity, permissions, Docker publishing safety, and unnecessary privilege escalation.
Files:
.github/workflows/docker.yml
🔇 Additional comments (2)
.github/scripts/notify-publish-safety.rb (1)
16-16: LGTM!Also applies to: 203-203, 221-224, 573-587
.github/workflows/docker.yml (1)
1163-1166: LGTM!
Make jq return a failing status when the draft/public release lookup yields no database ID, so the explicit parse diagnostic is reachable. Require this exit-status behavior in the publish-safety policy.
Summary
Root cause
Security and release truth
Verification