fix(#1408): legacy-socket launch guard + seat launch.sh preference #1409

Merged
orch-01 merged 2 commits from fix/1408-h9-launch-guards into next 2026-08-25 00:49:28 +00:00
2 Commits
Author SHA1 Message Date
veronica 8ff02ec59d ci: enumerate test-agent-session-legacy-socket-guard.sh on S1 (#1017 guard)
ci/woodpecker/pr/ci Pipeline was successful
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.
2026-08-24 19:25:15 -05:00
veronica d24acbd33f fix(#1408): legacy-socket launch guard + seat launch.sh preference
ci/woodpecker/pr/ci Pipeline failed
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.
2026-08-24 19:10:03 -05:00