Repository navigation
PASS_WITH_CONDITIONS
Inputs. First ruling on #3661 at e2e33053, on arch 8b824707. No since.diff, since-conditions.json, findings.json or arch-map.md is staged, so I read pr.diff whole and found the sections by search. No ruling in prior-rulings.json is on this PR, on BCLI-068, or on restart events, so no precedent applies.
Governs. architecture.md Exit codes (L376: 254 is an attach ended from the other side, the box stopped or removed), the min box restart line (L471: stop, then start, under the same record), Output conventions (L382: exited carries a reason in exit|timeout|oom|stopped, with the code or signal the record stores), and the box record paragraph (L490, L500: the event stream is minimald-authored and audit-grade, and the record's reason set is closed). Product specs read for context: BCLI-068's 254 clause, BOX-011, BOX-013, BOX-178.
Ruling. BCLI-068 conforms. The restart now announces BoxEnd::Restart to the binding and still ends the attach with 254 (L376). The daemon keeps reason = "stopped" on the record and the event, so the closed reason set holds (L382, L500). The author was right not to put restart in reason. The new stopped_by = "restart" key is minimald-authored, so the stream stays workload-unwritable (L490). The design does not list a restart marker, and it does not forbid extra data keys. So the key is admissible, but it is a new field on the published min/v1/event stream. BOX-178 says a restart records "the exited event BOX-013 states", and BOX-013 gives no such key. C1 makes the spec name it. The client side fails closed: it names a restart only when the count of ends rose and the last exited carries the key. A stopped box with unread ends keeps the stop line. Placement is correct: the stop and its event are in box_actor/host.rs, and the one line out of layers in box_actor.rs is where restart_named lives. The e2e step is hard (E2E_PTY_EXPECT_EXIT=254, one try), but it was not run, so it is open (rubric rule 4, C2).
Note, not a condition. The wire key is defined twice, as STOPPED_BY in crates/minimal/src/cmd/boxes/attach.rs and crates/minimald/src/box_actor/host.rs. boxes::events already owns shared event data keys (exec_data). An exited_data module there would keep the two sides from drifting. I cite no design line for crate placement, so I do not make this a condition.
Not checked. I did not build or run tests. The agent-verify failure (exec_run_attach_and_task_run_share_the_commands_trace) is in a test that this diff does not touch. I did not establish whether it is flaky or caused by the base merge.
Conditions
- C1: Name the new
exiteddata key in the spec. Indocs/specs/29-spec-box-local-first/29-spec-box-local-first.md, amend BOX-178 (with BOX-013 where it lists theexitedevent's data): the stop half of a restart writesstopped_by = "restart"in theexitedevent'sdata,reasonstaysstopped, and a plain stop writes nostopped_bykey. Do this in this PR, or in a separate spec PR from a filed issue that this PR's body links. Also correct the task header lineobservability: none new, because the change adds a key to themin/v1/eventstream. - C2: Run the new restart step of
attach_ends_on_stopinscripts/session-e2e.sh(just e2e) at this head on a KVM host or theci-linux-kvmlane. Add the result to the PR body's Tests table. The step must pass on its first try with exit 254 and one restart line. Do not add a retry. The proof line of the task names this leg, and it isnot_runnow (no /dev/kvm).
Ruled at e2e3305 against gominimal/arch@8b824707cde6 by claude-opus-5-5; arch_rulings 1519, job 8b5cc216-230f-43ca-944e-9f45fe074f9a.