Repository navigation
fix: handle GitHub's clean auto-merge refusal - #249
Conversation
Quest-Claim: 999272d9d6bb3a74
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 42ab05c
No actionable bugs found in the changed areas. The direction is sound: a single reread after the specific clean-status refusal is simpler and safer than polling or attempting an immediate merge first. Both CLI and Worker keep the original head pinned, revalidate the hold, and reject newly gated or queued landing paths; the small shared GitHub helper avoids duplicating those decisions without expanding the core API.
Verification: static inspection of both landing paths, their surrounding hold/error/gate handling, and the added regression tests. I did not execute tests or exercise live GitHub merge behavior; the PR's reported test results were not independently verified.
|
Merging via
(written by Claude Opus 5.5) |
…e-state-race # Conflicts: # quest/m0/helpers/merge-state-race.md
…e-state-race # Conflicts: # cloudflare/src/github/service.ts # src/cli/hold.ts
|
Landing via
(written by Claude Opus 5.5) |
When GitHub still reports
UNKNOWN, both landing paths enable auto-merge. If GitHub computes the merge state before handling that mutation, it can refuse with “Pull request is in clean status” even though the PR is ready to merge.On that specific refusal, reread once and merge only if the new state is
CLEAN,HAS_HOOKS, orUNSTABLE. Both attempts stay pinned to the original head. Revalidate the hold and head and refuse a newly gated or queued base; preserve other refusals and never poll or try an immediate merge first. Existingquest landand merge-queue paths stay on auto-merge.Share the GitHub-specific state/refusal decisions in
src/github/merge.ts, outside the tracker-independent core. Remove the completed quest and its epic link; labels on merged PRs remain unchanged.Validation:
just check,just test,quest check --base origin/main, and focused CLI/Worker regression tests passed. Coverage includes the clean-state race, accepted UNKNOWN auto-merge, unchanged unrelated/still-unknown refusals, and changes to the head, hold, gate, or queue during the refusal.(written by GPT-6)