diff --git a/quest/m0/README.md b/quest/m0/README.md index 36220eec8..fa2096325 100644 --- a/quest/m0/README.md +++ b/quest/m0/README.md @@ -3,3 +3,7 @@ ## Goal Urgent fixes to anything a consumer already depends on. + +## Required + +- [Checks at moq's cost](/quest/m0/checks/README.md) - `just ci` selects by the diff, builds warm, and runs the differential optimized, with a nightly full `just gate` diff --git a/quest/m0/checks/README.md b/quest/m0/checks/README.md new file mode 100644 index 000000000..c8b288649 --- /dev/null +++ b/quest/m0/checks/README.md @@ -0,0 +1,26 @@ +# Checks at moq's cost + +## Goal + +The land gate and agents' local checks cost what moq's do: `just ci` runs only what a +change touches, builds warm, and runs the differential fixtures optimized, while a nightly +`just gate` runs the full suite. Measured against the 2026-11-01 audit's baseline: about +33 CPU-hours a day in the gate (65 CPU-minutes a run) and 100 to 130 locally. + +## Plan + +Decided with the maintainer on 2026-11-01, from an audit of the gate's and agents' checks +(nixos2 and the host's systemd accounting): copy how moq works. `just ci` before every push +stays the rule, and costs less once it selects by the diff; CONTRIBUTING.md and the skills +keep their rules. All of it is m0, since every agent pays the cost now. + +Each child reports its CPU saved, cold and warm, against `origin/main`. + +## Required + +- [The task fixture outside the gate](/quest/m0/checks/task-fixture.md) - the `task` differential passes on every host, not only in the gate's container +- [A cheaper differential](/quest/m0/checks/differential.md) - fixtures' wasm builds at opt-level 1 under single-threaded Node, and `stable_names` reuses `lang`'s translation +- [Checks by the diff](/quest/m0/checks/dispatch.md) - `just ci` runs only the projects a change touches, as moq's `sh/dispatch.sh` does, with a nightly `just gate` +- [A warm gate](/quest/m0/checks/cache.md) - the land gate builds through mbx, as moq's does +- [Stable names on a small fixture](/quest/m0/checks/stable-names.md) - `stable_names` runs on a small fixture with generic instances and trait impls +- [Fixtures that merge](/quest/m0/checks/fixture-layout.md) - `lang` splits by module, and `reject`'s snapshots key by item, not line diff --git a/quest/m0/checks/cache.md b/quest/m0/checks/cache.md new file mode 100644 index 000000000..fccec89aa --- /dev/null +++ b/quest/m0/checks/cache.md @@ -0,0 +1,16 @@ +# [S] A warm gate + +## Goal + +The land gate's `just ci` builds through mbx, as moq's does, so a run rebuilds only what +changed: measured on nixos2, root clippy falls from 399 to 83 CPU-seconds warm, and uniffi's +test build from 291 to 20. + +## Plan + +Decided with the maintainer on 2026-11-01: mbx in a per-repository cache mount, as moq's +gate has. PR code can write to it, a risk moq already accepts; mbx keys each compilation on +its compiler, target, and inputs. Local worktrees share it too, where the dev shell already +can. + +Public API: none. diff --git a/quest/m0/checks/differential.md b/quest/m0/checks/differential.md new file mode 100644 index 000000000..fd88f5db2 --- /dev/null +++ b/quest/m0/checks/differential.md @@ -0,0 +1,18 @@ +# [S] A cheaper differential + +## Goal + +The ts differential fixtures run their native wasm32 side built at opt-level 1, under +`node --single-threaded`, and `stable_names` reuses the `lang` test's translation as its +base, with every case still compared. + +## Plan + +Measured by the 2026-11-01 checks audit on nixos2: `lang`'s differential spends about 590 of +its 872 CPU-seconds running a 212 MB debug wasm in V8. At opt-level 1 it takes 164, with 0 +differences across 709k cases. Overflow checks and debug assertions stay on, so panics and +overflow still match. Apply it to every differential fixture. `stable_names`'s base config +equals `lang`'s roots, so its first translation repeats the `lang` test's (about 150 +CPU-seconds). + +Public API: none. diff --git a/quest/m0/checks/dispatch.md b/quest/m0/checks/dispatch.md new file mode 100644 index 000000000..5121b255d --- /dev/null +++ b/quest/m0/checks/dispatch.md @@ -0,0 +1,18 @@ +# [M] Checks by the diff + +## Goal + +`just ci` runs only what a change touches, against the base the land gate passes as +`QUEST_LAND_BASE` or `origin/main` locally, as moq's `sh/dispatch.sh` does, and `just gate` +runs the full suite nightly on `main`. A quest-only change runs `quest check` and the lints. + +## Plan + +Decided with the maintainer on 2026-11-01: copy moq's dispatch. Since the gate started, +147 of 201 PRs touched only ts and quest files, 25 only quest files, 2 uniffi, and 16 ffi; +uniffi has never failed in the gate. Shared inputs (the flake, toolchains, the root +`Cargo.*` and justfile, `.github`) select everything. Add `just ci-select` to show the +selection, and a nightly job running `just gate`, which the nightly lacks today. Update +CONTRIBUTING.md's description of the gate to say what moq's does. + +Public API: none. diff --git a/quest/m0/checks/fixture-layout.md b/quest/m0/checks/fixture-layout.md new file mode 100644 index 000000000..58e7928bc --- /dev/null +++ b/quest/m0/checks/fixture-layout.md @@ -0,0 +1,16 @@ +# [M] Fixtures that merge + +## Goal + +`lang` splits into fixtures by its modules, sharing one wasm target dir, and `reject`'s +snapshots key each refusal by its item rather than its line number, so two PRs adding cases +rarely conflict and a targeted run builds only its module. + +## Plan + +Decided with the maintainer on 2026-11-01. Of 71 merge-conflict ejections in four days, 43 +were in `lang` (31.7k lines, 108k lines of TS) and 28 in `reject`, and gate failure #374 was +`reject`'s line numbers shifting inside a batch. Each conflict costs a fixer run, a local +`just ci`, and another gate run. + +Public API: none. diff --git a/quest/m0/checks/stable-names.md b/quest/m0/checks/stable-names.md new file mode 100644 index 000000000..35feda6c7 --- /dev/null +++ b/quest/m0/checks/stable-names.md @@ -0,0 +1,15 @@ +# [S] Stable names on a small fixture + +## Goal + +`stable_names` checks that output names stay stable on a small fixture of its own that still +has generic instances and trait impls, instead of translating all of `lang`. + +## Plan + +Decided with the maintainer on 2026-11-01: it caught 3 failures nothing else did, so it +stays in the gate, but on a fixture that costs a fraction of `lang`'s (about 300 +CPU-seconds saved after [the reuse](/quest/m0/checks/differential.md)). Cover each naming +rule it relies on in `lang` today. + +Public API: none. diff --git a/quest/m0/checks/task-fixture.md b/quest/m0/checks/task-fixture.md new file mode 100644 index 000000000..10ed982e7 --- /dev/null +++ b/quest/m0/checks/task-fixture.md @@ -0,0 +1,16 @@ +# [S] The task fixture outside the gate + +## Goal + +The ts `task` differential passes on every host `just ci` runs on, as it does in the land +gate's container, so an agent's local `just ci` on `main` is green. + +## Plan + +Found by the 2026-11-01 checks audit: on `main` at `8e6a7219`, `task` fails on nixos2 and in +the fixer's container, alone or in parallel, with "35417 cases, 3059 panics, 628 +differences", and passes in the gate. It made the fixer hand back #387, #393, #394, and #397. +Reproduce it, find what differs between the hosts (Node's version, threads, timers, the +environment), and fix the cause, never by loosening the comparison. + +Public API: none.