✔ W1: two processes acquire the same pair at once; exactly one claim (500.172302ms)
✔ W1: two writers publish the same revision at once: one wins, the other gets null, the winner's record stays (34.447301ms)
✔ W1: a revision name appears only after its bytes are synced; before that, only a temp file exists (21.245207ms)
✔ W2: acquire while a claim is reserved or active refuses already-active (380.782492ms)
✔ W3: acquire while stopping, uncertain, or stopped without proof refuses unsafe-replacement (415.536314ms)
✔ W4: same session with another seat tuple, and the reverse, both refuse; a loser on the seat key closes it no-unit (258.443009ms)
✔ W4: a hard link of one session under another seat is the same session: the second controller refuses already-active and launches nothing (208.321924ms)
✔ W4: a copy of one session under another seat is the same session: the second controller refuses already-active and launches nothing (209.096493ms)
✔ W4: a session header ID that changes after construction refuses target; nothing is claimed or launched (2.343681ms)
✔ W5: SIGKILL between every publication barrier of acquire and transition; restart never finds two holders or a lost claim (10639.643125ms)
✔ W5: SIGKILL between every publication barrier of release; restart finishes or holds the release (33722.598575ms)
✔ W6: controller killed mid-turn while the engine lives; restart is uncertain, no launch, prompts refuse (297.831509ms)
✔ W12: a live owner paused with SIGSTOP; a second controller refuses already-active and changes nothing (167.189405ms)
✔ W13: crash after the engine spawns, before active; restart finds the live unit: uncertain, no second spawn, force stop only (484.422997ms)
✔ W14: crash after reservation, before the spawn marker: stopped with a no-unit observation; the pair is free (317.977402ms)
✔ W20: crash after the spawn marker, scope collected; uncertain in both runs, the marker is copied, no launch until a boot proof (434.213183ms)
✔ W15: crash between the two keys during release; restart finishes it under the same claim ID (138.169018ms)
✔ W7: recorded boot ID differs on the same machine: stopped with a boot proof; open tool calls become uncertain (202.378983ms)
✔ W8: resume after a proven stop with the same pins: new claim ID, generation +1, same conversation, branch and leaf (397.75689ms)
✔ W9: resume with a changed binary, argv digest, branch or leaf is refused and the claim is unchanged (946.3831ms)
✔ W11: the controller writes no session file; only the fake engine's own appends appear (225.315133ms)
✔ W16: a highest revision that won't parse holds the pair uncertain; the older stopped revision is not reused (93.363585ms)
✔ W17: a claim root copied from another host refuses foreign-host and promotes nothing (72.203607ms)
✔ G1: a session path or claim root under .pi/state, ~/.claude, the data root or a registration refuses at construction (3.569722ms)
✔ G2: a symlink inside the fixture root to a live session file is refused by the real-path check (1.325889ms)
✔ G3: a fixture path swapped for a live path after construction is refused at bind (1.738078ms)
✔ K1: force stop kills a tool child that called setsid; stopped with a verified proof (2794.484922ms)
✔ K2: K1 on the process-group fallback ends uncertain, never stopped (469.89623ms)
✔ K3: SIGTERM acknowledged while a member lives: stopping until the kill phase, never stopped from TERM (2644.635443ms)
✔ K4: two engines; force stop one; the other survives by independent observation (4852.089312ms)
✔ K5: a stop during a tool call leaves the effect uncertain, and it is shown (2563.661152ms)
✔ K12: a member forking in a loop: the freeze stops it, enumeration is complete, populated 0 after cgroup.kill (2494.802302ms)
✔ K13: a member writing its pid into another cgroup is refused by the namespace; the kill is complete (2746.623948ms)
✔ K15: the shim gone, engine/cgroup.events unreadable, or the engine cgroup missing: evidence unavailable, not empty; uncertain (5278.616647ms)
✔ K10: controller killed between the TERM and kill phases: restart checks the invocation ID and re-runs from TERM for the same stop (920.216881ms)
✔ K11: controller killed after the confirmation is recorded, before TERM: restart checks the invocation ID and re-runs from TERM for the same stop (750.409927ms)
✔ K14: a unit with the recorded name but another invocation ID: evidence unavailable, no signals, uncertain (590.614603ms)
✔ K6: recover without proof, without confirmation, or with changed pins is refused (984.081218ms)
✔ K7: recover after proof, then launch: new claim and execution, generation +1, same leaf; the cancelled prompt is not replayed (486.910482ms)
✔ K8: an engine that loads another leaf on resume is refused before admission; it stays claimed until a proven stop (679.003936ms)
✔ K9: an interrupt that never settles stays uncertain; force stop stays available; takeover is refused while fenced (3412.938836ms)
✔ K16: a claim from another machine ID refuses foreign-host; no boot proof is issued (36.405575ms)
✔ K17: two launcher calls with one eligibility record: one launch, the other refuses, no second engine (486.630344ms)
✔ K18: the leaf changes after eligibility: launch refused; the reservation stays until released with proof (531.704758ms)
✔ S1: `/goal x`, with leading spaces or a tab, refuses text-policy at admission; zero engine bytes (504.380237ms)
✔ S2: every prefix pinned Pi interprets is refused, from the list the code uses; the rest reach the engine exactly (217.876841ms)
✔ S3: `/goal` on the second line is pinned from the source: Pi checks only index 0, so it is admitted and sent exactly (212.438677ms)
✔ S4: a `/` left in the composer is cleared when control transfers and returns; the next submit sends only the new text (308.695737ms)
✔ S5: an observer terminal gets a paste then Enter, as send-message.sh does: not admitted: controller, nothing sent (205.567788ms)
✔ S6: a mediated-shaped registration (no tmux) passed to the board's replyToRow: 409 no tmux session; exec never runs (0.474109ms)
✔ S7: ESC, bracketed-paste markers and U+2028/U+2029 travel as one JSON string; the engine receives the exact text in one record (213.418843ms)
✔ P3: a Pi confirm, select, input or editor dialog is shown disabled with a reason and never answered (304.548788ms)
✔ E1: send, ack, user, toolCall, toolResult, final answer: shown once, no refresh, draft and reading position kept (230.67903ms)
✔ E2: U+2028, U+2029 inside JSON strings and CRLF line ends each parse as one record, on the splitter and through the controller (232.279238ms)
✔ E3: a multipart final, two blocks, null request correlation and duplicate delivery (225.911236ms)
✔ 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 (226.928276ms)
✔ E4: a gap or a new epoch also reconciles; nothing is concatenated across a gap (11.157214ms)
✔ E5: an unknown native event gives no client event; evidence records its type and bytes; the terminal count goes up (240.351129ms)
✔ E6: a tool result delayed across a pause and a reconnect is reconciled without a manual refresh (230.11528ms)
✔ E7: the terminal renders the same stream as the library client, as observer and then as controller, and submits only as controller (317.639113ms)
✔ terminal: engine control characters are made visible; a lost connection refuses submit (374.398052ms)
✔ terminal: outcome unknown is shown as such, with no resend offer, and nothing is resent (0.539984ms)
✔ terminal: text after Enter in the same input chunk starts the next message; it never joins the one submitted (0.282556ms)
✔ terminal: a paste-start marker split right after its ESC still opens the paste; the Enter inside it never submits (0.30821ms)
✔ terminal: invisible and bidi characters are made visible; head, status and notice lines stay one line (0.123271ms)
✔ every record these fixtures produced is a valid CHAT-01 record (E5: no record fails the schema) (245.322895ms)
✔ H1: two takeovers with the same expected generation: one wins, +1; the other refuses generation (559.299151ms)
✔ H2: the old controller's prompt after a takeover commits is refused with zero engine bytes (306.639949ms)
✔ H3: a takeover while a prompt holds the dispatch lock: written under the old actor, or refused; never both (864.367817ms)
✔ H4: self-takeover is refused (207.977962ms)
✔ H9: Interrupt racing a prompt's dispatch: before the write, dispatch-refused and no-turn; after, §3 rules (489.967376ms)
✔ H10: Interrupt and force stop together: one stop chain, force stop supersedes (1162.284778ms)
✔ H10: an overlap during the pause before the abort: no abort, the stop ends uncertain (400.286574ms)
✔ H10: a no-turn Interrupt lifts only its own fence; admission stays closed under force stop, overlap or revocation (854.487718ms)
✔ H11: the controller disconnects mid-turn: work continues, the claim is unchanged, control stays put (474.571479ms)
✔ H12: an exact retry after reconnecting to the same incarnation returns the same receipt; one dispatch (235.94039ms)
✔ H13: a retry with the same request ID and different text is refused (212.137643ms)
✔ H14: late stdout from the old engine after a replacement is dropped by incarnation, counted, never rendered (722.250079ms)
✔ H15: a revoked connection's command is refused; the revocation fence holds (301.681102ms)
✔ H16: a second controller for the same session refuses already-active; the first is untouched (230.452513ms)
✔ H10: a second force stop while the first escalation runs refuses fenced; one escalation, and the claim records only the first stop's phases (939.093746ms)
✔ H17: a confirmation reused, answered from another connection, or used after the stop changed is refused (959.856778ms)
✔ H18: two prompts before any native output: the second refuses busy; one engine write (363.959262ms)
✔ H19: the pipe fails mid-line under a large prompt: delivery-unknown transport-unknown, poisoned, no later write (409.106014ms)
✔ H19: the link itself never writes again after an unknown outcome, whoever calls it (0.655539ms)
✔ H19: the controller dies mid-write of a large line: after restart the outcome is unknown and nothing is resent (703.309217ms)
✔ H20: the line is written but the ack is lost when the controller dies: orphan, outcome unknown, nothing resent (603.731272ms)
✔ H21: a retry of the exact request with the old token after a crash is stale-incarnation; no second write (790.922524ms)
✔ H22: after H21 and a valid recovery, a new request with the new token is admitted (2967.111484ms)
✔ H23: requests pending at a restart are not resent; each shows outcome unknown (1706.924017ms)
✔ a plain conversation: catalogue row, one page, CHAT-01 records (7.943027ms)
✔ native entries map to blocks: tools, thinking, bash, notices, ids that do not fit (1.772943ms)
✔ F1: a malformed line is an unavailable part at its position, and reading continues (1.752425ms)
✔ F1: a missing parent stops the history with a notice that names the unreadable lines (2.556892ms)
✔ F1: an unreadable fork is never merged into another branch's history (1.541133ms)
✔ F1: a follow stays on its branch when the next entry's parent is unreadable (1.990715ms)
✔ F1: a file whose entries are all unreadable shows a notice per line (1.130976ms)
✔ F2: a truncated trailing line marks the view incomplete, not an error (1.328783ms)
✔ pagination: 100 parts, then the rest; parts concatenate to the whole branch (4.148949ms)
✔ F3: a replaced file (new inode) refuses old cursors with reconcile (7.152193ms)
✔ F4: a same-inode rewrite of the prefix refuses old cursors with reconcile (6.687027ms)
✔ F5: growth between pages keeps the epoch and the page stops at the pinned length (5.6262ms)
✔ F6: unknown, foreign and expired cursors refuse and leave the cursor usable (7.512257ms)
✔ F7: a symlinked file and a symlinked directory component are refused, never opened (8.779647ms)
✔ F8: a file swapped for a symlink after the catalogue is refused (2.496262ms)
✔ F9: registrations never add or redirect a root (1.588804ms)
✔ F10: a header cwd naming another project is refused (3.361116ms)
✔ F11: parentSession renders with a marker and the parent is never opened (0.776124ms)
✔ F12: two leaves: the default leaf is shown and the other branch reads alone (5.470116ms)
✔ F12: a follow refuses when an appended duplicate id changes the branch's earlier parts (2.272352ms)
✔ F12: a second root (Pi's resetLeaf) starts its own branch (1.350252ms)
✔ F13: compaction is a marker in place, then the retained content (0.727293ms)
✔ F14: long strings split into fragments and parts, reassemble exactly, and pages respect the byte cap (523.566064ms)
✔ fragments never cut a surrogate pair and keep an empty string (5.179993ms)
✔ F15: a Claude seat is an unsupported-harness placeholder whose directory is never read (1.677094ms)
✔ unknown conversations, empty files and non-Pi files refuse (2.369772ms)
✔ an unreadable file or root inside the roots is refused per row, not a failed catalogue (1.093831ms)
✔ a seat directory without search permission refuses that root, not the catalogue (2.100106ms)
✔ every page and cursor is a valid CHAT-01 record (804.092641ms)
✔ the engine pin holds for the installed package (1.919918ms)
✔ pinned Pi, sealed and without credentials, answers the controller's commands with the shapes the fake models (331.021752ms)
✔ pinned Pi appends thinking_level_change at start when the branch lacks one, so the leaf moves (K8 then fails closed) (275.832025ms)
✔ N25: ordinary Interrupt reconciles; a non-empty queue_update in the window is O5 (806.068343ms)
✔ N1: an extension's follow-up queued after the fence is cleared before any abort; O5, Unknown (469.189878ms)
✔ N1: a follow-up queued before the fence is O5 at once; the Interrupt refuses fenced (254.60826ms)
✔ N2: with abort first, the fake runs the external item (the ordering guard has teeth) (22.156872ms)
✔ N3: the fence lands in preflight, preflight errors, no run: failed, No run, uncertain (368.884282ms)
✔ N4: the ack arrives after the first abort and a run starts: clear and abort again; Interrupted (213.556408ms)
✔ N5: an input handler takes the prompt: ack, no run, delivery-unknown handled-without-run (331.026384ms)
✔ N6: an extension queues between clear_queue and abort: O5 and O6, Unknown (537.207506ms)
✔ N7: clear_queue times out: no abort, nativeQueue unknown, force stop still ends it (1925.400277ms)
✔ N7: clear_queue answers an error: no abort, nativeQueue unknown, the link not poisoned (258.018644ms)
✔ N8: an extension prompt starts a run during Mosaic preflight; the losing settle is O3 (378.641567ms)
✔ N9: a run that started before the fence and ends aborted: failed interrupted, Interrupted (210.25368ms)
✔ N9: decision 34: a run that ends aborted with no stop in progress: aborted-without-stop, uncertain, outcome unknown (309.741586ms)
✔ N9: an aborted that lands after the fence but before any abort is written: aborted-without-stop, Unknown (446.67773ms)
✔ N10: fake conformance (31.971148ms)
✔ N11: the run fails before any user message_start: delivery-unknown ack-without-start, never failed (474.454081ms)
✔ N12: input that starts a run after the final empty clear is O1 and not part of the stop's proof (300.784606ms)
✔ N13: agent_start with no slot held is O1; a later prompt refuses with zero engine bytes (324.956671ms)
✔ N14: the run completes while clear_queue is in flight: finished, Completed first, uncertain (414.997271ms)
✔ N14: the run completes after the abort is written, before Pi applies it: finished, never relabelled (450.246043ms)
✔ N15: the fence lands in preflight, then an input handler takes it: handled-without-run, No run (562.546304ms)
✔ N16: Interrupt with no slot and no run refuses no-turn: no stop, no bytes, admission open (274.511468ms)
✔ N17: the run fails on its own during the exchange: failed, Failed on its own (398.931267ms)
✔ N18: no final assistant message_end, or a lost line: working stays working; before working, transport-unknown (919.910026ms)
✔ N19: a losing extension prompt settles inside the Mosaic run before its user message: O3, run-overlap (662.641784ms)
✔ N20: an extension triggerTurn during Mosaic preflight starts first; while streaming it queues with no signal (582.515503ms)
✔ N21: a losing settle after the receipt settled finished is O2; the receipt stays finished (203.649783ms)
✔ N22: an agent-level custom message is dropped by the clear with no signal; evidence names the seal (225.882597ms)
✔ N23: a nextTurn message survives clear and abort and attaches to the next prompt, with no signal (213.819475ms)
✔ 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 (229.585286ms)
ℹ tests 152
ℹ suites 0
ℹ pass 152
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 52102.666518
