✔ resolveSeat: by name under --repo resolves the repo layout (1.614406ms)
✔ resolveSeat: by path resolves the fleet layout (0.438607ms)
✔ resolveSeat: refusals for missing dir, missing launch.sh, non-executable launch.sh, invalid name, and unknown layout (0.927604ms)
✔ tmuxContext: outside tmux, default socket, custom socket, and exec failure (0.834961ms)
✔ makeRegistration produces a record that validates; each shape violation throws SeatError (1.381157ms)
✔ writeRegistration/readRegistration: round trip, permissions, absence, and malformed records (2.263772ms)
✔ updateTask: changes task, taskSetBy and updatedAt only, and refuses appropriately (2.387902ms)
✔ CLI launch: registers, execs the fake launch script, and passes args through (39.06825ms)
✔ CLI launch: --harness lands in the record (36.375336ms)
✔ CLI launch: the launch script's own exit code passes through (35.303199ms)
✔ CLI launch: relaunching a seat rewrites the one registration record (69.126645ms)
✔ CLI launch: omitting --task records an empty string, not null (39.089153ms)
✔ CLI seat task: updates only the task after a launch, and refuses on an unlaunched seat (110.908399ms)
✔ CLI refusals: no args, unknown flag, missing config, already-registered env, and exec failure (183.525014ms)
✔ samePath: equal paths, symlinked dirs, distinct dirs, and non-strings (0.530911ms)
✔ resolveSetBy: explicit --by wins over the environment; absent or empty environment gives unknown; invalid explicit or environment values refuse with exit 4 (0.73824ms)
✔ validateRegistration/readRegistration: taskSetBy is optional; a record without it (written before #1511) still loads unchanged; an invalid one is refused; the version does not change (0.987699ms)
✔ updateTask: records setBy, preserves startedAt and every unrelated field, upgrades an old record in place only when the task is set, and replaces a previous attribution (14.887655ms)
✔ CLI seat task: --by beats MOSAIC_AGENT_NAME, the environment beats nothing, empty environment is unknown, invalid --by or environment refuses with exit 4 and leaves the record byte for byte (329.05029ms)
ℹ tests 19
ℹ suites 0
ℹ pass 19
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 947.479624
