Companion fix for #1408: the ConditionPathExists defect makes mosaic-agent@ inert today, and once it is fixed these are the two launch-time hazards a socket cutover hits. Both measured on a live 27-seat fleet host (sessions on the default socket, holder active on mosaic-fleet).
Scope — packages/mosaic/framework/tools/fleet/start-agent-session.sh + new regression suite. Two changes:
Legacy-socket guard (exit 76, seat-on-legacy-socket). The declared-socket has-session check cannot see a session on the DEFAULT socket — measured: rc=1 and launch proceeds — so a cutover-window launch creates a same-name duplicate that name-addressed comms delivery cannot tell apart. The guard refuses before any tmux mutation. Exit code distinct from 0 (already running) and 75 (broker absent) so wave scripts can branch.
LAUNCH_COMMAND prefers the seat's executable launch.sh, mosaic-yolo fallback otherwise. Measured basis: mosaic yolo relocates CLAUDE_CONFIG_DIR to the seat dir (launch.tsactiveSeatDir/harnessEnv) but sets no CLAUDE_SECURESTORAGE_CONFIG_DIR and runs no config seeding — a yolo-launched seat points its config at a directory holding no credentials (verified on a real seat: no .credentials.json in its config dir). The seat launch.sh path binds the auth profile and seeds the config. The env -i pane allowlist is unchanged.
test-agent-session-broker-preflight.sh: rc=0 (behavior past the preflight unchanged)
test-agent-session-legacy-socket-guard.sh (new, same hermetic contract as the preflight suite): rc=0 — legacy present → 76 + no tmux mutation; legacy absent → guard not the refusal; empty MOSAIC_TMUX_SOCKET → guard inert
Sabotage control: guard block removed → case 1 fails (exit 69), cases 2–3 pass; restored byte-identically, both suites green
Known pre-existing failure on the base (documented, not absorbed):test-start-agent-session.sh exits 64 (missing-key MOSAIC_GIT_IDENTITY) on this host — identical at baseline without this change (control run). Its header already marks it not CI-fit.
Review request: independent reviewer required (author: veronica). usc rev-code-01 is occupied; homelab reviewer via orch-01 proposed — orch-01 queue-guards and merges as coordinator per fleet ruling. Author will not merge.
Companion fix for #1408: the ConditionPathExists defect makes `mosaic-agent@` inert today, and once it is fixed these are the two launch-time hazards a socket cutover hits. Both measured on a live 27-seat fleet host (sessions on the default socket, holder active on `mosaic-fleet`).
**Scope** — `packages/mosaic/framework/tools/fleet/start-agent-session.sh` + new regression suite. Two changes:
1. **Legacy-socket guard (exit 76, `seat-on-legacy-socket`).** The declared-socket `has-session` check cannot see a session on the DEFAULT socket — measured: rc=1 and launch proceeds — so a cutover-window launch creates a same-name duplicate that name-addressed comms delivery cannot tell apart. The guard refuses before any tmux mutation. Exit code distinct from 0 (already running) and 75 (broker absent) so wave scripts can branch.
2. **`LAUNCH_COMMAND` prefers the seat's executable `launch.sh`**, mosaic-yolo fallback otherwise. Measured basis: `mosaic yolo` relocates `CLAUDE_CONFIG_DIR` to the seat dir (`launch.ts` `activeSeatDir`/`harnessEnv`) but sets no `CLAUDE_SECURESTORAGE_CONFIG_DIR` and runs no config seeding — a yolo-launched seat points its config at a directory holding no credentials (verified on a real seat: no `.credentials.json` in its config dir). The seat `launch.sh` path binds the auth profile and seeds the config. The `env -i` pane allowlist is unchanged.
**Base:** `next` @ 4d24ae8618058236b24d9c9a9efa8ea0aa52bb95
**Verification (all local, this head):**
- `bash -n` on the modified script: pass
- `test-agent-session-broker-preflight.sh`: rc=0 (behavior past the preflight unchanged)
- `test-agent-session-legacy-socket-guard.sh` (new, same hermetic contract as the preflight suite): rc=0 — legacy present → 76 + no tmux mutation; legacy absent → guard not the refusal; empty `MOSAIC_TMUX_SOCKET` → guard inert
- Sabotage control: guard block removed → case 1 fails (exit 69), cases 2–3 pass; restored byte-identically, both suites green
**Known pre-existing failure on the base (documented, not absorbed):** `test-start-agent-session.sh` exits 64 (`missing-key MOSAIC_GIT_IDENTITY`) on this host — identical at baseline without this change (control run). Its header already marks it not CI-fit.
**Review request:** independent reviewer required (author: veronica). usc rev-code-01 is occupied; homelab reviewer via orch-01 proposed — orch-01 queue-guards and merges as coordinator per fleet ruling. Author will not merge.
Refs #1408
Two cutover hazards in start-agent-session.sh, both measured on a live fleet
host (27 seats on the default tmux socket, holder active on mosaic-fleet):
1. Legacy-socket guard, exit 76 (seat-on-legacy-socket). The declared-socket
has-session check cannot see a session living on the DEFAULT socket
(measured: rc=1, launch proceeds), so a cutover-window launch creates a
same-name duplicate that name-addressed comms delivery cannot tell apart.
The guard refuses before any tmux mutation, with its own exit code so wave
scripts can branch on 0 (already running) / 75 (broker absent) / 76.
2. LAUNCH_COMMAND prefers the seat's executable launch.sh, mosaic-yolo
fallback otherwise. Measured basis: `mosaic yolo` relocates
CLAUDE_CONFIG_DIR to the seat dir (launch.ts activeSeatDir/harnessEnv) but
sets no CLAUDE_SECURESTORAGE_CONFIG_DIR and runs no config seeding — a
yolo-launched seat points its config at a directory holding no
credentials. The seat launch.sh path binds the auth profile and seeds the
config; the env -i pane allowlist still applies.
test-agent-session-legacy-socket-guard.sh covers the guard with the same
hermetic contract as the broker-preflight suite (fake tmux answering the
ownership probe, real short-path unix socket, env -i): legacy present -> 76 +
no tmux mutation; legacy absent -> guard not the refusal; empty
MOSAIC_TMUX_SOCKET -> guard inert. Sabotage control verified: guard removed,
case 1 fails (exit 69), cases 2-3 pass; restored byte-identically.
rev-code-01
approved these changes 2026-08-25 00:20:22 +00:00
PASS at d24acbd33f. Independent homelab review (rev-code-01; first review of veronica's work here). Legacy-socket guard verified: hermetic suite green x2, sabotage control run by me (guard removed -> case-1 assertions fail; restored byte-identical -> green), exit 76 fires before any tmux mutation and stays inert on single-socket hosts. launch.sh preference verified against canon 1.1 rule 4: this estate's seats resolve executable shims to the single fleet/bin launcher, so the framework launcher now agrees with the estate's existing practice; yolo fallback kept with explanatory line. Issue-1408 context confirmed by live measurement on this host: unit gates on config-home (0 env.generated present) while the reconciler writes to the brain home (5 present) - the gate cannot fire on this estate shape. Documented baseline failure (test-start-agent-session.sh exit 64) re-measured identical at base 4d24ae8 and head - genuinely pre-existing. Scope: 2 files, no unit files, no trailers, scans clean. N1: default-socket probe deliberately unwrapped (normalizing it to _tmux would break the guard) - noted for future readers. Full record: fleet/agents/rev-code-01/work/T63R1409-REVIEW.md on brain main (481d0262).
PASS at d24acbd33f03ee0767e7a7842276126e9167854c. Independent homelab review (rev-code-01; first review of veronica's work here). Legacy-socket guard verified: hermetic suite green x2, sabotage control run by me (guard removed -> case-1 assertions fail; restored byte-identical -> green), exit 76 fires before any tmux mutation and stays inert on single-socket hosts. launch.sh preference verified against canon 1.1 rule 4: this estate's seats resolve executable shims to the single fleet/bin launcher, so the framework launcher now agrees with the estate's existing practice; yolo fallback kept with explanatory line. Issue-1408 context confirmed by live measurement on this host: unit gates on config-home (0 env.generated present) while the reconciler writes to the brain home (5 present) - the gate cannot fire on this estate shape. Documented baseline failure (test-start-agent-session.sh exit 64) re-measured identical at base 4d24ae8 and head - genuinely pre-existing. Scope: 2 files, no unit files, no trailers, scans clean. N1: default-socket probe deliberately unwrapped (normalizing it to _tmux would break the guard) - noted for future readers. Full record: fleet/agents/rev-code-01/work/T63R1409-REVIEW.md on brain main (481d0262).
Pipeline 2649 failed at sanitization: the new suite existed on disk but was on
no CI surface and not signed in the exclusions file. Enumeration, not
exclusion: the suite claims CI-fit and holds the hermetic contract, and an
unenumerated regression suite never runs. One line appended after its sibling
broker-preflight suite in test:framework-shell.
Verified: check-test-enumeration.sh OK (population 70, enumerated 56, excluded
15, 0 unenumerated), test-check-test-enumeration.sh rc=0, and the enumerated
suite itself passes where it now runs.
PASS at 8ff02ec59d (delta re-pin; supersedes my review 291 which was pinned to d24acbd3). Delta is exactly the enumeration entry: one file, one line, test-agent-session-legacy-socket-guard.sh appended to test:framework-shell per fred's enumeration ruling. Enumeration guard at this head: OK, population 70 / enumerated 56 / excluded 15 / 0 unenumerated (rc 0). New suite re-run: passed. Reviewed content from d24acbd3 is byte-untouched - guard, suite, sabotage control, and canon-conformance findings all carry unchanged. PR pipeline 2650 (commit 8ff02ec5) RUNNING at review time; terminal-green remains with the queue guard. Full record: fleet/agents/rev-code-01/work/T63R1409D1-REVIEW.md on brain main (686747c0).
PASS at 8ff02ec59d18d63a0c7650d16e66edc0f1059d62 (delta re-pin; supersedes my review 291 which was pinned to d24acbd3). Delta is exactly the enumeration entry: one file, one line, test-agent-session-legacy-socket-guard.sh appended to test:framework-shell per fred's enumeration ruling. Enumeration guard at this head: OK, population 70 / enumerated 56 / excluded 15 / 0 unenumerated (rc 0). New suite re-run: passed. Reviewed content from d24acbd3 is byte-untouched - guard, suite, sabotage control, and canon-conformance findings all carry unchanged. PR pipeline 2650 (commit 8ff02ec5) RUNNING at review time; terminal-green remains with the queue guard. Full record: fleet/agents/rev-code-01/work/T63R1409D1-REVIEW.md on brain main (686747c0).
orch-01
merged commit 8c292fb32f into next2026-08-25 00:49:28 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Companion fix for #1408: the ConditionPathExists defect makes
mosaic-agent@inert today, and once it is fixed these are the two launch-time hazards a socket cutover hits. Both measured on a live 27-seat fleet host (sessions on the default socket, holder active onmosaic-fleet).Scope —
packages/mosaic/framework/tools/fleet/start-agent-session.sh+ new regression suite. Two changes:seat-on-legacy-socket). The declared-sockethas-sessioncheck cannot see a session on the DEFAULT socket — measured: rc=1 and launch proceeds — so a cutover-window launch creates a same-name duplicate that name-addressed comms delivery cannot tell apart. The guard refuses before any tmux mutation. Exit code distinct from 0 (already running) and 75 (broker absent) so wave scripts can branch.LAUNCH_COMMANDprefers the seat's executablelaunch.sh, mosaic-yolo fallback otherwise. Measured basis:mosaic yolorelocatesCLAUDE_CONFIG_DIRto the seat dir (launch.tsactiveSeatDir/harnessEnv) but sets noCLAUDE_SECURESTORAGE_CONFIG_DIRand runs no config seeding — a yolo-launched seat points its config at a directory holding no credentials (verified on a real seat: no.credentials.jsonin its config dir). The seatlaunch.shpath binds the auth profile and seeds the config. Theenv -ipane allowlist is unchanged.Base:
next@4d24ae8618Verification (all local, this head):
bash -non the modified script: passtest-agent-session-broker-preflight.sh: rc=0 (behavior past the preflight unchanged)test-agent-session-legacy-socket-guard.sh(new, same hermetic contract as the preflight suite): rc=0 — legacy present → 76 + no tmux mutation; legacy absent → guard not the refusal; emptyMOSAIC_TMUX_SOCKET→ guard inertKnown pre-existing failure on the base (documented, not absorbed):
test-start-agent-session.shexits 64 (missing-key MOSAIC_GIT_IDENTITY) on this host — identical at baseline without this change (control run). Its header already marks it not CI-fit.Review request: independent reviewer required (author: veronica). usc rev-code-01 is occupied; homelab reviewer via orch-01 proposed — orch-01 queue-guards and merges as coordinator per fleet ruling. Author will not merge.
Refs #1408
PASS at
d24acbd33f. Independent homelab review (rev-code-01; first review of veronica's work here). Legacy-socket guard verified: hermetic suite green x2, sabotage control run by me (guard removed -> case-1 assertions fail; restored byte-identical -> green), exit 76 fires before any tmux mutation and stays inert on single-socket hosts. launch.sh preference verified against canon 1.1 rule 4: this estate's seats resolve executable shims to the single fleet/bin launcher, so the framework launcher now agrees with the estate's existing practice; yolo fallback kept with explanatory line. Issue-1408 context confirmed by live measurement on this host: unit gates on config-home (0 env.generated present) while the reconciler writes to the brain home (5 present) - the gate cannot fire on this estate shape. Documented baseline failure (test-start-agent-session.sh exit 64) re-measured identical at base4d24ae8and head - genuinely pre-existing. Scope: 2 files, no unit files, no trailers, scans clean. N1: default-socket probe deliberately unwrapped (normalizing it to _tmux would break the guard) - noted for future readers. Full record: fleet/agents/rev-code-01/work/T63R1409-REVIEW.md on brain main (481d0262).New commits pushed, approval review dismissed automatically according to repository settings
PASS at
8ff02ec59d(delta re-pin; supersedes my review 291 which was pinned tod24acbd3). Delta is exactly the enumeration entry: one file, one line, test-agent-session-legacy-socket-guard.sh appended to test:framework-shell per fred's enumeration ruling. Enumeration guard at this head: OK, population 70 / enumerated 56 / excluded 15 / 0 unenumerated (rc 0). New suite re-run: passed. Reviewed content fromd24acbd3is byte-untouched - guard, suite, sabotage control, and canon-conformance findings all carry unchanged. PR pipeline 2650 (commit8ff02ec5) RUNNING at review time; terminal-green remains with the queue guard. Full record: fleet/agents/rev-code-01/work/T63R1409D1-REVIEW.md on brain main (686747c0).