Repository navigation
CONDITIONS
Governs (arch 327e1b57. The checkout has no arch-map.md, so I found the sections by search, as earlier rulings did): architecture.md Exit codes line 376 (254 is an attach ended from the other side: a stop, a removal or a PTY takeover. A detach or the entrypoint's own exit is 0). min box attach line 492 (254 after a one-line notice on stderr that names the cause). Spec docs/specs/28-spec-box-cli BCLI-068, the leg 'IF the daemon ends an attach from the other side'. No findings.json or since.diff is staged, so this is a first review of the full diff.
Ruling. The daemon half conforms and is in the right owner: box_runtime owns the host and binding messages, and box_actor tells the host before it signals the box (rule 8). I read stop_box_inner, stop_running, destroy_now (it cancels destroying immediately before stop_running), notify_remote_teardown, the Kill arm and the binding's exit path. A stop or removal ends the binding with 254, with no prompt, no 'Disconnecting' line and no detached event. The client side already names 'was stopped' and 'was removed' in attach_ending. Two items are open and have no issue (rule 6). C1: the task's client-layer proof attach_ended_by_stop_on_real_daemon_exit254 is not written, and the PR body says its test line matches nothing (rule 4). C2: a restart now also ends the attach with 254, but the client then reads running and prints 'another terminal attached'. That is a false cause against line 492. The fix needs a wire change outside this task's layers, so an issue and a declared residual are enough.
Noted, not a condition. Line 173 says stop --force 'kills immediately'. announce_end now runs before the kill and can wait up to two HOST_PROBE_TIMEOUT bounds (2 s each) on a wedged host. A healthy host answers in one round trip, and the existing probe_host already waited one bound. I do not rule this a deviation. Precedent: no entry in the ledger decides an attach end or an unwritten proof. Not checked: the runtime behaviour, because no build is allowed. The PR reports that the daemon test passed.
Conditions
- C1: Add
attach_ended_by_stop_on_real_daemon_exit254tocrates/minimal/src/tests.rsas the task's client layer states: attach through a real minimald binding, stop the box, and assert one cause line on stderr, exit 254 and no prompt text. If theminimaltest-support harness cannot launch a shell box (the 'no such package' launch the PR body names), do not leave the test line unmatched. Open an issue for that harness gap and the unproved end-to-end leg, and list it in the PR body as a residual with the issue link. The daemon teststop_while_attached_ends_binding_without_shell_exit_promptcallsannounce_enditself, so no test fails ifBoxActorstops calling it. - C2: A restart of an attached box now ends the attach with 254 (
stop_box_inner->announce_end(BoxEnd::Stop), reached fromrestart_namedincrates/minimald/src/box_actor.rs). Thenattach_ending()incrates/minimal/src/cmd/boxes/attach.rsreads the box asrunningand prints 'Detached: another terminal attached to .' That cause is false. Open an issue for this: the client cannot tell a restart from a PTY takeover, becauseBoxListingEntrycarries no field for it. List the issue as a residual in the PR body, and state the restart behaviour there. Alternatively, addBoxEnd::Restartand carry it to the client so thatattach_ending()names the restart.
Ruled at 48528f7 against gominimal/arch@327e1b57d16b by claude-opus-5-5; arch_rulings 1378, job bcbdf42e-af08-4fa4-a941-30f71018a638.