Repository navigation
quest: plan a batched merge gate, MIGRATE conflicts, and m0 flakes #6854
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
065f1ba
02b440f
73f1226
484bb49
ddc7876
83f69e2
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,15 @@ | ||
| # [XS] Bump quest to quest land | ||
|
|
||
| ## Goal | ||
|
|
||
| Condition: a kixelated/quest commit on `main` ships `quest land` | ||
| ([kixelated/quest's plan](https://github.com/kixelated/quest/blob/main/quest/m0/helpers/land.md)). | ||
| Check with `git ls-remote https://github.com/kixelated/quest main` and | ||
| `quest land --help` from that revision. Then bump the `quest` flake input in | ||
| `flake.nix` to that revision, and delete this quest. | ||
|
|
||
| ## Plan | ||
|
|
||
| Decided 2026-10-26 (maintainer): the batched merge gate's engine lives in | ||
| kixelated/quest, shared with kixelated/quest itself, moq.pro, and | ||
| kixelated/rust2, so moq picks it up through its pinned flake input. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| # [M] Land main through quest land | ||
|
|
||
| ## Goal | ||
|
|
||
| `main` changes only through a batched gate. `quest land` takes every PR whose | ||
| landing was requested and builds them, in enqueue order, into a chain of | ||
| squash commits on top of `main`. It runs `just ci` once on the chain's tip on | ||
| the self-hosted queue runner, then fast-forwards `main` to the longest | ||
| passing prefix of the chain. GitHub's merge queue is gone. Merged PRs per | ||
| hour on a busy day rise measurably over the baseline below, while `main` | ||
| only ever holds a tree the gate tested. | ||
|
|
||
| ## Plan | ||
|
|
||
| Baseline, measured 2026-10-26 over 2026-10-23 to 10-26 (414 queue merges, | ||
| 76.7 h): | ||
|
|
||
| - Throughput: 5.5 merged PRs per hour overall, and a median of 6.0 in the | ||
| hours the queue never emptied. One PR at a time caps it at about 11. | ||
| - Latency: from the final enqueue to merged, a median of 87 minutes and a | ||
| p90 of 162. Waiting behind other entries is 98% of that. GitHub adds about | ||
| 1 minute per merge, and a job is a median of 4.7 minutes (p90 15.1). | ||
| - Depth: a new entry found a median of 18 entries ahead of it. | ||
| - Failures: 60 of about 470 runs failed (12.7%): | ||
| - 25 semantic conflicts with PRs that landed ahead. A PR's base was a | ||
| median of 22 commits behind the queue's. | ||
| - 10 flaky tests, since fixed or tracked in the | ||
| [flake epic](/quest/m0/test-flakes-2/README.md). | ||
| - 8 lint failures and 9 failures from the PR's own tests or compile | ||
| errors. A local `just ci` would have caught about 14 of these 17. | ||
| - 8 infra failures, from mbx cache eviction before | ||
| [moq-dev/moq#6709](https://github.com/moq-dev/moq/pull/6709). | ||
| - Conflicts: 246 merge-conflict removals. 71% touched `quest/` and 41 | ||
| touched a `MIGRATE.md` Unreleased section. | ||
|
|
||
| A simulation of one-runner batching with bisection gave 1.25 merged PRs per | ||
| CI run at a 12.7% failure rate (best batch near 4), against 0.88 serial. At | ||
| 5% it gave about 2.4. The failure rate is the lever, which is why the flake | ||
| epic moved to m0 and [MIGRATE.md stops conflicting](/quest/m0/ci/migrate-unreleased.md). | ||
|
|
||
| Decided 2026-10-26 (maintainer): | ||
|
|
||
| - GitHub's merge queue cannot do this. Its "merge limits do not combine | ||
| `merge_group` builds": every entry still runs its own CI. HEADGREEN with | ||
| more concurrent builds needs more runners. Mergify (free for open source, | ||
| with batching and bisection) was rejected: it merges through the API, so | ||
| it can neither guarantee the tested tree nor resolve quest-file conflicts. | ||
| - One self-hosted runner stays the gate. This replaces the planned second | ||
| queue runner (`queue-concurrency.md`, deleted). | ||
| - The engine is `quest land` in kixelated/quest, shared with kixelated/quest, | ||
| moq.pro, and kixelated/rust2. This repository adds a thin workflow, as | ||
| moq.pro's `gate.yml` and `queue.yml` do today. | ||
| - The gate lands by fast-forward. For each PR it writes the squash commit | ||
| onto the chain (subject is the PR title, body keeps the co-author | ||
| trailers, as CONTRIBUTING describes), and resolves quest-file conflicts | ||
| with quest's merge driver. It force-pushes each PR's branch, with a lease | ||
| on the head it tested, to that PR's commit, then fast-forwards `main` to | ||
| the tip in one push. GitHub marks a PR merged once its head is on the base, | ||
| so the PRs show as merged, `main` stays linear, and the landed tree is | ||
| exactly the tested one. A conflict outside `quest/` ejects that PR. The | ||
| engine quest decides whether a fork branch that blocks maintainer edits is | ||
| refused at enqueue or lands another way. | ||
| - Batches take every queued PR, with no size constant. On failure the gate | ||
| tests the first half. A passing prefix lands at once and the rest | ||
| continues. A PR that fails alone is ejected with a comment linking the | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
| run. There are no retries. | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
| - The rule that quest, test, and CI PRs jump the queue is dropped. Order is | ||
| enqueue order. | ||
| - The push credential is moq-bot, added to the main ruleset's bypass list. | ||
| Its key (`APP_ID`/`APP_CLIENT_ID`, `APP_PRIVATE_KEY`) moves from repository | ||
| secrets into an Environment limited to `main`, `release`, and release tags. | ||
| That way a workflow on a same-repo PR branch can no longer read a key that | ||
| can push to `main`. The release workflows (some run on pushes to | ||
| `release`), `dependabot.yml`, and `smoke-toolchain.yml` that use it | ||
| reference the Environment. Only the hosted land job reads it, never the job | ||
| that runs PR code. | ||
|
|
||
| Work in this repository, once [the bump](/quest/m0/ci/land-bump.md) lands: | ||
|
|
||
| - The workflow: queue events (landing requested through `quest merge | ||
| --land`, a push dequeuing), one concurrency group, inputs resolved on a | ||
| hosted job, the chain built and tested on `vars.MOQ_QUEUE_RUNNER` with a | ||
| read-only token, and the land job on a hosted runner. | ||
| - The main ruleset drops its `merge_queue` rule. It requires a check that PR | ||
| heads never carry, so GitHub's merge button and auto-merge cannot land | ||
| around the gate. The admin role keeps its emergency bypass. Ruleset writes | ||
|
Comment on lines
+84
to
+86
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.
When the planned ruleset disables GitHub auto-merge, Dependabot updates lose their landing path: Useful? React with 👍 / 👎.
Collaborator
Author
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. Agreed. Fixed in 83f69e2: the work list now has (Written by Claude Opus 5.5) |
||
| are the maintainer's; agents only read. | ||
| - `check.yml` and `alert.yml` stop listing `merge_group`, and Check runs | ||
| inside the gate. `.github/actions/rust-cache`, `.github/actionlint.yaml`, | ||
| and `sh/gh/queue.test.ts` follow, and the test asserts the new event policy. | ||
| - `dependabot.yml` requests landing through the gate instead of | ||
| `gh pr merge --auto`, which the new ruleset leaves with no path to `main`, | ||
| and keeps its coupled smoke update guard. | ||
| - Docs that describe the queue: `CONTRIBUTING.md` (its merge queue section | ||
| and priority rule), `README.md`, `doc/setup/dev.md`, `infra/README.md`, | ||
| `justfile`, `sh/kt/check.sh`, and `test/drill/README.md`. | ||
| - `release` keeps its own ruleset and PR checks. It has no queue. | ||
| - Measure merged PRs per hour and enqueue-to-merged latency for a busy day | ||
| against the baseline, and record both in the PR. | ||
|
|
||
| Public API: none. Wire: none. | ||
|
|
||
| ## Required | ||
|
|
||
| - [Bump quest to `quest land`](/quest/m0/ci/land-bump.md) - condition: kixelated/quest ships `quest land`; then bump the flake input | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # [S] Feature PRs stop editing MIGRATE.md | ||
|
|
||
| ## Goal | ||
|
|
||
| No PR to `main` adds an "Unreleased" section to a package's `MIGRATE.md`, so | ||
| breaking PRs stop conflicting with each other there. Each version's migration | ||
| section is written only by the release cut, as | ||
| [doc/setup/upgrade.md](/doc/setup/upgrade.md) already says, from the `!` PRs' | ||
| Impact bullets and the API diff. | ||
|
|
||
| ## Plan | ||
|
|
||
| Measured 2026-10-26: from 2026-10-23 to 10-26, 41 of the merge queue's 246 | ||
| merge-conflict removals touched a `MIGRATE.md` Unreleased section | ||
| (`rs/moq-net` alone 21, the binding guides about 8 to 11 each). About 40 | ||
| `MIGRATE.md` files carry one today, though `doc/setup/upgrade.md` and | ||
| `doc/lib/index.md` say a section "is written when that release is cut, not as | ||
| changes land on `main`". | ||
|
|
||
| Decided 2026-10-26 (maintainer): drop the Unreleased sections rather than | ||
| switch to per-change fragment files. The cut already rebuilds each section | ||
| from the PRs' Impact bullets (CONTRIBUTING's release steps), so the per-PR | ||
| edits only duplicated it. | ||
|
|
||
| - Find where the habit comes from (an `AGENTS.md`, a skill, or copying), and | ||
| correct that source in the same PR. Any rule change is reviewed like one. | ||
| - Keep the content of the existing Unreleased sections until the next | ||
| breaking cut consumes it. The cut's [migration | ||
| audit](/quest/m2/release/migrate-audit.md) starts each version section from | ||
| those entries, so no curated note is lost. | ||
| - A check that refuses an Unreleased heading on `main` is optional, only if | ||
| the source cannot be corrected. | ||
|
|
||
| Public API: none. Wire: none. |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.