✔ W1: two processes acquire the same pair at once; exactly one claim (214.692766ms)
✔ W1: two writers publish the same revision at once: one wins, the other gets null, the winner's record stays (35.281571ms)
✔ W1: a revision name appears only after its bytes are synced; before that, only a temp file exists (19.163359ms)
✔ W2: acquire while a claim is reserved or active refuses already-active (364.532312ms)
✔ W3: acquire while stopping, uncertain, or stopped without proof refuses unsafe-replacement (377.764228ms)
✔ W4: same session with another seat tuple, and the reverse, both refuse; a loser on the seat key closes it no-unit (300.852278ms)
✔ W4: a hard link of one session under another seat is the same session: the second controller refuses already-active and launches nothing (329.43766ms)
✔ W4: a copy of one session under another seat is the same session: the second controller refuses already-active and launches nothing (281.021404ms)
✔ W4: a session header ID that changes after construction refuses target; nothing is claimed or launched (2.49468ms)
✔ W5: SIGKILL between every publication barrier of acquire and transition; restart never finds two holders or a lost claim (11462.013958ms)
✔ W5: SIGKILL between every publication barrier of release; restart finishes or holds the release (41221.895274ms)
✔ W6: controller killed mid-turn while the engine lives; restart is uncertain, no launch, prompts refuse (262.033375ms)
✔ W12: a live owner paused with SIGSTOP; a second controller refuses already-active and changes nothing (144.24079ms)
✔ W13: crash after the engine spawns, before active; restart finds the live unit: uncertain, no second spawn, force stop only (650.326566ms)
✔ W14: crash after reservation, before the spawn marker: stopped with a no-unit observation; the pair is free (291.322554ms)
✔ W20: crash after the spawn marker, scope collected; uncertain in both runs, the marker is copied, no launch until a boot proof (352.891003ms)
✔ W15: crash between the two keys during release; restart finishes it under the same claim ID (109.201416ms)
✔ W7: recorded boot ID differs on the same machine: stopped with a boot proof; open tool calls become uncertain (215.426382ms)
✔ W8: resume after a proven stop with the same pins: new claim ID, generation +1, same conversation, branch and leaf (287.170582ms)
✔ W9: resume with a changed binary, argv digest, branch or leaf is refused and the claim is unchanged (956.719345ms)
✔ W11: the controller writes no session file; only the fake engine's own appends appear (237.403628ms)
✔ W16: a highest revision that won't parse holds the pair uncertain; the older stopped revision is not reused (94.218119ms)
✔ W17: a claim root copied from another host refuses foreign-host and promotes nothing (124.467226ms)
✔ G1: a session path or claim root under .pi/state, ~/.claude, the data root or a registration refuses at construction (5.326433ms)
✔ G2: a symlink inside the fixture root to a live session file is refused by the real-path check (1.301771ms)
✔ G3: a fixture path swapped for a live path after construction is refused at bind (3.089689ms)
✔ no shim from this file's tests is left running for the after hook (27.435756ms)
✔ K1: force stop kills a tool child that called setsid; stopped with a verified proof (946.55456ms)
✔ K2: K1 on the process-group fallback ends uncertain, never stopped (551.363423ms)
✔ K3: SIGTERM acknowledged while a member lives: stopping until the kill phase, never stopped from TERM (902.476944ms)
✔ K4: two engines; force stop one; the other survives by independent observation (3019.596125ms)
✔ K5: a stop during a tool call leaves the effect uncertain, and it is shown (721.67872ms)
✔ K12: a member forking in a loop: the freeze stops it, enumeration is complete, populated 0 after cgroup.kill (789.127435ms)
✔ K13: a member writing its pid into another cgroup is refused by the namespace; the kill is complete (736.235267ms)
✔ K15: the shim gone, engine/cgroup.events unreadable, or the engine cgroup missing: evidence unavailable, not empty; uncertain (5543.534063ms)
✔ K10: controller killed between the TERM and kill phases: restart checks the invocation ID and re-runs from TERM for the same stop (721.597132ms)
✔ K11: controller killed after the confirmation is recorded, before TERM: restart checks the invocation ID and re-runs from TERM for the same stop (816.575302ms)
✔ K14: a unit with the recorded name but another invocation ID: evidence unavailable, no signals, uncertain (619.658275ms)
✔ K6: recover without proof, without confirmation, or with changed pins is refused (672.240755ms)
✔ K7: recover after proof, then launch: new claim and execution, generation +1, same leaf; the cancelled prompt is not replayed (428.934148ms)
✔ K8: an engine that loads another leaf on resume is refused before admission; it stays claimed until a proven stop (447.676577ms)
✔ K9: an interrupt that never settles stays uncertain; force stop stays available; takeover is refused while fenced (3244.73205ms)
✔ K16: a claim from another machine ID refuses foreign-host; no boot proof is issued (28.056269ms)
✔ K17: two launcher calls with one eligibility record: one launch, the other refuses, no second engine (331.551762ms)
✔ K18: the leaf changes after eligibility: launch refused; the reservation stays until released with proof (289.443985ms)
✔ K19: a scope launched with only the engine environment still reaches the user manager; the engine sees no other names (83.397498ms)
✔ R1: after a proven force stop the controller releases the scope; the shim and the unit are gone (660.379397ms)
✔ R2: close releases the scope of a binding proven stopped, once, when the stop's own release hasn't run (716.030096ms)
✔ R3: no release after an unavailable stop or an unverified proof: the scope and its shim stay as evidence (1571.840369ms)
✔ R4: after a normal engine exit the scope stays until a proven force stop releases it (680.697711ms)
✔ R5: the harness finds a running shim and reaps it, and never signals a shim outside a mosaic-chat- scope (Filbert N1 and N2 on #1533) (469.881981ms)
✔ R6: releaseCohort releases nothing for another invocation ID or a cohort without a scope (383.359469ms)
✔ no shim from this file's tests is left running for the after hook (25.614452ms)
✔ S1: `/goal x`, with leading spaces or a tab, refuses text-policy at admission; zero engine bytes (213.913878ms)
✔ S2: every prefix pinned Pi interprets is refused, from the list the code uses; the rest reach the engine exactly (202.510628ms)
✔ S3: `/goal` on the second line is pinned from the source: Pi checks only index 0, so it is admitted and sent exactly (208.304608ms)
✔ S4: a `/` left in the composer is cleared when control transfers and returns; the next submit sends only the new text (277.193011ms)
✔ S5: an observer terminal gets a paste then Enter, as send-message.sh does: not admitted: controller, nothing sent (183.688541ms)
✔ S6: a mediated-shaped registration (no tmux) passed to the board's replyToRow: 409 no tmux session; exec never runs (0.502702ms)
✔ S7: ESC, bracketed-paste markers and U+2028/U+2029 travel as one JSON string; the engine receives the exact text in one record (284.669635ms)
✔ P3: a Pi confirm, select, input or editor dialog is shown disabled with a reason and never answered (425.864917ms)
✔ E1: send, ack, user, toolCall, toolResult, final answer: shown once, no refresh, draft and reading position kept (253.762093ms)
✔ E2: U+2028, U+2029 inside JSON strings and CRLF line ends each parse as one record, on the splitter and through the controller (223.546652ms)
✔ E3: a multipart final, two blocks, null request correlation and duplicate delivery (222.749566ms)
✔ E4: a page read after message_end but before its entry is persisted: marker at the seam, re-read after run-settled, each message once (219.827577ms)
✔ E4: a gap or a new epoch also reconciles; nothing is concatenated across a gap (9.822021ms)
✔ E5: an unknown native event gives no client event; evidence records its type and bytes; the terminal count goes up (205.914706ms)
✔ E6: a tool result delayed across a pause and a reconnect is reconciled without a manual refresh (233.034193ms)
✔ E7: the terminal renders the same stream as the library client, as observer and then as controller, and submits only as controller (260.984066ms)
✔ terminal: engine control characters are made visible; a lost connection refuses submit (214.478911ms)
✔ terminal: outcome unknown is shown as such, with no resend offer, and nothing is resent (0.384792ms)
✔ terminal: text after Enter in the same input chunk starts the next message; it never joins the one submitted (0.255966ms)
✔ terminal: a paste-start marker split right after its ESC still opens the paste; the Enter inside it never submits (0.314452ms)
✔ terminal: Ctrl-T then Enter in one chunk is judged after the takeover, as if typed one key at a time (Filbert F2, #1507) (0.471567ms)
✔ terminal: input held behind Ctrl-T waits for that takeover while an earlier action is still pending (Darkwing T1 on #1522) (30.823854ms)
✔ terminal: a hold inside held input holds again, and once it is drained later input and Ctrl-C still reach the terminal (Darkwing note 1 on #1522) (0.392649ms)
✔ terminal: an action that throws still releases the input held behind it, in order, then rethrows (4.671493ms)
✔ terminal: after an action throws, later input still runs; input() puts the error in the status line (Filbert N1 on #1522) (0.346263ms)
✔ terminal: input() reports an error when it happens, so it never overwrites a later status; held input's promise doesn't carry the holder's error (Filbert N4 on #1522) (0.324006ms)
✔ terminal: invisible and bidi characters are made visible; head, status and notice lines stay one line (0.09485ms)
✔ every record these fixtures produced is a valid CHAT-01 record (E5: no record fails the schema) (221.320831ms)
✔ H1: two takeovers with the same expected generation: one wins, +1; the other refuses generation (256.999033ms)
✔ H2: the old controller's prompt after a takeover commits is refused with zero engine bytes (287.066551ms)
✔ H3: a takeover while a prompt holds the dispatch lock: written under the old actor, or refused; never both (914.50853ms)
✔ H4: self-takeover is refused (342.427544ms)
✔ H9: Interrupt racing a prompt's dispatch: before the write, dispatch-refused and no-turn; after, §3 rules (502.664919ms)
✔ H10: Interrupt and force stop together: one stop chain, force stop supersedes (1079.151522ms)
✔ H10: an overlap during the pause before the abort: no abort, the stop ends uncertain (246.762256ms)
✔ H10: a no-turn Interrupt lifts only its own fence; admission stays closed under force stop, overlap or revocation (572.624718ms)
✔ H11: the controller disconnects mid-turn: work continues, the claim is unchanged, control stays put (266.594445ms)
✔ H12: an exact retry after reconnecting to the same incarnation returns the same receipt; one dispatch (209.636318ms)
✔ H13: a retry with the same request ID and different text is refused (190.364234ms)
✔ H14: late stdout from the old engine after a replacement is dropped by incarnation, counted, never rendered (612.176306ms)
✔ H15: a revoked connection's command is refused; the revocation fence holds (300.766877ms)
✔ H16: a second controller for the same session refuses already-active; the first is untouched (219.145789ms)
✔ H10: a second force stop while the first escalation runs refuses fenced; one escalation, and the claim records only the first stop's phases (908.054339ms)
✔ a force stop whose fence throws leaves no escalation flag behind, so the next force stop runs (Darkwing F2, #1507) (330.972574ms)
✔ H17: a confirmation reused, answered from another connection, or used after the stop changed is refused (759.177034ms)
✔ H18: two prompts before any native output: the second refuses busy; one engine write (203.329728ms)
✔ H19: the pipe fails mid-line under a large prompt: delivery-unknown transport-unknown, poisoned, no later write (344.558923ms)
✔ H19: the link itself never writes again after an unknown outcome, whoever calls it (0.704325ms)
✔ H19: the controller dies mid-write of a large line: after restart the outcome is unknown and nothing is resent (655.713075ms)
✔ H20: the line is written but the ack is lost when the controller dies: orphan, outcome unknown, nothing resent (559.332315ms)
✔ H21: a retry of the exact request with the old token after a crash is stale-incarnation; no second write (683.460323ms)
✔ H22: after H21 and a valid recovery, a new request with the new token is admitted (2988.767776ms)
✔ H23: requests pending at a restart are not resent; each shows outcome unknown (813.104398ms)
✔ no shim from this file's tests is left running for the after hook (25.100745ms)
✔ a plain conversation: catalogue row, one page, CHAT-01 records (6.76514ms)
✔ native entries map to blocks: tools, thinking, bash, notices, ids that do not fit (1.764145ms)
✔ F1: a malformed line is an unavailable part at its position, and reading continues (1.860771ms)
✔ F1: a missing parent stops the history with a notice that names the unreadable lines (2.501483ms)
✔ F1: an unreadable fork is never merged into another branch's history (1.559726ms)
✔ F1: a follow stays on its branch when the next entry's parent is unreadable (1.99225ms)
✔ F1: a file whose entries are all unreadable shows a notice per line (0.883923ms)
✔ F2: a truncated trailing line marks the view incomplete, not an error (1.251287ms)
✔ pagination: 100 parts, then the rest; parts concatenate to the whole branch (3.715171ms)
✔ F3: a replaced file (new inode) refuses old cursors with reconcile (6.551748ms)
✔ F4: a same-inode rewrite of the prefix refuses old cursors with reconcile (4.590313ms)
✔ F5: growth between pages keeps the epoch and the page stops at the pinned length (4.530809ms)
✔ F6: unknown, foreign and expired cursors refuse and leave the cursor usable (6.051209ms)
✔ F7: a symlinked file and a symlinked directory component are refused, never opened (7.22648ms)
✔ F8: a file swapped for a symlink after the catalogue is refused (1.599878ms)
✔ F9: registrations never add or redirect a root (1.922949ms)
✔ F10: a header cwd naming another project is refused (4.623169ms)
✔ F11: parentSession renders with a marker and the parent is never opened (0.738107ms)
✔ F12: two leaves: the default leaf is shown and the other branch reads alone (3.765454ms)
✔ F12: a follow refuses when an appended duplicate id changes the branch's earlier parts (1.879358ms)
✔ F12: a second root (Pi's resetLeaf) starts its own branch (1.364377ms)
✔ F13: compaction is a marker in place, then the retained content (0.712237ms)
✔ F14: long strings split into fragments and parts, reassemble exactly, and pages respect the byte cap (550.683981ms)
✔ fragments never cut a surrogate pair and keep an empty string (5.207212ms)
✔ F15: a Claude seat is an unsupported-harness placeholder whose directory is never read (1.826563ms)
✔ unknown conversations, empty files and non-Pi files refuse (2.617974ms)
✔ an unreadable file or root inside the roots is refused per row, not a failed catalogue (1.249975ms)
✔ a seat directory without search permission refuses that root, not the catalogue (2.523566ms)
✔ every page and cursor is a valid CHAT-01 record (847.570613ms)
✔ the engine pin holds for the installed package (1.814212ms)
✔ pinned Pi, sealed and without credentials, answers the controller's commands with the shapes the fake models (274.302459ms)
✔ sealed, pinned Pi ignores a trusted project's .pi resources; --approve past the seal would load them, and checkSeal refuses it (Filbert F2 on #1522) (532.342398ms)
✔ pinned Pi appends thinking_level_change at start when the branch lacks one, so the leaf moves (K8 then fails closed) (284.79393ms)
✔ N25: ordinary Interrupt reconciles; a non-empty queue_update in the window is O5 (485.972173ms)
✔ N1: an extension's follow-up queued after the fence is cleared before any abort; O5, Unknown (430.186236ms)
✔ N1: a follow-up queued before the fence is O5 at once; the Interrupt refuses fenced (224.474896ms)
✔ N2: with abort first, the fake runs the external item (the ordering guard has teeth) (21.01273ms)
✔ N3: the fence lands in preflight, preflight errors, no run: failed, No run, uncertain (575.68202ms)
✔ N4: the ack arrives after the first abort and a run starts: clear and abort again; Interrupted (268.344177ms)
✔ N5: an input handler takes the prompt: ack, no run, delivery-unknown handled-without-run (318.54659ms)
✔ N6: an extension queues between clear_queue and abort: O5 and O6, Unknown (496.492255ms)
✔ N7: clear_queue times out: no abort, nativeQueue unknown, force stop still ends it (1910.454833ms)
✔ N7: clear_queue answers an error: no abort, nativeQueue unknown, the link not poisoned (193.28303ms)
✔ N8: an extension prompt starts a run during Mosaic preflight; the losing settle is O3 (300.805643ms)
✔ N9: a run that started before the fence and ends aborted: failed interrupted, Interrupted (200.751771ms)
✔ N9: decision 34: a run that ends aborted with no stop in progress: aborted-without-stop, uncertain, outcome unknown (225.31464ms)
✔ N9: an aborted that lands after the fence but before any abort is written: aborted-without-stop, Unknown (428.690849ms)
✔ N10: fake conformance (31.727507ms)
✔ N11: the run fails before any user message_start: delivery-unknown ack-without-start, never failed (465.047877ms)
✔ N12: input that starts a run after the final empty clear is O1 and not part of the stop's proof (275.008046ms)
✔ N13: agent_start with no slot held is O1; a later prompt refuses with zero engine bytes (298.293847ms)
✔ N14: the run completes while clear_queue is in flight: finished, Completed first, uncertain (369.68525ms)
✔ N14: the run completes after the abort is written, before Pi applies it: finished, never relabelled (341.912018ms)
✔ N15: the fence lands in preflight, then an input handler takes it: handled-without-run, No run (363.219305ms)
✔ N16: Interrupt with no slot and no run refuses no-turn: no stop, no bytes, admission open (210.340268ms)
✔ N17: the run fails on its own during the exchange: failed, Failed on its own (337.62287ms)
✔ N18: no final assistant message_end, or a lost line: working stays working; before working, transport-unknown (597.654958ms)
✔ N19: a losing extension prompt settles inside the Mosaic run before its user message: O3, run-overlap (477.886696ms)
✔ N20: an extension triggerTurn during Mosaic preflight starts first; while streaming it queues with no signal (476.354205ms)
✔ N21: a losing settle after the receipt settled finished is O2; the receipt stays finished (202.361269ms)
✔ N22: an agent-level custom message is dropped by the clear with no signal; evidence names the seal (203.626415ms)
✔ N23: a nextTurn message survives clear and abort and attaches to the next prompt, with no signal (185.493095ms)
✔ N24: the seal is an allow-list: --extension, a missing --no-* flag, a second --mode or --session, a session or output flag, or a stray word refuses unsealed-engine; no engine starts (266.574958ms)
✔ N24b: the seal covers the engine command and environment: config can't name either, the env is built from names, and a mutated command is refused at bind (191.942472ms)
ℹ tests 171
ℹ suites 0
ℹ pass 171
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 61552.029333
