M3b plan: task 11's skeleton writes run as glue over small helpers

The third attempt filled five functions, then ran out of room planning all of
run in one turn. run and run_container are now given; spawn, Io::start,
Io::finish and answer are small todo!()s. Checked fillable: 11 of 11 passed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-23 08:36:00 -07:00
co-authored by Claude Opus 5.5
parent 62d1da44d6
commit 4a1c6fa0a5
4 changed files with 98 additions and 18 deletions
+8 -5
View File
@@ -92,12 +92,15 @@ process kills the sleep and nothing keeps the pipes open.
## How to work (read this first)
Two earlier sessions on this task ended with nothing written: each tried to plan the whole file
in one turn and ran out of room while still deciding. So:
Three earlier sessions on this task ended without a commit: each tried to plan the whole file
(the third, the whole of `run`) in one turn and ran out of room while still deciding. So:
- **Start from the skeleton.** It compiles. Replace the `todo!()`s **one function at a time**, in
this order: `read_capped`, `new`, `egress_dir`, `podman`, `wait`, `run`. After each, run
`cargo check -p brokerd` and fix what it says before going on.
- **Start from the skeleton.** It compiles. `run` and `run_container` are **already written**: they
only call the helpers. Replace the `todo!()`s **one function at a time**, in this order:
`read_capped`, `new`, `egress_dir`, `podman`, `wait`, `spawn` (step 3), `Io::start` (step 4),
`Io::finish` (step 6), `answer` (step 7, the table). After each, run `cargo check -p brokerd`
and fix what it says before going on. Each helper is a few lines; none needs the others'
details beyond its signature.
- **Let the compiler answer API questions.** If you are unsure whether something compiles (how to
call the log, which trait a type has), write it and run `cargo check`. The log is called as
`(self.log)(&line)`.