Skip to content

T41 — Split the box manager's tests and handle into their own files - #2454

Merged
mitodrummer merged 1 commit into
mainfrom
agent/2379-split-the-box-manager-s-tests-and-handle-into-th
Oct 20, 2026
Merged

mitodrummer merged 1 commit into
mainfrom
agent/2379-split-the-box-manager-s-tests-and-handle-into-th

Conversation

@minimal-foundry

Copy link
Copy Markdown
Contributor

T41 — Split the box manager's tests and handle into their own files

slice: S0
kind: enablement
covers: none
size: S
est: 120 code, 60 tests
executor: agent
difficulty: routine
model: light
diagnostics: none: a pure move, no behaviour
observability: none: a pure move, no signal
layers:
- manager:
- crates/minimald/src/box_manager.rs: mod tests;, handle out
- crates/minimald/src/box_manager/tests.rs (new): moved
- crates/minimald/src/box_manager/handle.rs (new): moved
test: cargo nextest run -p minimald destroy_removes_a_non_running_session
produces: none
consumes: none
proof: The manager behaves as before, tests split out.

Proof

box_manager.rs is now about 1,600 lines in place of 3,537. Its tests are in box_manager/tests.rs and its handle types are in box_manager/handle.rs. All 44 box_manager tests pass unchanged, so the manager behaves as before.

Notes from the agent: This is a pure move. BoxManagerHandle, WeakBoxManagerHandle and BoxControl are re-exported from box_manager with pub use, so callers keep their paths. Their fields are now pub(super), because the manager actor builds and reads them. The common::SpecHash and HashSet imports moved from box_manager.rs into handle.rs and tests.rs. Intra-doc links in handle.rs to BoxManager now use explicit super:: targets. I also ran cargo nextest run -p minimald box_manager:: once as an extra check: 44 passed. The clippy warnings that remain are in files this task did not touch (box_runtime.rs, net/switch.rs, minimald-rpc).

Tests

line exit tail
cargo nextest run -p minimald destroy_removes_a_non_running_session 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-fdec... Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling paths v0.0.1 (/workbench/crates/paths) Compiling stdlib v0.0.22 (/workbenc

Verify

min task run agent-verify exited 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.

the sandbox ran rustc (1.98.1), the repository pins 1.97.0 in rust-toolchain.toml; a failure here may be the newer toolchain's, not this change's
Applying loadouts: default
Running task runtime-implement-verify in session task-runtime-implement-verify-9d28...
    Checking args v0.0.1 (/workbench/crates/args)
    Checking ot v0.0.1 (/workbench/crates/ot)
    Checking paths v0.0.1 (/workbench/crates/paths)
   Compiling stdlib v0.0.22 (/workbench/crates/stdlib)
   Compiling version v0.8.0 (/workbench/crates/version)
    Checking common v0.0.1 (/workbench/crates/common)
    Checking diagnostics v0.0.1 (/workbench/crates/diagnostics)
    Checking async-dialog v0.0.1 (/workbench/crates/async-dialog)
    Checking boxes v0.0.1 (/workbench/crates/boxes)
    Checking sandbox v0.0.1 (/workbench/crates/sandbox)
    Checking switch v0.0.1 (/workbench/crates/switch)
    Checking mlog v0.0.1 (/workbench/crates/mlog)
    Checking mfile v0.0.1 (/workbench/crates/mfile)
    Checking minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
    Checking checkouts v0.0.1 (/workbench/crates/checkouts)
    Checking decode v0.0.1 (/workbench/crates/decode)
    Checking graph v0.0.1 (/workbench/crates/graph)
    Checking lcache v0.0.1 (/workbench/crates/lcache)
    Checking rcache v0.0.1 (/workbench/crates/rcache)
error: using `chunks_exact` with a constant chunk size
   --> crates/minimald-rpc/src/trace.rs:199:46
    |
199 |     for (byte, pair) in out.iter_mut().zip(s.chunks_exact(2)) {
    |                                              ^^^^^^^^^^^^^^^
    |
help: consider using `as_chunks::<2>()` instead
   --> crates/minimald-rpc/src/trace.rs:199:46
    |
199 |     for (byte, pair) in out.iter_mut().zip(s.chunks_exact(2)) {
    |                                              ^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#chunks_exact_to_as_chunks
    = note: `-D clippy::chunks-exact-to-as-chunks` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::chunks_exact_to_as_chunks)]`

error: could not compile `minimald-rpc` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

Closes #2379

Move the test module to box_manager/tests.rs and the handle types
(BoxManagerHandle, WeakBoxManagerHandle, BoxControl) to
box_manager/handle.rs. The handles are re-exported at the old path.
No behaviour change.
@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 760ec76b-fdbc-46b5-88c1-ebe6e5f48799

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@minimal-foundry

minimal-foundry Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Approved: no findings at 2e4ae773f780.

Nothing to do.

Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it.

Clobber: none seen.

@minimal-arch minimal-arch Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arch-review: PASS · the full ruling

This change moves the box manager's tests and handle types into box_manager/tests.rs and box_manager/handle.rs. The code stays in the same module and crate, and the change does not change behaviour. The design of record does not govern the module layout in minimald, so this is a PASS by absence. It follows the rulings on #2453 and #2452.

Ruled at 2e4ae77 against gominimal/arch@109541a48c31 by claude-opus-5-5.

@minimal-foundry minimal-foundry Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approved

Verdict APPROVE — No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 20, 2026
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a failed check suite: the coder changed nothing. Revise round 1: I made no change. The directive names two failed checks, ci-macos-success and e2e, but the runtime could not read either job log (token mint refused, HTTP 422). So I had no failure text to act on. I checked the move against the parent commit. A line-sorted diff of the old box_manager.rs against the three new files shows only the expected changes: the mod and use lines, pub(super) on the handle fields, super:: paths in doc links and calls, rustfmt line joins, and one added #[cfg(target_os = "linux")] on the RwLock import in handle.rs. That import matches the linux-gated field that uses it. Every cfg gate is kept, and the tests module is still #[cfg(test)]. On Linux, cargo clippy -p minimald --all-targets gives no warnings in the box_manager files, cargo fmt --check is clean, and the test line passes. minimald does not build natively on macOS (AGENTS.md platform matrix), so this move is not a likely cause of the macOS lane failure. I was not able to run the ma…[truncated]

@mitodrummer mitodrummer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Babysit review on 2e4ae77 against T41's plan block. This is a pure move: box_manager.rs -1950, box_manager/handle.rs +445, box_manager/tests.rs +1512. After stripping whitespace, the added lines match the removed lines except for import regrouping, pub(super) on the handle fields, doc links re-pathed to super::BoxManager, and rustfmt rewrapping. No logic changed. The macOS e2e is a runner rerun that affects every PR in the walk.

@mitodrummer
mitodrummer added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit abeb005 Oct 20, 2026
42 of 44 checks passed
@mitodrummer
mitodrummer deleted the agent/2379-split-the-box-manager-s-tests-and-handle-into-th branch October 20, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T41 — Split the box manager's tests and handle into their own files

1 participant