Repository navigation
feat(land): quest land watch fixes each PR the merge queue drops and re-enqueues it - #389
Conversation
Quest-Claim: 900f75c9f244e541
…re-enqueues it With --fixer, the watcher takes each removal recorded for the fixer, oldest first. A conflict is first merged with the current base by the quest merge driver; otherwise the land fixer runs in the background on the failure (at most --fixer-jobs at once, with --fixer-effort as its reasoning effort). Each round is recorded in its pick's history and the stop rules decide whether it hands back; a fixed or merged head is validated, lease-pushed, and recorded in Review, and every head that goes back is re-enqueued at the back of the queue, or armed with auto-merge while its checks run. App enqueues count as picks, as Dependabot's workflow makes them, except those of heads the watcher itself put back in the queue for the pick. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…every handback ends its pick A round whose PR was enqueued again and dropped again while the fixer ran is not applied, and a handback from a crash, timeout, or invalid result records a handback round, so the App's next enqueue of a head the pick put back starts a new pick. The watcher's API token asks for merge_queues: write with a fixer, which enqueuePullRequest needs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a re-enqueued round is never redone Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fail Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Design change: round-4 review checkpoint (head Prompt: review round 4 reported that a read failure right after a successful
(Written by Claude Opus 5.5) |
… on an error, never handed back Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 16 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. |
Implements Fix and re-enqueue and deletes the quest.
Problem
quest land watch(moq-dev/quest#388) recorded each PR the merge queue dropped, but nothing fixed it or put it back in the queue. It also treated every App enqueue as part of an existing pick. moq's Dependabot workflow enqueues with moq-bot's token, so under that rule every round of a Dependabot PR looked like a new pick, and the stop rules would never fire.Behavior
quest land watch --fixer <wrapper>(the same wrapper and argument asserve --fixer) now does the following for each removal recorded with afixverdict, oldest first, while the PR still sits where the queue dropped it:mergeBase, asprepareHeaddoes). A clean merge needs no fixer: it becomes amergedround.merge_groupwas built on. A conflict is fixed on the current base, and the fixer gets the merge'sCONFLICTlines as its log.--fixer-jobs(default 2) caps how many run at once; the others wait.--fixer-effort(defaultmedium) reaches the wrapper asQUEST_LAND_FIXER_EFFORT, andquest land fix --effort(default: that variable, elsemedium) passes it to Codex asmodel_reasoning_effort.saveRound, andstopRuledecides whether it hands back, as in moq-dev/quest#384. Outcomes arefixed,merged,flaky(a failed build requeued unchanged), orunchanged(a conflict requeued unchanged). The failure signature is the fixer'sfailure, or else the failing job and step (Queue / Queue: <step>on moq), orconflictFailure(base)for a conflict.importFix/validateFix), lease-pushed, and recorded as a mechanical fix in the PR body's Review (publishHead). A refused push is handed back with its resolution forquest land apply. These two helpers now come fromcollectJobitself, so the host gate shares them unchanged.expectedHeadOidbound to it. A head whose required checks have passed is enqueued. A head whose checks still run, such as a freshly pushed fix, gets auto-merge armed instead; this isqueueHead, the same choicequest mergemakes, now shared fromhold.ts. The watcher then comments with what it did, after any note the fixer wrote.<!-- quest land: … -->markerquest statusreads. The PR then leaves the watcher's care.requeueis idempotent.Picks: a pick is now the latest enqueue by anyone, the App included. The one exception is an App enqueue, since the pick began, of a head the watcher itself put back in the queue for that pick (
requeuedHeads). That covers the watcher's own re-enqueue, GitHub's auto-merge of it, and Dependabot's workflow re-picking the fixer's push (the workflow fires on everysynchronize). A handback ends the pick, so the App's next enqueue starts a new one.Token permissions: with a fixer, the watcher's API token asks for
merge_queues: write(granted to moq-bot 2026-11-02;enqueuePullRequestneeds it),contents: write,pull_requests: write, andactions: read. Pushes ask forcontents/pull_requests: write, plusworkflows: writewhen the push carries a workflow change, asservedoes. Without a fixer the token is unchanged.Host command
Same user, state directory, and fixer launcher as moq's
quest land serve, with no--sandbox:Choices made without asking
enqueuePullRequestis refused in that state, which is whyquest mergearms instead. Bad picks now notes that these armed re-enqueues are among the picks GitHub may never queue.quest land watch, like a fixer's fix.land-watch-fix.ts) instead of extendingcollectJob.collectJobis built around the gate's parking, batch blame, base checks, and auto-merge pins. The watcher shares the per-PR publication steps (importFix,publishHead,launch,settle,comment), and everything gate-only can go with Retire.merge_groupbuilds get the landing class from moq-dev/quest#324, fixer builds use the default class, and the host already weights fixers atCPUWeight=20.quest land fixuses itsmediumdefault, which is the wanted value. host.md says so.Validation
just checkandjust testpass on388a0e53.test/land-watch.test.tscases run against a git-backed fake upstream with real fixer wrapper processes. They cover:--fixer-jobscap holding a failed build back;dropped … picked). Separately, the merge path on those PRs: 7135's conflict merges cleanly with the quest driver (moq-bot merge commit, parents head and base); 7029 has a real code conflict inpy/moq-rs/moq/types.pyand would go to the fixer.Suggested follow-ups
QUEST_LAND_FIXER_EFFORTasquest land fix --effort, so it can be set to something other thanmedium. This is part of host.md.Review
Codex
gpt-6.1-sol, medium effort, viaquest review --base origin/main. Latest round: session01a19aed, round 2, head388a0e530b7cda4b452f58b4431671a2e9e0576a, 0 findings.First session (
01a19ab5), rounds 1–4, all findings fixed:ef913d32), fixed in31625bb6:31625bb6), fixed in120db0d8:120db0d8), fixed in5f9c3de4: a comment failure after a successful re-enqueue became a handback.5f9c3de4), fixed in518b9b44after the round-4 checkpoint (maintainer: continue): a read failure right after a successful enqueue became a handback. Once a round has recordedrequeuing, any collection error is now retried on the next pass instead.Second session (
01a19aed,--newafter the checkpoint):518b9b44), fixed in388a0e53: a PR retargeted while it waited or while its fixer ran could get the old base's fix and re-enqueue. The base is now checked when the removal is taken, when the round is collected, and when it is re-enqueued.388a0e53): no findings.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)