Repository navigation
quest: plan the merge-queue audit's levers; reverse three fixer decisions #369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7e77794
3651ea9
ab82fde
ee2682a
7baa7e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # [XS] The daemon runs quest check on the batch before the sandbox | ||
|
|
||
| ## Goal | ||
|
|
||
| Before it spends a sandbox check on a batch, `quest land` runs `quest check` | ||
| on the batch's combined squash chain inside the daemon. A failure there is | ||
| blamed on the link that introduced it, the same way | ||
| [Batch triage](/quest/m0/land-fixer/triage.md) blames a failing check: that | ||
| PR is parked for the fixer, and the batch is rebuilt without it. No sandbox | ||
| time is spent. | ||
|
|
||
| ## Plan | ||
|
|
||
| Decided 2026-11-01 (maintainer, from the audit of the merge-queue plan; see | ||
| the [epic](/quest/m0/land-fixer/README.md)). In the audit's 24 hours on moq, | ||
| `check quest` was the first failing module in 9 of 66 failed batches (about | ||
| 14%), even though each PR passed `quest check` alone. Two PRs can each pass | ||
| alone yet together leave a dangling link or a `Required` cycle. The daemon | ||
| already screens each candidate alone (`screener()` in `src/cli/land.ts`), and | ||
| `quest check` on the chain tip costs well under a second, so check the chain | ||
| too. | ||
|
|
||
| ## Required | ||
|
|
||
| - [Batch triage](/quest/m0/land-fixer/triage.md) - provides parking and blame | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # [M] Queued PRs are pre-checked while a batch runs | ||
|
|
||
| ## Goal | ||
|
|
||
| While a batch's check runs, the daemon pre-checks the next queued PRs, each | ||
| alone against the current base, with the repository's quick command (compile | ||
| and lint, not tests), at a lower priority than the batch check. A PR that | ||
| fails is parked for the fixer with the output before it enters a batch, so a | ||
| broken PR stops costing a whole batch. | ||
|
|
||
| ## Plan | ||
|
|
||
| Decided 2026-11-01 (maintainer, from the audit of the merge-queue plan; see | ||
| the [epic](/quest/m0/land-fixer/README.md)). The audit found the batch | ||
| failure rate is the binding bottleneck: about half of moq's sandbox checks | ||
| failed, which means roughly 20-25% of PRs were broken against the current | ||
| base. A batch of k PRs lands about k·(1−p)^k PRs per check, so cutting p from | ||
| 0.2 to 0.1 roughly doubles throughput. moq's `check rs` fails in about 26 s, | ||
| so a compile and lint pre-check catches most of these cheaply. | ||
|
|
||
| - The repository declares the pre-check command beside its check command | ||
|
Comment on lines
+20
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| (moq: something like `just check-changed <base>`). Run it in the same kind | ||
| of sandbox as the batch check, never on the host. | ||
|
Comment on lines
+22
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| - Run below the batch check's priority so it cannot slow the batch; the | ||
| `land-priority` work already provides the priority classes. | ||
| - Pre-check a PR at most once per (head, base) pair; a moved base re-queues | ||
| it for pre-check only when the PR is next in line. | ||
| - A pre-check failure parks the PR through [Batch triage](/quest/m0/land-fixer/triage.md)'s | ||
| mechanism, and the fixer gets the pre-check log as its failure. | ||
|
|
||
| ## Required | ||
|
|
||
| - [Batch triage](/quest/m0/land-fixer/triage.md) - provides parking | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # [S] A protected edit the fixer writes comes back as a ready commit | ||
|
|
||
| ## Goal | ||
|
|
||
| When `validateFix` rejects a fixer result because it edits a protected path | ||
| (`.github/`, `flake.nix`, `nix/`, justfiles, gitlinks) beyond what the base | ||
| merge carries, the handback carries that result as a ready commit, the same | ||
| form as a fork push GitHub refuses | ||
| ([moq-dev/quest#358](https://github.com/moq-dev/quest/pull/358)). | ||
| The maintainer reviews it and applies it with `quest land apply <pr>`, then | ||
| pushes and re-picks. Protected edits never land automatically. | ||
|
|
||
| ## Plan | ||
|
|
||
| Decided 2026-11-01 (maintainer, from the audit of the merge-queue plan; see | ||
| the [epic](/quest/m0/land-fixer/README.md)). The maintainer kept | ||
| `validateFix`'s protected-path block and closed | ||
| [moq-dev/quest#357](https://github.com/moq-dev/quest/pull/357), which would | ||
| have let these edits land unreviewed. moq-dev/moq has about 25 release | ||
| workflows with publishing secrets, and a merge pick covers the PR's diff, | ||
| not the fixer's later resolution. About 17 such handbacks happened in 3 days, | ||
| most of them mechanical, so a one-command ready commit keeps the human review | ||
| cheap. | ||
|
|
||
| Reuse [moq-dev/quest#358](https://github.com/moq-dev/quest/pull/358)'s | ||
| handback format and `quest land apply`. Record the PR head, base, expected | ||
| tree hash, and the patch against the merge's conflicted result. Size it to | ||
| GitHub's comment limit, and hand back plainly when it does not fit. |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # [S] Tune batching and the fixer for throughput | ||
|
|
||
| ## Goal | ||
|
|
||
| Once failing PRs are parked instead of ejected, the gate stops paying for | ||
| choices made while a failure ejected a whole batch: | ||
|
|
||
| - Batch size follows the measured per-PR failure rate, not halving on each | ||
| failure. | ||
| - A conflict on the batch's base PR parks that PR and fills the batch in the | ||
| same round, without spending a round on it. | ||
| - The gate's repository enables `git rerere`, so it replays conflict | ||
| resolutions it has already made. | ||
| - Concurrent fixer jobs are capped and run below the batch check's priority. | ||
| - The fixer runs with an explicit reasoning effort; today Codex reports | ||
| `reasoning effort: none`. | ||
|
|
||
| ## Plan | ||
|
|
||
| Decided 2026-11-01 (maintainer, from the audit of the merge-queue plan; see | ||
| the [epic](/quest/m0/land-fixer/README.md)). Audit findings on moq's 24 hours: | ||
|
|
||
| - Halving after each failure kept batches at 2-3 PRs. With failing PRs | ||
| parked, size from the recent failure rate instead (about 4-5 at today's | ||
| rate), keeping `batch-policy.json` as the state. | ||
| - 156 rounds were a base-PR conflict that ran no check, about 1.5-2.5 hours | ||
| of lane time a day. | ||
| - 44 of 79 conflicting PRs conflicted 2-7 times; `rerere` lets the gate's | ||
| own base merges replay resolutions. | ||
| - Seven fixer jobs started within three minutes on a host already at load | ||
| 18-25 of 32 cores, and timeouts under load caused several flaky failures. | ||
| - Fixer job logs show `reasoning effort: none`. `land-fix.ts` passes a model | ||
| but no `model_reasoning_effort`; set one, defaulting to `medium`, with a | ||
| daemon option to override it. | ||
|
|
||
| ## Required | ||
|
|
||
| - [Batch triage](/quest/m0/land-fixer/triage.md) - the sizing change assumes failures park |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: moq-dev/quest
Length of output: 6785
Script executed:
Repository: moq-dev/quest
Length of output: 14604
Script executed:
Repository: moq-dev/quest
Length of output: 9917
Follow
Batch triagewhen blame is unclear.triage.mdrequires parking every PR when the base is green and the failure cannot be attributed to one PR.batch-check.mdstates only that a failure is blamed on the link that introduced it. Its “same way” wording does not explicitly carry over triage’s all-PR outcome.The combined check can expose failures caused by interactions between PRs, including dangling links or
Requiredcycles. Define the combined-check path to use triage’s single-blame or all-links outcome.