Repository navigation
feat(land watch): only genuine flakes count toward disabling a test - #468
Conversation
Quest-Claim: 9a308b6627950bf2
A requeue names its cause: flaky, the base, or the runner's environment. Only flaky ones are recorded in flaky.json; the others still requeue and count toward the requeue limit. Failure signatures are compared without quoting or repeated whitespace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the requeue limit by cause Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
There was a problem hiding this comment.
ℹ️ No critical issues — one docs gap worth closing.
Reviewed changes
Reviewed the complete diff at head 7d98540 (11 files). Ran bun run check (tsc + prettier, clean) and the two affected test files with vitest (224 pass).
causeon requeues — a requeue result may nameflaky,base, orenvironment; validation keepscauseon requeues only and makesdisablerequirecause: "flaky", which transitively keeps it on requeues.failuresignatures are normalized at parse time, so quoting variants of one test are stored as one signature.- Watcher and gate outcomes — rounds record the named cause as their outcome; only
flakyreachesrecordFlaky, so only genuine flakes count toward a disable. A watcher requeue naming no cause hands back via theunchangedrule, while the gate defaults it toflaky; both choices are documented in the PR body and tested. - Stop rules —
FLAKY_LIMIT/"flaky"becomeREQUEUE_LIMIT/"requeued", counting every unchanged re-enqueue whatever its cause, with the handback naming the last round's cause. Old histories on disk still parse, since old"flaky"outcomes are a valid cause and nothing readsruleback. - Fixer prompt and docs —
assets/land-fix.mdtells the fixer how to pick a cause, that a base or runner failure is never disabled, and to hand back when it cannot tell; README and quest docs updated, quest deleted.
ℹ️ Stale --help and comment text the behavior change left behind
The PR updated README.md, assets/land-fix.md, and the quest docs for the new requeue semantics, but two user-facing strings that describe the old rules were missed. Both files are outside this PR's diff, so they cannot carry inline comments.
Technical details
# Stale user-facing text about the requeue and flaky rules
## Affected sites
- src/cli/main.ts:665 — the `quest land watch` command help still says a pick is handed back by "a round with no new commit for a failure that isn't flaky ... or three flaky rounds in a row", and that "each fixed, merged, or flaky head is re-enqueued at the back of the queue". After this PR the requeue limit counts three unchanged re-enqueues in a row whatever their causes, a no-cause requeue hands back on the first round, and base- or environment-caused requeues also re-enqueue.
- src/cli/land-watch.ts:383 — the comment posted on every dropped PR still says the watcher re-enqueues it "once it is fixed or judged flaky"; base- and environment-caused requeues re-enqueue too, and a no-cause requeue is now a handback.
## Required outcome
- Both strings describe the new rules rather than the old ones: the requeue limit is cause-agnostic, the disable verdict is what stays flaky-only, and the handback wording matches `stopReason` in `src/cli/land-fixer.ts`.
## Suggested approach (optional)
- Fold into this PR (it already owns the docs sweep) or a small follow-up; `AGENTS.md` asks for README/help consistency.glm-5.3-flash | 𝕏
|
quest land watch: the merge queue removed this pull request at 7d98540 because it conflicts with The land fixer works on it in the background, and the watcher re-enqueues it at the back of the queue once it is fixed or judged flaky, or hands it back here with what it needs. (written by quest land watch) |
|
quest land watch: armed auto-merge on this pull request at 491150a, so it joins the back of the merge queue once its required checks pass, with the land fixer's fix ( (written by quest land watch) |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the delta since the prior review at 7d98540: a single head commit, 491150a, merging main into the branch.
- Merged
main(e102ec7) into the branch — the merge's combined diff is empty, so it introduced no novel content: the land-watch code, the fixer prompt, and the land tests are unchanged from the previously reviewed state. - Resolved the modify/delete conflict by keeping
main's deletion ofquest/m0/review-test-load.md(the branch had only added PR-#468 links;maindeleted the completed plan), and it picked upmain's own completions (gate-load-wording.md,kix/runner-review.md,m1/windows-suite.mdplus their index entries). - Swept for dangling references — no file at the head references any deleted quest plan, including the ones this PR deleted itself.
- Verified on CI —
check(all four targets) andbuildare green on491150a.
glm-5.3-flash | 𝕏
|
quest land watch: the merge queue removed this pull request at 491150a because it conflicts with The land fixer works on it in the background, and the watcher re-enqueues it at the back of the queue once it is fixed or judged flaky, or hands it back here with what it needs. (written by quest land watch) |
|
codex / Codex land fixer note:
(written by codex / Codex) |
|
quest land watch: armed auto-merge on this pull request at 7cb87ec, so it joins the back of the merge queue once its required checks pass, with the land fixer's fix ( (written by quest land watch) |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the delta since the prior review at 491150a: a single head commit, 7cb87ec, merging main (de0e7e4, "The land fixer runs the repository's own checks" #472) into the branch again.
- Reconciled the fixer prompt's requeue examples — the merge resolution folded this PR's
causesemantics into #472's new## Repository checkssection inassets/land-fix.md: the requeue and disable examples now read{"cause":"flaky",...}first, with areasonthat names the commands run ("ran just check and just test on a scratch merge"), and the base-alone fixed example names them too. The reordering of JSON keys in a prompt is cosmetic and the validation code is order-insensitive. - Kept both sides' prose — the branch's
causeguidance (neverdisableon base or runner failures, hand back when the cause is unknown) coexists untouched with #472's checks-run-before-requeuerequirement;## Repository checksis main's text verbatim and nothing of the branch's was dropped in the merged hunks. - Verified the merged state locally — the fixer-prompt assertion test in
test/land.test.ts(which now carries #472's contains/not-contains checks alongside this PR's) passes, andbun run checkis clean.
glm-5.3-flash | 𝕏

Finishes quest/m0/queue-watcher/flaky-verdicts.md.
Problem
quest land watchcounted every unchanged requeue of a failed build as a flaky verdict, and two verdicts take adisable. Failures that reproduce on the base or come from the runner were counted too: the EROFScgroup.killand missingflock/scriptrounds on moq-dev/quest#324, and an unused import already on moq'smain, requeued twice on moq-dev/moq#7560 and moq-dev/moq#7221. Signatures that differed only by backticks also split one test's verdicts.Changes
cause:flaky,base(the base fails it alone), orenvironment(the runner: a missing tool, a read-only path, a full disk). Onlyflakyis recorded inflaky.json, anddisableis accepted only on aflakyrequeue.flaky,base,environment). All three still requeue at the back and count toward the renamedREQUEUE_LIMITstreak (3 in a row hands back). The handback, now "stop rule (requeue limit)", names the last round's cause. The requeue comment says which cause the fixer found.failuresignatures are normalized at parse time (backticks and quotes stripped, whitespace collapsed).recordFlakyand the repeated-failure stop rule normalize both sides when they compare, so older records and fallback step names still match.assets/land-fix.mdtells the fixer how to choose each cause, that a base or runner failure is neverdisabled, and to hand back when it cannot tell why the failure happened.quest/m0/review-test-load.mdnow link this PR instead.Public API / wire impact: the fixer result format gains an optional
causefield.StopRuleflakyis renamedrequeuedandFLAKY_LIMITis renamedREQUEUE_LIMIT(internal; histories already on disk still read, since nothing readsruleback).Choices made without asking
unchangedstop rule), instead of defaulting to flaky. Defaulting to flaky would keep the bug for any fixer that forgets the field. With build concurrency 1, a failure that isn't the PR's is always one of the three causes.causetoo, defaulting toflakywhen none is named. That keeps its collateral-PR requeues unchanged. The gate still keeps no flaky record.disablewithoutfailureis still accepted, as before. It falls back to the job's failing step.Validation
quest gate -- just check: passed.quest gate -- just test: passed (1046 + 531 tests).cause,disablerequiringflaky, and normalization. Stop-rule tests cover mixed causes.Suggested follow-ups
None.
Review
mechanical fix by codex / Codex:
Merged base and combined conflicting documentation examples, preserving failure causes and repository checks; ran bun install --frozen-lockfile, bun run build, bun run check, bun run --silent quest check, bun run test, and successful timeout retries with bun run test --maxWorkers=1 --testTimeout=30000 test/re·solve.test.ts test/agent.test.ts test/review.test.ts.(head 7cb87ec)mechanical fix by codex / Codex:
Merged base and retained deletion of the completed review-test-load plan, resolving its link-only modify/delete conflict; passed bun run build, bun run check, and bun run test (28 files, 1058 tests passed, 5 skipped).(head 491150a)Codex
gpt-6.1-sol, effort xhigh, viaquest review --base origin/main.stopRulenormalizes both operands, with a test.flakysaid "judged flaky 3 times". Fixed: every requeue-limit handback reads "requeued unchanged 3 times in a row, last ..." with the last cause.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)