Repository navigation
feat(land): keep fixing a pick while each round makes progress - #384
Merged
Merged
Conversation
Quest-Claim: 0d7fcdc3a3d4c861
Replace the one fixer attempt per maintainer pick with a per-pick history of rounds in fix-attempt-<n>.json: each blamed failure's outcome (fixed, merged, unchanged, flaky, or a handback), the head before and after, and the failure's signature. `stopRule` hands a pick back on a round with no new commit for a failure that isn't flaky, on the failure a fix addressed recurring right after it, or on the third flaky round in a row, and the handback comment names the rule. The host gate applies the same rules at collection; the queue watcher will call them too. The fixer names each failure's test or step in its result's optional `failure`; a conflict's signature names the base it conflicts with, so a conflict after the base moved is a new failure. A record written before rounds were kept starts a fresh history. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
November 2, 2026 01:32
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
kixelated
enabled auto-merge (squash)
November 2, 2026 01:44
This was referenced Nov 2, 2026
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.
Completes Stop rules: the land fixer keeps fixing a dropped PR, with no attempt limit, while each round makes progress, and hands it back on one of three stop rules. This replaces the one attempt per pick from moq-dev/quest#355.
Changes
Per-pick history (
src/cli/land-fixer.ts):fix-attempt-<n>.jsonnow holdsrounds. Each round records the job that ran it, its outcome (fixed,merged,unchanged,flaky, orhandback), the head before and after, the failure's signature, and the rule that fired.history()reads the file andsaveRound()writes a round; collecting the same job again replaces that job's round. A record withoutrounds, written by the old gate, starts a fresh history.pickandrequeuedstay, sobatchablestill keeps a requeued fix at its pick's place.Stop rules:
stopRule(rounds, round)returns the rule that fires, if any:unchanged: a round with no new commit for a failure that isn't flaky;repeated: the failure the last fix (or merge) addressed recurs right after it. Flaky rounds in between don't reset this;flaky: the third flaky round in a row (FLAKY_LIMIT).stopReasonwrites the handback text naming the rule.conflictFailure(base)is the signature for a conflict: it names the base, so a conflict after the base moved counts as a new failure.Fixer result: an optional one-line
failure(at most 200 characters) names the failing test or step.assets/land-fix.mdasks the fixer to name it the same way every time that test or step fails.Removed:
spent,handbackRepeated, and the pre-launch "already used its mechanical fix attempt" handback instartFixerand inserveBatch's ejection loop.Quest tree: deletes
stop.md. The watcher-side wiring that remains (callingsaveRound/stopRuleper round,mergedrounds, and the fallback signature from themerge_groupjob and step) moves into Fix and re-enqueue's plan, since the watcher's round handling lives there. Links in the epic,flaky.md,bad-picks.md,host-land/fixer.mdandland-fixer/README.mdare rewritten. The README's landing section describes the rules.Host gate behaviour
Choice: the host gate (
quest land serve) applies the same stop rules, at collection. moq-dev/quest, moq.pro, rust2 and rind keep landing through it until they follow moq.spentandhandbackRepeatednext to the new rules, so I counted this as a fix the switch needs rather than gate work the epic freezes.How gate rounds map to the rules:
fixedquest checkrejection) and the fixer requeued it unchangedunchanged: hands back at once (it used to requeue and conflict again)flaky(the gate has no flaky verdict otherwise); the third one in a row hands backThe signature is
merge conflict with <base sha>for conflicts. Otherwise it is the fixer'sfailure, falling back to the gate's reason (failed_checks); the gate runs one check step, which is the analogue of the watcher's job-and-step fallback.Choices made without asking
FLAKY_LIMITis one constant if the other reading is wanted.repeated, since the two verdicts contradict each other.Suggested follow-ups
None new. The remaining watcher wiring is in Fix and re-enqueue.
Checks
just checkandjust testpass locally.just testpassed withCLAUDE_CONFIG_DIRunset: before moq-dev/quest#340, now merged, twoagent.test.tscases read the caller's environment.Review
Codex (
quest review), gpt-6.1-sol, medium effort, round 1 on head f666e41 against origin/main 92d04c1: 0 findings.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)