Repository navigation
fix(land): one PR's collection failure can't stall its fixer job - #432
Merged
Merged
Conversation
Quest-Claim: 64c142d7c3942103
A GitHub error collecting a gate fixer job is recorded on the PR it hit, not job-wide, so the job's other PRs keep their own results. A PR whose collection fails three passes in a row is set aside: it leaves the job, so the PRs behind it go on. The watcher sets aside a round that keeps failing the same way, freeing its fixer slot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
November 3, 2026 03:53
|
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 8 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. CodeRabbit Verify
|
# Conflicts: # test/land-watch.test.ts
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.
Implements quest/m1/fixer-isolate-failure.md and deletes it.
Problem
From moq-dev/moq.pro's land gate on 2026-11-02: when collecting a gate fixer job threw for one PR,
collectFixerswrote the error to the job-widejob.error. It retried right away and then every minute. The PRs behind the failing one never moved, and once the stuck PR cleared, the job-wide error would have handed all of them back with that one PR's reason. moq-dev/quest#392 removed the cause seen that day (a merged PR), but any other persistent GitHub error on one PR could still wedge its job.Change
collectFixers(src/cli/land-fixer.ts): a collection error is recorded injob.handbacks[<pr>]for the PR being collected, which isjob.numbers[0]. Only that PR is handed back with it, and the job's other PRs keep their own results.job.erroris used only when no PR is left. A reason already recorded, such as a crash'sjob.erroror an earlier handback for that PR, still wins. This reuses the tested approach from the closed moq-dev/quest#393.failures[<pr>], the number of passes that failed to collect each PR. A pass counts once, however many retries it made. AfterCOLLECTION_ATTEMPTS(3) failed passes, the PR is set aside: it is shifted offjob.numbers,set aside <pr>is logged with the error, and collection goes on with the PRs behind it in the same pass. The base check runs only on a pass's first try, as before.collectAll(src/cli/land-watch-fix.ts): a watcher job holds one PR, so its error was already per-PR and did not block other jobs' collection. However, a job that kept failing to collect still counted against--fixer-jobs. With one slot, that blocked every other dropped PR from getting a fixer. The watcher now applies the same bound. After 3 failed passes (counted only by the pass's full collection), the job is finished withset aside <pr>and a warning, which frees its slot.Choices made without asking
Validation
test/land.test.tshands back only the PR whose collection GitHub failed, and keeps the rest of its job's results, from fix(land): the fixer drops a PR merged or closed while parked instead of looping on it #393: one failed read of PR 1 now gives["handback 1", "requeued 2"]. On main, PR 2 would be handed back with PR 1's error.sets aside a PR whose collection keeps failing, so the rest of its job goes on: every read of PR 1 fails. Passes 1 and 2 return[]with both PRs still parked. Pass 3 returns["set aside 1", "requeued 2"]. The job is gone, nothing is parked, PR 1 keeps its auto-merge and gets no comment, and PR 2 is requeued at its pin.test/land-watch.test.ts:a round whose handback GitHub keeps refusing is set aside, and frees its fixer slot. With one slot, every comment on PR 5 is refused. PR 6 waits for two passes, then gets["set aside 5", "fixing 6"]and is requeued after its fixer runs.just checkandjust testpass locally on head02789844(CLI: 993 passed, 2 skipped; Worker: 490 passed).Review
Codex
gpt-6.1-solat medium effort (quest review --base origin/main --branch quest/m1/fixer-isolate-failure), round 2 of the session that reviewed3ce01704, reviewed head02789844188d83e012c8c94494d3ef6c127f4149againstorigin/mainf1cfe6c8: no findings.That head merges
origin/mainat574cf6e7(moq-dev/quest#421, moq-dev/quest#433, and others) into the earlier head5c34b010. One conflict was resolved by hand inquest/m1/README.md'sRequiredlist: this PR drops the link to its own quest, and main dropped the link to/quest/m1/wait-merge-heads.md, so both lines go. Main changed none of the PR's code files, and the PR's changed lines are unchanged. The diff against the base differs from5c34b010's only in hunk offsets and context inREADME.mdandquest/m1/README.md. A hand-resolved merge is outside the guide's exemptions, so the head was reviewed again.Follow-ups
land-watch-fix.ts) may conflict incollectFixers/collectAll. Resolve those conflicts by merging, not rebasing.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)