✔ a first launch clones the root at its branch, with the root's path as origin (31.910461ms)
✔ the clone is not at its place until git clone has finished (21.683077ms)
✔ a later launch fast-forwards a clean clone after a commit to the root, then finds it current (66.728307ms)
✔ a clone ahead of the root keeps its commits and counts as current (38.87357ms)
▶ a dirty clone and one on another branch are fetched, and nothing but refs/remotes moves
  ✔ a modified file (42.872366ms)
  ✔ an untracked file (42.226277ms)
  ✔ a staged file (44.261412ms)
  ✔ another branch (42.485356ms)
  ✔ a detached HEAD (42.521564ms)
✔ a dirty clone and one on another branch are fetched, and nothing but refs/remotes moves (215.478532ms)
✔ a diverged clone gets the fetch into refs/remotes and is kept, not-fast-forward (43.046666ms)
▶ a clone kept before the branch check, or for a failed status, gets no fetch
  ✔ not-a-clone (23.063025ms)
  ✔ hooks-present (24.826276ms)
  ✔ submodule (30.857183ms)
  ✔ config-changed (27.845246ms)
  ✔ root-unreadable (27.73519ms)
  ✔ root-detached (32.301947ms)
  ✔ status-failed, on the root's branch and clean (35.901065ms)
  ✔ status-failed, dirty (34.39988ms)
✔ a clone kept before the branch check, or for a failed status, gets no fetch (238.267875ms)
✔ a dirty clone whose fetch fails is kept, fetch-failed, exactly as it was (38.090852ms)
✔ every git call the host makes, for a new clone and an existing one, carries maintenance.auto=false and gc.auto=0 (44.408666ms)
✔ a clone with loose objects enough for gc --auto gets no maintenance or gc from the fetch and the merge (71.935146ms)
▶ a clone with user.name or user.email in its config is kept, and git runs nothing in it
  ✔ user.name (24.806425ms)
  ✔ user.email (24.845521ms)
✔ a clone with user.name or user.email in its config is kept, and git runs nothing in it (50.093297ms)
✔ a commit git can't read after the fast-forward is null (45.090768ms)
✔ a new clone whose commit can't be read refuses the launch and leaves nothing behind (18.442173ms)
▶ a clone the session rigged is kept, and git runs nothing and writes nothing outside it
  ✔ core.fsmonitor (32.454143ms)
  ✔ core.hooksPath (32.377795ms)
  ✔ a hook file (30.641043ms)
  ✔ include.path (32.428431ms)
  ✔ includeIf (33.248591ms)
  ✔ a filter driver (32.860055ms)
  ✔ origin moved (32.51799ms)
  ✔ a second origin url (33.218169ms)
  ✔ the origin url twice, both the root (33.786955ms)
  ✔ an ext:: origin (33.350853ms)
  ✔ a branch tracking another remote (32.761016ms)
  ✔ a branch merging a tag (32.549414ms)
  ✔ a fetch line onto local branches (33.357545ms)
  ✔ no origin (34.455391ms)
  ✔ a config file over the size cap (30.918302ms)
  ✔ config a symlink to /dev/zero (31.538527ms)
  ✔ the clone a symlink to the bait (31.091688ms)
  ✔ the clone a file (31.083413ms)
  ✔ the clone a plain directory (32.535862ms)
  ✔ .git a gitdir: file (31.958653ms)
  ✔ .git a symlink (30.854841ms)
  ✔ .git/logs a symlink (32.124654ms)
  ✔ .git/refs/heads a symlink (31.036768ms)
  ✔ .git/objects a symlink (29.823021ms)
  ✔ a reflog hard-linked to a file outside (30.356798ms)
  ✔ HEAD a fifo (31.553163ms)
  ✔ a commondir file (32.946726ms)
  ✔ an alternates file (30.756179ms)
  ✔ a gitlink staged, no .gitmodules (42.997848ms)
  ✔ a gitlink and .gitmodules staged (44.340067ms)
  ✔ a gitlink to a repository with its own gitlink (56.162393ms)
  ✔ a gitlink and .gitmodules committed (76.076331ms)
  ✔ a gitlink and submodule.active in config (57.704108ms)
  ✔ a .git/modules with no gitlink (39.331279ms)
✔ a clone the session rigged is kept, and git runs nothing and writes nothing outside it (1219.737372ms)
▶ a root that can't be cloned refuses with the project id and leaves nothing behind
  ✔ missing (11.949315ms)
  ✔ not a repository (10.241125ms)
  ✔ a plain directory inside another repository (15.242711ms)
  ✔ unreadable (11.483536ms)
  ✔ on no branch (12.981929ms)
  ✔ missing an object (16.348136ms)
✔ a root that can't be cloned refuses with the project id and leaves nothing behind (79.22541ms)
✔ a clone whose root is on no branch, or gone, is kept and named (28.950858ms)
✔ no credential or forge remote of the root reaches a clone (49.175533ms)
✔ every project in the business file gets its own clone at its own branch (35.030183ms)
✔ a clone past its time gets SIGTERM and refuses the launch, with nothing left in the workspace (513.524184ms)
✔ a clone that ignores SIGTERM gets SIGKILL once the grace period is over (1017.858134ms)
✔ a timeout signals git's process group, so a process git started dies with it (515.554875ms)
✔ once a signalled git has closed, its group gets SIGKILL, so a process that ignored SIGTERM dies too (513.696372ms)
✔ RUNNER_FILES is exactly what the runner and the harness sources it starts import (1.685157ms)
✔ sandboxProblem names a missing bwrap and a bwrap that fails (8.490413ms)
✔ every bind says why; the bundle and session file stay read-only over the run directory (1.216809ms)
✔ REQ-THREAD-2 a thread store binds its session directory and Claude transcripts, and nothing more (0.906577ms)
✔ the host's git socket is bound only when given, read-only and before the writable binds (0.68985ms)
✔ the git identity is the instance's, at <instance>@<business>.mosaic.invalid, and sandboxArgv refuses without it (1.050974ms)
✔ a confined session's shell reaches its own workspace and run directory and nothing of the founder's or another session's (1735.744001ms)
✔ a bind that exposes a stand-in, or a missing workspace bind, fails the matching check (2628.234418ms)
✔ a confined session that runs tester-cli.mjs is refused as tester, and the same shim outside the sandbox binds (206.3229ms)
✔ resolveSeat: by name under --repo resolves the repo layout (1.263751ms)
✔ resolveSeat: by path resolves the fleet layout (0.337601ms)
✔ resolveSeat: refusals for missing dir, missing launch.sh, non-executable launch.sh, invalid name, and unknown layout (0.712435ms)
✔ tmuxContext: outside tmux, default socket, custom socket, and exec failure (0.670136ms)
✔ makeRegistration produces a record that validates; each shape violation throws SeatError (0.797541ms)
✔ writeRegistration/readRegistration: round trip, permissions, absence, and malformed records (1.263921ms)
✔ updateTask: changes task, taskSetBy and updatedAt only, and refuses appropriately (1.143304ms)
✔ CLI launch: registers, execs the fake launch script, and passes args through (28.735904ms)
✔ CLI launch: --harness lands in the record (27.139017ms)
✔ CLI launch: the launch script's own exit code passes through (28.702025ms)
✔ CLI launch: relaunching a seat rewrites the one registration record (61.999652ms)
✔ CLI launch: omitting --task records an empty string, not null (29.434651ms)
✔ CLI seat task: updates only the task after a launch, and refuses on an unlaunched seat (77.956958ms)
✔ CLI refusals: no args, unknown flag, missing config, already-registered env, and exec failure (135.549205ms)
✔ samePath: equal paths, symlinked dirs, distinct dirs, and non-strings (0.363031ms)
✔ resolveSetBy: explicit --by wins over the environment; absent or empty environment gives unknown; invalid explicit or environment values refuse with exit 4 (0.595435ms)
✔ 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.690209ms)
✔ 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 (0.853586ms)
✔ 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 (264.159106ms)
✔ REQ-LIMIT-1: family substring matching is no longer exported (0.754369ms)
✔ sessionEnv passes only the allowlist, the repo's bin on PATH, and the run id (0.684791ms)
✔ sessionExit gives a runner's signal death back as the signal; a session credential is one whole set of nonempty variables (0.311125ms)
✔ newRun: short ids, 0700 directories, and a refusal when the socket path won't fit (1.45535ms)
✔ session file and launch log: 0600, the session file written once (1.033871ms)
✔ endReason maps the runner's exit codes; a signal is killed (0.118947ms)
✔ Registry mirrors to sessions.json; readSessions marks live entries; bad files refuse (1.217139ms)
✔ REQ-THREAD-1 Registry.running keys a thread run by business, instance and thread (0.566732ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.790599ms)
✔ stopSession refuses an unknown run, reports a stale one, and won't signal a pid that isn't a runner (0.926505ms)
✔ a session runs in its sandbox as pid 1 of its namespace, claims, answers, and stops on mosaic stop (244.901166ms)
✔ workRef and validBranch take only what a ref name can hold (1.126058ms)
✔ a push lands as the task's work ref, a fast-forward lands after it, and main is the root's (106.148308ms)
✔ a rewritten branch refuses non-fast-forward and the work ref stays (86.608898ms)
✔ a branch with no history in common with main refuses unrelated-history (44.746705ms)
✔ a bundle that needs commits the working repository lacks refuses missing-prerequisite (38.655773ms)
✔ main is fetched from the root again before each push, so a clone of a newer root pushes (93.549263ms)
✔ a root moved back after the clone leaves the push's base unknown: missing-prerequisite (61.146465ms)
✔ a commit with a broken object refuses invalid-bundle, and only because fsck is on (59.739118ms)
✔ only a v2 bundle with the named branch is read (45.692407ms)
✔ a branch named main, or named for another task, moves only this task's work ref (73.564246ms)
✔ a record that throws moves the work ref back, or removes a new one (99.380679ms)
✔ a work ref that can't go back refuses rollback-failed, naming the ref and the commit (345.648904ms)
✔ a root that can't be read refuses root-unreadable (27.40914ms)
✔ a git past its time gets SIGTERM, leaves no ref lock, and the next push lands (2111.928851ms)
✔ a git that ignores SIGTERM gets SIGKILL once the grace period is over (1027.657332ms)
✔ a working repository path that isn't a directory refuses (24.570462ms)
✔ review bundles a pushed commit as refs/mosaic/review, leaving out what the reviewer has (99.701598ms)
✔ review of a project with no working repository refuses unknown-commit (13.633689ms)
✔ the runner's git tools hold the host's limits and branch rule (1.13158ms)
ℹ tests 135
ℹ suites 0
ℹ pass 135
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4950.77738
