Repository navigation
T34 — Move the session commands into one file per verb - #2452
mitodrummer merged 3 commits into
Conversation
session.rs keeps the clap handlers. The helpers and their tests move
into cmd/boxes/{create,vm_host,attach,exec,policy,hooks,lifecycle}.rs.
There is no change in behaviour.
cmd/mod.rs mounts cmd/boxes.rs as `box_verbs` with #[path]. A `boxes`
module in cmd would shadow the `boxes` crate for the sibling files
that use `use super::*`.
|
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: no findings at Nothing to do. Clobber: none found. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The design of record does not govern how the minimal crate splits its source into files. This change moves the min session helpers and tests into one file per verb and changes no behaviour. I compared the added lines with the removed lines. The only differences are module glue, visibility, crate::attach:: paths and formatting. No condition applies.
Ruled at 15fb90d against gominimal/arch@109541a48c31 by claude-opus-5-5.
The split of cmd/session.rs moved activate_session, session_record_by, the destroy-race test and the `min stop` refusal into cmd/boxes/. The inventory and function-body tests in src/tests.rs, and the installer stop-signal test in common, read those files by path, so they failed. They now read the files the code lives in. The inventory keeps its sorted order.
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The compare since 15fb90d changes only the paths that the source-scanning tests read. Each moved function exists at its new path. Each gate classification and assertion keeps its value. The design of record does not govern the file layout of the client crate. The earlier PASS by absence stands for this head.
Ruled at 68b10c2 against gominimal/arch@109541a48c31 by claude-opus-5-5.
|
Round 1 of 10 on a failed check suite, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review.
Notes from the agent: The directive gave no log for the failed checks: the job logs could not be read. I found the cause locally. Six source-scanning tests read crates/minimal/src/cmd/session.rs by path, and the previous round moved the code they look for into cmd/boxes/. These tests are every_daemon_connection_is_classified, every_create_session_asserts_the_daemon_build, the_activation_path_makes_no_version_round_trip, both_creators_share_the_composition_failure_message and daemon_refusals_print_without_rpc_names in crates/minimal/src/tests.rs, plus installer_matches_the_message_the_cli_actually_prints in crates/common/tests/installer_stop_signal.rs. Both files are outside the task's layers. I changed only the path literals, and I moved two inventory entries to keep the sorted order. A pure move cannot pass CI without these changes, so the plan missed these two files. The installer test now reads cmd/boxes/lifecycle.rs, where the |
|
The runtime will not revise this pull request again on its own: the diff is +8133/-8036 (16169 lines), past 3x the plan's estimate of 300 lines (est: 240 code, 60 tests), at round 1 (the last trigger was a failed check suite). A person decides now. Remove |
|
/revise |
Carry main's full-breadth acknowledgement change to session.rs into boxes/create.rs, where refuse_unhonourable_grants now lives.
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The new head merges main (#2443) into the split. The merge moves the #2443 changes from session.rs to boxes/create.rs without a change to their text. All other merged files are identical to main. The design does not govern the client file layout, so the PASS by absence from the prior heads stands. There are no conditions.
Ruled at ff15aa1 against gominimal/arch@109541a48c31 by claude-opus-5-5.
|
Round 1 of 10 on a /revise note, pushed as Resolved conflicts in:
Verify Outside the task's
Converted to a draft: something above needs a person before review.
Notes from the agent: Revise round: I resolved the merge conflicts with main. In mod.rs I kept both |
mitodrummer
left a comment
There was a problem hiding this comment.
Babysit review on ff15aa1 against T34's plan block. This is a pure split: cmd/session.rs -8071 into cmd/boxes/{attach,create,exec,hooks,lifecycle,policy,vm_host}.rs, with session.rs keeping the clap handlers. After stripping whitespace, the added lines match the removed lines except for attach:: paths rewritten to crate::attach::, re-exports in cmd/boxes.rs and cmd/mod.rs, and source-path strings updated in the two scanning tests (accepted outside the layers). The merge round kept main's BEP-057 work: full_breadth_acknowledged appears 5 times on main's session.rs and 5 times in boxes/create.rs, and start_honours_full_breadth_acknowledgement moved with it.
T34 — Move the session commands into one file per verb
slice: S0
kind: enablement
covers: none
size: M
est: 240 code, 60 tests
executor: agent
difficulty: routine
model: standard
diagnostics: none: a pure move, no behaviour
observability: none: a pure move, no signal
layers:
- cli:
- crates/minimal/src/cmd/session.rs: clap handlers only
- crates/minimal/src/cmd/mod.rs: mod line
- crates/minimal/src/cmd/boxes.rs (new): one module per verb
- crates/minimal/src/cmd/boxes/create.rs (new): moved
- crates/minimal/src/cmd/boxes/vm_host.rs (new): moved
- crates/minimal/src/cmd/boxes/attach.rs (new): moved
- crates/minimal/src/cmd/boxes/exec.rs (new): moved
- crates/minimal/src/cmd/boxes/policy.rs (new): moved
- crates/minimal/src/cmd/boxes/lifecycle.rs (new): moved
- crates/minimal/src/cmd/boxes/hooks.rs (new): moved
test: cargo nextest run -p minimal host_asks_target_is_none_for_a_box_with_no_address_pair
produces:
- crates/minimal/src/cmd/boxes.rs
- crates/minimal/src/cmd/boxes/create.rs
consumes: none
proof:
min sessionbehaves as before, one file per verb.Proof
min sessionbehaves as before. session.rs now holds only the clap handlers (cmd_activate, cmd_attach, cmd_exec, cmd_session_run, cmd_session_policy, cmd_session_setup_zed, cmd_session_hooks, cmd_destroy, cmd_stop, cmd_rename). Their helpers and tests are in one file per verb under crates/minimal/src/cmd/boxes/. All 55 moved tests pass, and the minimal crate builds with no new clippy warnings.Notes from the agent: The module is mounted as
box_verbs(#[path = "boxes.rs"] mod box_verbs;in cmd/mod.rs), and each child uses#[path = "boxes/<verb>.rs"]. A module namedboxesin cmd makesboxes::...ambiguous with theboxescrate (E0659) in admin.rs, list.rs and the other siblings that useuse super::*. Those files are outside the layers. The file paths match the task. In the moved attach code,attach::becamecrate::attach::, because the newattachmodule shadows the crate'sattachmodule. session.rs keeps apub(crate) use super::box_verbs::{...}re-export, because list.rs and finalize_install.rs call these helpers assession::advisory_host_readsand similar paths. The re-export means those files did not need a change. These items becamepub(crate)because session.rs calls them: hold_box_name_with_vm_host, stop_wedged_vm_from_host, wedged_vm_unreachable, fetch_live_ingress_degrading and session_policy_as_json. attached_session_record and refuse_dynamic_ingress_off_own_ip becamepub(super)for sibling use. cmd_session_setup_zed stays in session.rs because the layers name no setup_zed file. normalize_subnets moved to create.rs, because only activation uses it. should_announce_session and session_announce_label moved to attach.rs. Extra check: all 55 tests under cmd::box_verbs passed (the count before the move was also 55). I did not runjust cior clippy-strict.Tests
cargo nextest run -p minimal host_asks_target_is_none_for_a_box_with_no_address_pairVerify
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 #2375
Undrafted 2026-10-20: the edits outside the layers (crates/minimal/src/tests.rs and crates/common/tests/installer_stop_signal.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.