Repository navigation
T38 — Split the box actor into files by concern - #2453
Conversation
Move naming, ports, setup, attach, host, launcher and handle code out of box_actor.rs into box_actor/ submodules. box_actor.rs keeps the actor type, its messages and its loop. No behaviour changes.
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
Approved: every review thread resolved at @mitodrummer resolved the last thread, which releases the approval this review had withheld. Nothing to do. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
This change moves code inside crates/minimald and does not change behaviour. The design of record does not specify the internal module layout of minimald, so this is a PASS by absence. A line comparison of the diff shows that only visibility, rustfmt wrapping and module scaffolding changed. The refusal guard at crates/minimal/src/tests.rs line 1844 no longer scans the moved refusal strings. That guard is not a design matter, but file an issue for it.
Ruled at 4c79ac7 against gominimal/arch@109541a48c31 by claude-opus-5-5.
The box actor split moved the refusal strings into box_actor/ files, so the guard read only box_actor.rs and stopped checking them. Scan box_actor.rs and each box_actor/*.rs file except kind.rs and tests.rs, and update the kind.rs comment to match.
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The compare since the PASS on 4c79ac7 changes only the refusal guard test and one comment. The guard now scans every box_actor/ file except kind.rs and tests.rs, and it fails if the directory moves. The design does not govern this layout, so this is a PASS by absence. The earlier PASS stands for the moved code.
Ruled at e8e7de5 against gominimal/arch@109541a48c31 by claude-opus-5-5.
|
Round 1 of 10 on the runtime's review findings, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
The box actor behaves as before and is split by concern into box_actor/ files. The daemon refusal guard again checks the moved refusal strings, because it now scans box_actor.rs and every box_actor/*.rs file except kind.rs and tests.rs. Notes from the agent: This round touched crates/minimal/src/tests.rs, which is outside the task's layers. The split moved the attach and finalize refusal strings out of box_actor.rs, so the guard test daemon_refusals_print_without_rpc_names no longer read them. The task did not name the guard file, but the move broke the guard, so the fix belongs with the move. A temporary string literal "CreateSession" in box_actor/attach.rs made the updated guard fail, which confirms it reads the new files. That mutation was reverted before the commit. |
|
The runtime will not revise this pull request again on its own: the diff is +5535/-5452 (10987 lines), past 3x the plan's estimate of 360 lines (est: 300 code, 60 tests), at round 1 (the last trigger was the runtime's review findings). A person decides now. Remove |
|
/revise |
|
Round 1 of 10 on a /revise note: the coder changed nothing. Revise round 1 had no note, no unresolved threads and no failing checks. The merge of origin/main (9528bbcd) did not touch any box_actor file and left no conflict markers. The answered thread PRRT_kwDOPdfcxM6uXWCp was fixed in e8e7de5, so its verdict did not change. This round adds no commit. |
mitodrummer
left a comment
There was a problem hiding this comment.
Babysit review on e8e7de5 against T38's plan block. This is a pure split: box_actor.rs -5412 into attach, handle, host, launcher, naming, ports and setup. After stripping whitespace, the added lines match the removed lines except for mod and use lines, pub(super) where the split needs it, super::naming:: paths in box_actor/tests.rs, and rustfmt rewrapping. The one edit outside the layers (crates/minimal/src/tests.rs) widens the refusal guard to the new module files. A maintainer accepted it.
There was a problem hiding this comment.
minimal-review — approved
Verdict APPROVE — every review thread is resolved; @mitodrummer closed the last one. The review of e8e7de5543ab withheld this approval on the threads open then. Posted as a comment: the App cannot approve its own pull request; the check and the label carry it.
T38 — Split the box actor into files by concern
slice: S0
kind: enablement
covers: none
size: M
est: 300 code, 60 tests
executor: agent
difficulty: routine
model: standard
diagnostics: none: a pure move, no behaviour
observability: none: a pure move, no signal
layers:
- actor:
- crates/minimald/src/box_actor.rs: actor type and loop only
- crates/minimald/src/box_actor/naming.rs (new): moved
- crates/minimald/src/box_actor/ports.rs (new): moved
- crates/minimald/src/box_actor/setup.rs (new): moved
- crates/minimald/src/box_actor/attach.rs (new): moved
- crates/minimald/src/box_actor/host.rs (new): moved
- crates/minimald/src/box_actor/launcher.rs (new): moved
- crates/minimald/src/box_actor/handle.rs (new): moved
- crates/minimald/src/box_actor/tests.rs: imports from new modules
test: cargo nextest run -p minimald stopping_a_wedged_host_detaches_its_loop_instead_of_parking
produces: none
consumes: none
proof: The actor behaves as before, split by concern.
Proof
box_actor.rs now holds only the actor type, its messages, assemble/run/mainloop/handle_message/paths and the test seams (about 1450 lines, down from 6864). Hostname and loopback naming, port expose and ask handling, setup and finalize, attach, host launch and teardown, the session launcher, and BoxHandle/WeakBoxHandle each live in their own box_actor/ file. The actor behaves as before: every item moved verbatim, and the wedged-host test passes.
Notes from the agent: This is a pure move. Each moved item keeps its doc comments and attributes byte for byte. The only edits are visibility: moved private items and methods became pub(super), plus the PendingAsk fields and the BoxHandle/WeakBoxHandle tuple fields. box_actor.rs re-exports the new modules with globs, as it already did for helpers, so every crate::box_actor:: path still resolves. naming has no re-export because nothing outside it uses its free function. In tests.rs, the calls to promote_interim_to_hand now go through super::naming. clippy -p minimald --all-targets is clean for these files, and cargo fmt --check passes. The remaining warnings are in box_runtime.rs, net/switch.rs and minimald-rpc, and they were there before this change. Follow-up, outside this task's layers: the refusal guard in crates/minimal/src/tests.rs (around line 1844) reads only minimald/src/box_actor.rs. The attach and finalize refusal strings are now in box_actor/attach.rs and box_actor/setup.rs, so the guard no longer scans them. Today no string in the new files names a guarded RPC, but the guard needs to read box_actor/*.rs as well. Also, log targets now carry a submodule suffix such as minimald::box_actor::host. RUST_LOG filters on minimald::box_actor, as scripts/session-e2e.sh uses, still match them because the filter matches by prefix. I did not run the whole crate suite.
Tests
cargo nextest run -p minimald stopping_a_wedged_host_detaches_its_loop_instead_of_parkingVerify
min task run agent-verifyexited 101 under rustc 1.98.1, which the repository does not pin (1.97.0 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.Closes #2377
Undrafted 2026-10-20: the edits outside the layers (crates/minimal/src/tests.rs) update source-scanning tests that name the moved files by path. The move needs them, and the plan missed them. A maintainer accepted them.