diff --git a/agents/README.md b/agents/README.md index 08a1b69de..ae734f607 100644 --- a/agents/README.md +++ b/agents/README.md @@ -20,6 +20,7 @@ not fleet seats. Keep changes in `/mnt/storage/src/mosaic-stack`; do not modify | Morgana | Builder, MVP T1 row 193 (human users and RBAC) | T3 session (Claude, Opus 5.5), started by Sage under mos-0974/0977 | none, T3 only | | Honker | Builder, MVP T1 row 194 (agent lifecycle) | T3 session (Claude, Opus 5.5), started by Sage under mos-0974/0977 | none, T3 only | | Gander | Builder, the human boundary across uids (P19 333, #1694) | T3 session (Codex, gpt-6.1-sol), started by Sage under mos-0977 | none, T3 only | +| Herb | Builder, a second gate lane (#1695) | T3 session (Codex, gpt-6.1-sol), started by Sage under mos-0977 | none, T3 only | | Webby | Reviewer: Case 2 designs, rows 192 and 194 | T3 session (Claude, Opus 5.5, thread 03086006), started by Mos (mos-0981) | none, T3 only | | Duckworth | Reviewer: federation designs, row 193 | T3 session (Claude, Opus 5.5, thread ffceafec), started by Mos (mos-0977) | none, T3 only | | Sage | Project lead: coordination, review, integration; earlier DYOR strategy records retained | T3 session (Claude Code); Pi launcher `zai/glm-5.3:high` retained | `agents/sage/launch.sh` | diff --git a/agents/herb/README.md b/agents/herb/README.md new file mode 100644 index 000000000..07be48a59 --- /dev/null +++ b/agents/herb/README.md @@ -0,0 +1,8 @@ +# Herb + +Builder seat, Codex gpt-6.1-sol, started by Sage under mos-0977 item 5 (more Codex Sol rows) for a second gate lane +design row (#1695, mos-0977 item 6). + +No launcher in this directory. The seat runs as a T3 thread and works in its own worktree. It has no +credentials of its own; until the credentials row settles per-agent identity, it pushes only its own `herb/*` +branches through the repository credential helper (mos-0981), never `refactor`, `main` or another seat's branch. diff --git a/agents/sage/work/gate-lane/busy-now.sh b/agents/sage/work/gate-lane/busy-now.sh new file mode 100644 index 000000000..74b023b80 --- /dev/null +++ b/agents/sage/work/gate-lane/busy-now.sh @@ -0,0 +1,8 @@ +#!/bin/bash +n=0 +for p in /proc/[0-9]*; do + c=$(tr '\0' ' ' < $p/cmdline 2>/dev/null) || continue + case "$c" in *shell-snapshots*|*chrome-devtools-mcp*|*sage-busy-now*) continue;; esac + if echo "$c" | grep -qE 'node --test|gate\.sh|mutant|scripts/test-[a-z-]+\.sh|docker compose'; then echo "BUSY ${p#/proc/}: ${c:0:160}"; n=$((n+1)); fi +done +[ $n -eq 0 ] && echo CLEAR diff --git a/agents/sage/work/gate-lane/gate-template.sh b/agents/sage/work/gate-lane/gate-template.sh new file mode 100755 index 000000000..2d7fc22e1 --- /dev/null +++ b/agents/sage/work/gate-lane/gate-template.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -o pipefail +# Landing gate template (2026-10-14): sed the G= and OUT= lines and this comment. +# Sequential suites, each teed to its own log; stops at the first failure. +G=/mnt/storage/scratch/SET-ME-wt +OUT=/mnt/storage/scratch/SET-ME-out +cd "$G" || exit 9 +mkdir -p "$OUT" || exit 9 # a missing OUT failed the row 142 gate at step 1 (2026-10-15) +# test-task.sh live cases run `docker compose` from $G, so without a name the project is "wt" +# and leaves wt_default behind (row 142 gate, 2026-10-15). Name it per gate dir and remove it on exit. +export COMPOSE_PROJECT_NAME="$(basename "$(dirname "$G")")" +trap 'docker network rm "${COMPOSE_PROJECT_NAME}_default" >/dev/null 2>&1 && echo "removed network ${COMPOSE_PROJECT_NAME}_default"' EXIT +# A gate tree without the node_modules link fails cli tests with ENOENT (2026-10-13). +[ -d "$G/node_modules" ] || { echo "STOP no node_modules in $G"; exit 8; } +echo "base $(git rev-parse --short HEAD) dirty $(git status --short | grep -vc node_modules) DOCKER_HOST=${DOCKER_HOST:-unset}" +run() { local name="$1" dir="$2" cmd="$3" + (cd "$G/$dir" && bash -c "$cmd") > "$OUT/$name.log" 2>&1; local rc=$? + echo "$name rc=$rc $(grep -E '^ℹ (pass|fail) [0-9]+' "$OUT/$name.log" | tr '\n' ' ') | $(tail -n1 "$OUT/$name.log")" + [ $rc -eq 0 ] || { echo "STOP $name"; exit $rc; }; } +# No pkg-queue step: scripts/test-queue.sh runs packages/queue/tests/ itself (same 156 tests; CI debate item 2a, Vikunja #274). +for d in packages/*/; do p=$(basename "$d"); [ -d "$d/tests" ] || continue; [ "$p" = queue ] && continue + run "pkg-$p" "packages/$p" 'node --test tests/*.test.mjs'; done +for s in scripts/test-*.sh; do n=$(basename "$s" .sh); run "script-${n#test-}" . "bash $s"; done +echo GATE_PASSED diff --git a/docs/plans/2026-10-20_second-gate-lane.md b/docs/plans/2026-10-20_second-gate-lane.md new file mode 100644 index 000000000..8af714d06 --- /dev/null +++ b/docs/plans/2026-10-20_second-gate-lane.md @@ -0,0 +1,42 @@ +# 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 + +1. 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.sh` and 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. +2. 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). +3. 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. +4. The gate template takes a lane id and isolates everything from point 1 by it. +5. 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-dev` or 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.