Repository navigation
Closed
Labels
kind:taskA task the plan skill rendered; the body carries ## TaskA task the plan skill rendered; the body carries ## Taskmodel:strongestThe strongest model available: unknown ground, or large work that needs careThe strongest model available: unknown ground, or large work that needs caresize:M200 to 500 net lines; one PR200 to 500 net lines; one PR
Description
Task
| slice | size | difficulty | model | who | estimated lines |
|---|---|---|---|---|---|
| Retained sessions | M | needs care | strongest | an agent | 400 (250 code, 150 tests) |
A stored record holds
stoppedorexitedwith its reason, exit code and signal.
Covers:
- BOX-011
Layers:
- record:
- crates/boxes/src/lib.rs:
BoxStateholdsstoppedandexited;Recordstoresreason,exit_code,signal - crates/boxes/src/core/record.rs:
Record::state()reads the stored ending;state_is_exactly_oneoverRecord - crates/boxes/src/store.rs: persist and load the ending; an unknown
reasonloads as written cargo nextest run -p boxes record_stores_stopped_and_exited_with_their_endingcargo nextest run -p boxes unknown_reason_loads_as_written
- crates/boxes/src/lib.rs:
- callers:
- crates/minimal/src/cmd/list.rs:
min lslabelactive→running - crates/minimal/src/attach.rs: state matches
- crates/minimald/src/box_actor/setup.rs: state matches
cargo nextest run -p minimal list_labels_a_running_box_running
- crates/minimal/src/cmd/list.rs:
The residual of BOX-011 that #2632 (T52) left: T52 added the five states as a type, but no stored record can hold stopped or exited. T3 (#2390) needs this first. Its first run ended with no PR, because it couldn't meet BOX-013, BOX-018 and BOX-154 without stored endings. Store reason as an open set of values, so later reasons such as BRES's oom and gominimal/inbox#678's output-validation end need no migration. This task doesn't turn a running record with no process into stopped at restart; that's BOX-154, in T3.
Waits on:
Plan block
### T56 — Store each box's stopped and exited ending on its record
slice: S0
kind: task
covers: BOX-011
size: M
est: 250 code, 150 tests
executor: agent
difficulty: needs care
model: strongest
diagnostics: the store logs a record it loads with an unknown reason, naming it
observability: none: no new runtime signal; the ending is read by T3's stop span
layers:
- record:
- crates/boxes/src/lib.rs: BoxState holds stopped and exited; Record stores reason, exit_code, signal
- crates/boxes/src/core/record.rs: Record::state() reads the stored ending; state_is_exactly_one over Record
- crates/boxes/src/store.rs: persist and load the ending; an unknown reason loads as written
test: cargo nextest run -p boxes record_stores_stopped_and_exited_with_their_ending
test: cargo nextest run -p boxes unknown_reason_loads_as_written
- callers:
- crates/minimal/src/cmd/list.rs: min ls label active -> running
- crates/minimal/src/attach.rs: state matches
- crates/minimald/src/box_actor/setup.rs: state matches
test: cargo nextest run -p minimal list_labels_a_running_box_running
produces: none
consumes:
- crates/boxes/src/events.rs
proof: A stored record holds stopped or exited with its reason, exit code and signal.
depends on:
- blocked by #2387
Reacted by minimal-foundry
Metadata
Metadata
Assignees
Labels
kind:taskA task the plan skill rendered; the body carries ## TaskA task the plan skill rendered; the body carries ## Taskmodel:strongestThe strongest model available: unknown ground, or large work that needs careThe strongest model available: unknown ground, or large work that needs caresize:M200 to 500 net lines; one PR200 to 500 net lines; one PR
Activity
mitodrummer commentedon Oct 27, 2026
A note for whoever picks this up: store
reasonas an open set of values, not a closed enum that refuses an unknown one.Two pending specs add end reasons beyond BOX-011's table:
oom.A stored record must survive a daemon that knows a newer reason. That means deserializing an unknown
reasonwithout failing, and rendering it as written. Adding a reason should then need no migration. The[[file_exports]]copy follow-up (#2668) will add per-export status alongside, under the same rule.mitodrummer commentedon Oct 28, 2026
Folded into #2390 (T3, stop a box and keep its record): its first run couldn't meet BOX-013, BOX-018 and BOX-154 without these stored endings. T3's layers now include a
recordlayer with this issue's files (crates/boxes/src/lib.rs,core/record.rs,store.rs,min ls's label, and the state matches inattach.rsandbox_actor/setup.rs). This issue closes when T3's PR merges.[-]Store the stopped and exited states, with their endings, on every box record[/-][+]T56 — Store each box's stopped and exited ending on its record[/+]mitodrummer commentedon Oct 28, 2026
Change of plan from my last comment: the runtime refused T3 with this folded in ("task names 14 layer files, above 10: two tasks"). So this issue is now its own task, T56, under S0 (#2366), with the six files as its
recordandcallerslayers. T3 (#2390) is back to its original eight files and waits on this one.minimal-foundry commentedon Oct 28, 2026
Done. #2676 merged.
branch
agent/2634-store-each-box-s-stopped-and-exited-ending-on-it· epic #2236 · PR #267694c61a3795557aeae0e5d367Updated 2026-10-28T19:24:18.780Z.