Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions quest/m0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
26 changes: 26 additions & 0 deletions quest/m0/checks/README.md
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions quest/m0/checks/cache.md
Original file line number Diff line number Diff line change
@@ -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.
18 changes: 18 additions & 0 deletions quest/m0/checks/differential.md
Original file line number Diff line number Diff line change
@@ -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.
18 changes: 18 additions & 0 deletions quest/m0/checks/dispatch.md
Original file line number Diff line number Diff line change
@@ -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.
16 changes: 16 additions & 0 deletions quest/m0/checks/fixture-layout.md
Original file line number Diff line number Diff line change
@@ -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.
15 changes: 15 additions & 0 deletions quest/m0/checks/stable-names.md
Original file line number Diff line number Diff line change
@@ -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.
16 changes: 16 additions & 0 deletions quest/m0/checks/task-fixture.md
Original file line number Diff line number Diff line change
@@ -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.