fix(shipping-pr): wait for missing required checks - #39
Conversation
📝 WalkthroughWalkthroughThe shipping PR workflow now discovers effective required checks from repository rules, tracks the PR base branch, represents missing checks as pending, and excludes reviewer telemetry from completion gates and fingerprints. Tests cover optional checks, delayed registration, blocked merge state, malformed responses, and fingerprint stability. ChangesShipping PR gating
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant ShippingPR as skill-set-pr
participant GitHubAPI
participant SnapshotState
ShippingPR->>GitHubAPI: Query PR baseRefName and merge fields
ShippingPR->>GitHubAPI: Query branch rules and legacy protection
GitHubAPI-->>ShippingPR: Return configured required contexts
ShippingPR->>GitHubAPI: Query check runs
GitHubAPI-->>ShippingPR: Return observed check results
ShippingPR->>SnapshotState: Store required, observed, and missing contexts
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
plugins/skill-set/skills/shipping-pr/scripts/skill-set-pr (1)
1218-1244: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winReset deadlines when the base branch changes during a snapshot.
Line 1218 resets deadlines for a changed HEAD binding, but it does not compare
$start_base_branchand$end_base_branch. Line 1243 discards the snapshot for that base-branch change, but the state retains the check deadline and registration grace from the previous base branch. A retargeted PR can time out before checks required by its new base branch register.Include the start/end base-branch comparison in the deadline-reset condition.
Proposed fix
- $start_head_branch != "$end_head_branch" || $start_host != "$end_host" ]]; then + $start_head_branch != "$end_head_branch" || \ + $start_base_branch != "$end_base_branch" || $start_host != "$end_host" ]]; then🤖 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 `@plugins/skill-set/skills/shipping-pr/scripts/skill-set-pr` around lines 1218 - 1244, Update the deadline-reset condition in the snapshot state logic to also detect changes between start_base_branch and end_base_branch. When that base-branch comparison changes, reset head_changed-related deadlines, checks_observed, and resolver_attempt alongside the existing HEAD binding changes.
🤖 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.
Outside diff comments:
In `@plugins/skill-set/skills/shipping-pr/scripts/skill-set-pr`:
- Around line 1218-1244: Update the deadline-reset condition in the snapshot
state logic to also detect changes between start_base_branch and
end_base_branch. When that base-branch comparison changes, reset
head_changed-related deadlines, checks_observed, and resolver_attempt alongside
the existing HEAD binding changes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1347bdd5-fa5d-47bd-9b55-da6126f2db7c
📒 Files selected for processing (7)
plugins/skill-set/commands/pr/ship.mdplugins/skill-set/evals/shipping-pr/state-machine-happy-path/fixtures/mock-ghplugins/skill-set/skills/shipping-pr/SKILL.mdplugins/skill-set/skills/shipping-pr/reference/polling.mdplugins/skill-set/skills/shipping-pr/scripts/skill-set-prplugins/skill-set/tests/fixtures/mock-gh-prplugins/skill-set/tests/test-pr-runner.sh
Summary
Testing
bash plugins/skill-set/tests/test-pr-runner.shbash plugins/skill-set/tests/test-shipping-pr-happy-path-eval.shbash plugins/skill-set/tests/test-skill-contracts.shbash plugins/skill-set/tests/test-references.shbash plugins/skill-set/tests/test-portable-runner-layout.shbash plugins/skill-set/tests/test-packaging.shbash plugins/skill-set/tests/test-host-neutral-skill-runtime.shpython3 /Users/ether/.codex/skills/.system/skill-creator/scripts/quick_validate.py plugins/skill-set/skills/shipping-prgit diff --checkSummary by CodeRabbit
New Features
--required-only false.Behavior Changes
--review-timeoutis deprecated and no longer affects completion.