Repository navigation
fix(land): merge with workflow write when the prepared head brings a workflow change - #374
Merged
Merged
Conversation
…workflow change GitHub refuses an App's merge of a PR whose commits touch .github/workflows. The gate's own merge of a base that changed a workflow is such a commit, but the merge token asked for workflow write only when the squash itself changed one. #286 hit this, and the 403 failed the whole batch on every retry, stalling the queue. The merge token now also asks for workflow write when the prepared head changes a workflow since the pinned head. Any other 403 from the merge endpoint, except a rate limit, stops only that PR as merge_refused, so the rest of the queue keeps landing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…atus Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 40 minutes. View limit details
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. |
…ly the gate's merge Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
moq-dev/quest#286 stalled the moq-dev/quest gate on 2026-11-01.
PUT /pulls/286/mergereturned403 Resource not accessible by integration, and the daemon retried the whole batch every time, so nothing else landed. I took #286 out of the queue to unstick it.Cause. The gate merged main into #286's old head (efcaa14). That merge commit carries main's deletion of
.github/workflows/land.yml. GitHub refuses an App's merge of a PR whose commits touch workflows unless the token hasworkflows. The gate's push of efcaa14 already asked for workflow write, sincepush()diffs the pinned head against the prepared head. The merge token didn't:touchesWorkflowsonly looked at the squash's own diff.Changes.
touchesWorkflows(src/cli/land-serve.ts) also requests workflow write when any commit the PR brings changes.github/workflows(git log -m base..head). That covers the gate's own base merge and an author's earlier merge of main. Queued PRs such as feat(skills): plan reviews before ready; merge and review reuse a counted record #288, quest: plan submodule-aware link checks #278, skill: import comments when the planning merge starts #269 and Publish job branches on the upstream #246 contain such an author merge of theland.ymldeletion.mergePinnedallows a 403. A 403 that isn't a rate limit stops only that PR asmerge_refused, and the rest of the batch stays queued, as for other refusals. Before, it failed the whole batch on every retry.GitHub.request(src/cli/github.ts) waits out a rate limit even when the caller allows its status. A rate-limited 403 therefore never reachesmergePinnedas a refusal (found by the review).Tests.
base..headcheck.merge_refused, and the batch-mate stays queued. This test fails without the fix.Checks
just checkpasses.vitest runwithCLAUDE_CONFIG_DIRunset: 807 passed. The 6 failures are environment tests, the same ones that fail on main locally: gate admission, worktree disk, Ctrl-C, and the diff3 driver test. I confirmed the diff3 test fails on origin/main too.Review
Codex
gpt-6.1-sol, medium effort (quest review --base origin/main), session01a1994a-73c5-7562-bf66-bda6a7b55656.637a1e4: one finding. Allowing 403 skipped the client's rate-limit wait. Fixed in4d943a9: the client checks rate limits beforeallow.4d943a9408dc5ac69ac70a1de6a009f9ffd8fbdd: no findings.bbf8ce96946d1f3a99c6f4f90e97a6af5d667aa0: no findings. This round reviewed widening the check to every commit the PR brings.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)