2.6 KiB
Brief: a second gate lane, two full gates at once on dragon-lin
Sage, 2026-10-20, for Mos's order mos-0977 item 6 ("put the design for a second gate lane on the list now")
and the MVP push (mos-0974). Gitea #1695. Owner Herb (Codex gpt-6.1-sol, a new builder seat), reviewer
Webby, gate owner Sage. Base: refactor at the brief commit. Design first. The first deliverable is
agents/herb/work/queue-ROW/DESIGN.md.
Why
Every full run shares one slot today. A full gate (cli suite plus every scripts/test-*.sh) takes about 13
minutes or more, reviewers' runs and mutants take the same slot, and with eight or more seats building for
10-27 the slot is the bottleneck. The slot exists because concurrent runs broke each other. The busy check is
agents/sage/work/gate-lane/busy-now.sh (a copy of Sage's), and the gate is
agents/sage/work/gate-lane/gate-template.sh (a copy of Sage's template). The host has 16 cores and 62 GB.
What the design must settle
- Every shared resource two concurrent runs can collide on, found from the code and tests, not guessed:
Docker compose project names and networks (
scripts/test-task.shand others), fixed TCP ports in tests, unix socket paths and their 107-byte limit under TMPDIR, the sandbox's private/tmp, shared caches, scratch and worktree paths, the queue lock, and any test that reads host-wide state (process lists,pgrep,/proc). For each: how a lane gets its own copy, or why it is safe to share. - Timing. Which tests have time limits that a doubled CPU load could break, measured, and what changes (a bound, or a lane rule that keeps those suites apart).
- The lane mechanism: lane ids, a lock per lane that a run takes and releases even on a crash, the busy check that reports per lane, and how a seat asks for a lane. Sage still grants it.
- The gate template takes a lane id and isolates everything from point 1 by it.
- Proof: two full gates on different candidates at once, three times, with zero cross-failures, plus the wall time of each against a single-lane run. Any flake found is named with its cause.
Boundaries
- No change to the live units,
~/.mosaic-dev,~/.config/mosaic-devor slot files. The proof runs use scratch roots only, and it needs Sage's grant of the whole slot while it runs. - Test code changes that only isolate a resource are in scope. A change to what a test checks is not, and goes to its owner.
- Docker networks and containers a run makes are removed by the run (trap), and nothing else is touched.
Gate
Webby approves DESIGN.md, then the manifest. The cli suite and every scripts/test-*.sh are green on Sage's
gate, both singly and in the two-lane proof.