Repository navigation
fix(minimal): T52 — A terminal exec's mode is tty everywhere - #3434
Conversation
The Live execs row and the min/v1/exec object said terminal, while the exec_started event and min box exec --tty say tty. Use tty everywhere, and pin it with exec_mode_is_one_word_in_show_and_events.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: no findings at Nothing to do. Clobber: none seen. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms to the design. Section min box line 498 requires min box show to list live execs, and the design does not give the mode word. The show row and the min/v1/exec object now say tty. That is the word the exec_started event stores and min box exec --tty takes, so one mode has one name. No conditions.
Ruled at b0e613e against gominimal/arch@15b603e6afb8 by claude-opus-5-5.
T52 — A terminal exec's mode is
ttyeverywhereslice: S4
kind: task
covers: BCLI-067, BCLI-033
size: S
est: 5 code, 35 tests
executor: agent
difficulty: routine
model: light
diagnostics: the exec row and the
min/v1/execmode sayttyin place ofterminal; exec_mode_is_one_word_in_show_and_events pins it, and the four tests listed in the issue move with itobservability: none new
layers:
- client:
- crates/minimal/src/cmd/boxes/show.rs:
exec_mode_wordnames a terminal exectty, the word its event stores andmin box exec --ttytakes- crates/minimal/src/tests.rs: the four tests that pin
terminalreadtty; a new test checks that the show row, themin/v1/execJSON and theexec_startedevent name one exec's mode aliketest: cargo nextest run -p minimal exec_mode_is_one_word_in_show_and_events
produces: none
consumes: none
proof: For an exec started with
min box exec -t,min box show,min box show -o jsonandmin box events -o jsonlall name its modetty.Proof
For an exec started with
min box exec -t, theLive execs:row ofmin box show, themodeof itsmin/v1/execobject inmin box show -o json, and thedata.modeof itsexec_startedevent inmin box events -o jsonlall saytty. Before this change, the two show forms saidterminal.Notes from the agent: The four tests that pinned
terminalnow pintty: box_show_lists_live_execs, box_show_output_json_writes_box_with_execs, exec_attach_detach_key_returns_0_exec_keeps_running and box_exec_show_logs_wait_stop_end_to_end. They pass, with the attach tests, in one filtered nextest run (23 passed). The test helper write_exec_event now takes the event mode from ExecMode::name(), the spelling the daemon writes, and does not hard-code it. The text row pads the mode to 8 columns, so a tty row reads<id> tty sh -i. cargo clippy -p minimal --all-targets and cargo fmt --check are clean.Tests
cargo nextest run -p minimal exec_mode_is_one_word_in_show_and_eventsVerify
min task run agent-verifyexited 100, so this PR is a draft.Closes #3425