Repository navigation
Closed
Description
Task
| slice | size | difficulty | model | who | estimated lines |
|---|---|---|---|---|---|
| Tasks leave exited boxes | L | needs care | strongest | an agent | 560 (260 code, 300 tests) |
Before it copies, a waiting command claims the end's exports from the daemon. The daemon grants each export once, records the claim, and refuses the rest. After the copy the client reports each export, and the daemon appends a
file_exportedevent. A claim whose command loses its connection before reporting is released, and the record keeps the entrypoint's exit code.
Covers:
- BOX-195
- BOX-197
- BOX-198
- BOX-200
- BOX-201
- BOX-202
Layers:
- rpc:
- crates/minimald-rpc/src/lib.rs: the claim request and reply, and the export report
- daemon:
- crates/minimald/src/rpc.rs: serve the claim and the report
- crates/minimald/src/box_manager.rs: grant each export of an end once, record the claim, release unreported exports when the claiming connection ends (BOX-202), append
file_exported(BOX-195) - crates/minimald/src/box_manager/tests.rs: tests
cargo nextest run -p minimald export_claim_granted_once_for_each_endcargo nextest run -p minimald export_claim_released_for_unreported_exports_on_disconnect
- client:
- crates/minimal/src/cmd/boxes/exports.rs: claim before copying, copy only granted exports, report each, stop copying when the connection ends
- crates/minimal/src/tests.rs: tests
cargo nextest run -p minimal export_report_appends_file_exported_eventcargo nextest run -p minimal skipped_export_leaves_record_exit_codecargo nextest run -p minimal lost_export_report_named_exit_unchangedcargo nextest run -p minimal refused_export_claim_copies_nothing
export_claim_released_for_unreported_exports_on_disconnect also checks that a disconnected client cannot replace a later command's output.
User-facing text.
The box's record may not hold an entry for export <path>: the report to minimald could not be confirmed.(BOX-200)Export <path> of box <box> was not copied here: another command claimed it.(BOX-201)
The tests above pin both lines.
Owner decisions this task follows:
- gominimal/arch#180 ruling of 2026-11-13, which gominimal/arch#181 lands, and the in-session decisions of 2026-11-13 and 2026-11-14, merged into spec 29 by docs(specs): copy a task's declared file_exports back on the client (spec 29) #3376 as BOX-185 to BOX-204.
- In-session on 2026-11-14: Copy a task's declared [[file_exports]] back to the project when it ends #2668 is four tasks under S2, T130 to T133.
Plan block
### T132 — Claim each export from the daemon before copying, and record a file_exported event for each
slice: S2
kind: task
covers: BOX-195, BOX-197, BOX-198, BOX-200, BOX-201, BOX-202
size: L
est: 260 code, 300 tests
executor: agent
difficulty: needs care
model: strongest
diagnostics: each skipped or refused export is named on stderr with its path
observability: the box's record carries a file_exported event for each export
layers:
- rpc:
- crates/minimald-rpc/src/lib.rs: the claim request and reply, and the export report
- daemon:
- crates/minimald/src/rpc.rs: serve the claim and the report
- crates/minimald/src/box_manager.rs: grant each export of an end once, record the claim, release unreported exports when the claiming connection ends (BOX-202), append `file_exported` (BOX-195)
- crates/minimald/src/box_manager/tests.rs: tests
test: cargo nextest run -p minimald export_claim_granted_once_for_each_end
test: cargo nextest run -p minimald export_claim_released_for_unreported_exports_on_disconnect
- client:
- crates/minimal/src/cmd/boxes/exports.rs: claim before copying, copy only granted exports, report each, stop copying when the connection ends
- crates/minimal/src/tests.rs: tests
test: cargo nextest run -p minimal export_report_appends_file_exported_event
test: cargo nextest run -p minimal skipped_export_leaves_record_exit_code
test: cargo nextest run -p minimal lost_export_report_named_exit_unchanged
test: cargo nextest run -p minimal refused_export_claim_copies_nothing
produces: none
consumes:
- crates/minimal/src/cmd/boxes/exports.rs
proof: two commands wait on one task box's end, and each export is copied once; a command killed mid-copy leaves its unreported exports to the next wait; the record holds a file_exported event per export and the entrypoint's exit code.
depends on:
- blocked by #3444
Reacted by minimal-foundry
Metadata
Metadata
Assignees
Labels
No labels
Activity
minimal-foundry commentedon Nov 16, 2026
Done. #3489 merged.
branch
agent/3446-claim-each-export-from-the-daemon-before-copying· epic #2236 · PR #3489f6c1ce47623cf68b9bf8ce786353ab20dae4699d54467e588158e3b79c2feaaac7a97245Updated 2026-11-17T20:00:49.928Z.
agent-137 commentedon Nov 17, 2026
Flip item from arch ruling 1342 on T131 (#3487), C2: until the BOX-198 claim lands here, each later
min box waitormin box attachon the same end copies the exports again, and returns 125 again when an export is still skipped.architecture.mdline 512 says a later command does not return 125. When this task's claim lands, remove the interim comments that #3487 adds incrates/minimal/src/cmd/boxes/wait.rs(box_wait_on_hosts) and in thecopy_box_exportsdoc comment incrates/minimal/src/cmd/boxes/exports.rs.docs(minimal): state the interim exit 125 on a later wait or attach
feat(minimal): T131 — Skip and name each export that cannot be copied…