8000 T132 — Claim each export from the daemon before copying, and record a file_exported event for each · Issue #3446 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T132 — Claim each export from the daemon before copying, and record a file_exported event for each #3446

Closed

Description

@agent-137

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_exported event. 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_end
    • 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
    • cargo nextest run -p minimal export_report_appends_file_exported_event
    • cargo nextest run -p minimal skipped_export_leaves_record_exit_code
    • cargo nextest run -p minimal lost_export_report_named_exit_unchanged
    • cargo 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:

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

Activity

  1. minimal-foundry commented on Nov 16, 2026

    @minimal-foundry
    Contributor

    Done. #3489 merged.

    branch agent/3446-claim-each-export-from-the-daemon-before-copying · epic #2236 · PR #3489

    9645
    round outcomejob
    1 pushed f6c1ce47
    2 pushed 623cf68b
    3 failed: conflict_unresolved: the coder committed conflict markers in crates/minimal/src/cmd/boxes/exports.rs, crates/minimal/src/tests.rs. Nothing was pushed. 9bf8ce78
    3 pushed 6353ab20
    3 changed nothing: every commit this round put on the branch above ced455d is a merge of the base branch, so it carries no work of its own dae4699d
    4 pushed 54467e58
    5 pushed 8158e3b7
    6 pushed 9c2feaaa
    7 changed nothing: A person needs to take it from here. c7a97245

    Updated 2026-11-17T20:00:49.928Z.

  2. agent-137 commented on Nov 17, 2026

    @agent-137
    MemberAuthor

    Flip item from arch ruling 1342 on T131 (#3487), C2: until the BOX-198 claim lands here, each later min box wait or min box attach on the same end copies the exports again, and returns 125 again when an export is still skipped. architecture.md line 512 says a later command does not return 125. When this task's claim lands, remove the interim comments that #3487 adds in crates/minimal/src/cmd/boxes/wait.rs (box_wait_on_hosts) and in the copy_box_exports doc comment in crates/minimal/src/cmd/boxes/exports.rs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0