Skip to content

T51 — Move the exec and RPC-crate tests into their own files - #2451

Merged
norrietaylor merged 8 commits into
mainfrom
agent/2376-move-the-exec-and-rpc-crate-tests-into-their-own
Oct 20, 2026
Merged

norrietaylor merged 8 commits into
mainfrom
agent/2376-move-the-exec-and-rpc-crate-tests-into-their-own

Conversation

@minimal-foundry

@minimal-foundry minimal-foundry Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

T51 — Move the exec and RPC-crate tests into their own files

slice: S0
kind: enablement
covers: none
size: M
est: 100 code, 120 tests
executor: agent
difficulty: routine
model: standard
diagnostics: none: a pure move, no behaviour
observability: none: a pure move, no signal
layers:
- exec:
- crates/minimald/src/exec.rs: mod tests
- crates/minimald/src/exec/tests.rs (new): moved
test: cargo nextest run -p minimald without_an_exporter_nothing_is_recorded
- wire:
- crates/minimald-rpc/src/lib.rs: mod tests
- crates/minimald-rpc/src/tests.rs (new): moved
test: cargo nextest run -p minimald-rpc package_check_skipped_is_omitted_when_false
produces: none
consumes: none
proof: Exec and wire tests pass from their own files.

Proof

The exec unit tests now live in crates/minimald/src/exec/tests.rs and the minimald-rpc unit tests in crates/minimald-rpc/src/tests.rs. Both crates compile and the named tests pass from there. exec.rs and lib.rs now hold only mod tests;.

Notes from the agent: This is a pure move. Each body was dedented by four spaces, and then rustfmt reflowed the lines that the dedent made shorter. No test changed. The four-space dedent changes only whitespace inside some multi-line JSON raw strings in the rpc tests. That whitespace is not significant to the parser. The #[cfg(test)] and #[expect(clippy::disallowed_methods)] attributes stay on the mod tests; declaration in exec.rs. nextest lists 41 tests under exec::tests, the same count as the original module. The minimald test line names without_an_exporter_nothing_is_recorded. That test is in exec::box_traceparent_tests, not in exec::tests, and the layer note names only mod tests. So box_traceparent_tests, trace_tests and the pub(crate) testing helper module stay inline in exec.rs. Moving them is follow-up work if the plan wants it. clippy -p minimald -p minimald-rpc --all-targets shows no warning in the touched files. Its warnings are in box_runtime.rs, net/switch.rs and minimald-rpc trace.rs, and they were there before this change.

Tests

line exit tail
cargo nextest run -p minimald without_an_exporter_nothing_is_recorded 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-32af... 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
cargo nextest run -p minimald-rpc package_check_skipped_is_omitted_when_false 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-9811... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling paths v0.0.1 (/workbench/crates/paths) Compiling common v0.0.1 (/workbench

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-765e...
    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 diagnostics v0.0.1 (/workbench/crates/diagnostics)
    Checking common v0.0.1 (/workbench/crates/common)
    Checking async-dialog v0.0.1 (/workbench/crates/async-dialog)
    Checking switch v0.0.1 (/workbench/crates/switch)
    Checking boxes v0.0.1 (/workbench/crates/boxes)
    Checking sandbox v0.0.1 (/workbench/crates/sandbox)
    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 decode v0.0.1 (/workbench/crates/decode)
    Checking checkouts v0.0.1 (/workbench/crates/checkouts)
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 test) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `minimald-rpc` (lib) due to 1 previous error

Closes #2376


Undrafted 2026-10-20. The edit outside the layers, crates/minimald/src/traced.rs, is one a maintainer chose. The no_direct_tokio_spawn_blocking scan now skips module tests.rs files, so the exec tests stay a pure move with tokio::spawn. No test changed. The local clippy failure (chunks_exact_to_as_chunks in minimald-rpc/src/trace.rs) comes from the sandbox's rustc 1.98.1 against the pinned 1.97.0, and the CI lane on the pinned toolchain decides.

A pure move: the tests module body moves out of lib.rs unchanged,
apart from the dedent and the rustfmt reflow it allows.
A pure move: the exec tests module body moves out of exec.rs
unchanged, apart from the dedent and the rustfmt reflow it allows.
@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: d70308fb-0386-4cdb-b06c-c52f713c2166

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

Reviewed: 1 finding, none blocking at 83a16281732d.

Address the comments on the diff.

Clobber: none seen.

@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: this round adds no commits. The directive gave no failure text, because the runtime could not read the job logs (token mint refused, HTTP 422). I found no defect in the two commits on the branch. (1) A whitespace-insensitive word diff of each old tests module against its new file shows only rustfmt reflows. The function names and their order are identical, and the test attribute counts match (exec 50, minimald-rpc 39). (2) Both test lines pass, the full minimald-rpc suite passes, and every exec:: test passes under the ci nextest profile. cargo fmt --check is clean. (3) Clippy with -D warnings fails on this box in two files this task does not touch: crates/minimald-rpc/src/trace.rs (chunks_exact_to_as_chunks) and crates/minimald/src/box_runtime.rs (result_unit_err, 3 sites). The box has rustc 1.98.1, but rust-toolchain.toml pins 1.97.0, so these lints are likely new in 1.98 and absent in CI. With those two lints allowed, clippy is clean. (4) exec::tests::end_…[truncated]

@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 2 of 10 on a failed check suite: the coder changed nothing. Revise round 2: no change made. The directive lists four failed checks (ci-macos-success, e2e, ci-linux-native-success, tests), but every job log was unreadable (token mint refused), so no failure text was available. I could not reproduce a failure locally. cargo fmt --check -p minimald -p minimald-rpc exits 0. cargo nextest run -p minimald exec:: passes 50 of 50. cargo nextest run -p minimald-rpc passes 71 of 71. The #[test] count is unchanged against origin/main (exec 50, rpc 39). cargo clippy -p minimald -p minimald-rpc --all-targets --locked -- -D warnings is clean, except for lints that this box's rustc 1.98.1 adds and that the pinned 1.97.0 does not have: clippy::chunks_exact_to_as_chunks in minimald-rpc/src/trace.rs and clippy::result_unit_err in minimald/src/box_runtime.rs. Neither file is touched by this branch. rustup is not installed here, so I could not run the pinned toolchain. A pure move of test code does not change the e2e path, so the e2e failure is most li…[truncated]

@norrietaylor

Copy link
Copy Markdown
Member

/revise The tests check (CI Linux native) fails on minimald traced::tests::no_direct_tokio_spawn_blocking (crates/minimald/src/traced.rs:661). Moving the exec tests out of the inline mod tests into crates/minimald/src/exec/tests.rs means the scanner no longer exempts them:

use crate::traced::{spawn, spawn_detached, spawn_blocking} instead:
crates/minimald/src/exec/tests.rs:646: let bridge_task = tokio::spawn(async move {
crates/minimald/src/exec/tests.rs:660: let feeder = tokio::spawn(async move {
crates/minimald/src/exec/tests.rs:667: let reader = tokio::spawn(async move {
crates/minimald/src/exec/tests.rs:741: let bridge_task = tokio::spawn(async move {
crates/minimald/src/exec/tests.rs:756: let feeder = tokio::spawn(async move {
crates/minimald/src/exec/tests.rs:759: let reader = tokio::spawn(async move {
crates/minimald/src/exec/tests.rs:804: let feeder = tokio::spawn(async move {
crates/minimald/src/exec/tests.rs:808: let bridge_task = tokio::spawn(async move {

Replace those tokio::spawn calls with crate::traced::spawn, keeping the behaviour the same, and confirm with cargo nextest run -p minimald traced::tests::no_direct_tokio_spawn_blocking plus the exec tests. Ignore the macOS e2e failure: it was a leaked gvproxy on the self-hosted runner (port 7654), now cleared and being rerun.

@norrietaylor

Copy link
Copy Markdown
Member

/arch-review

@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 exec and minimald-rpc unit tests into their own files and changes no behaviour. I compared the old and new bodies. They are identical, except for whitespace and rustfmt trailing commas. The design does not govern where a crate keeps its unit tests. So this is a PASS by absence, the same as #2454 and #2455.

Ruled at 03fd72b against gominimal/arch@109541a48c31 by claude-opus-5-5.

@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Revise round 2 ran against ci-macos-success, e2e, ci-linux-native-success, tests and left it red; a coder round cannot clear it, a person should look. No round was started for the failed suite on 03fd72bc6097.

The moved exec tests now sit outside an inline cfg(test) module, so the
no_direct_tokio_spawn_blocking scanner checks them. Use
crate::traced::spawn in place of tokio::spawn.

@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

The design of record does not govern where a crate keeps its unit tests. This is a PASS by absence, the same as the ruling on the earlier head of this PR. The new commit changes tokio::spawn to crate::traced::spawn in the moved exec tests. The guard stays unchanged. The merge from main resolved no conflicts by hand. Update the PR body: it says no test changed, and three tests now use a different spawn call.

Ruled at 95cfc4e 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 — advisory review

Verdict COMMENT — 1 finding, 1 inline.

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

Comment thread crates/minimald/src/exec/tests.rs Resolved
@minimal-foundry minimal-foundry Bot removed the review:approved minimal-review approved the current head label Oct 20, 2026
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 3 of 10 on a /revise note, pushed as 95cfc4ed9dba.

line exit tail
cargo nextest run -p minimald without_an_exporter_nothing_is_recorded 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-6f59... 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
cargo nextest run -p minimald-rpc package_check_skipped_is_omitted_when_false 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-a1e7... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling paths v0.0.1 (/workbench/crates/paths) Compiling common v0.0.1 (/workbench

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.

v0.11.0
    Checking ed25519-dalek v3.0.0
    Checking generic-array v0.14.7
    Checking sha3 v0.11.0
    Checking p521 v0.14.0
    Checking p384 v0.14.0
    Checking p256 v0.14.0
    Checking module-lattice v0.2.3
    Checking kem v0.3.0
    Checking object v0.40.0
    Checking tinyvec_macros v0.1.1
    Checking sponge-cursor v0.1.0
    Checking hashbrown v0.14.5
    Checking data-encoding v2.11.1
    Checking constcat v0.6.1
    Checking dashmap v6.2.1
    Checking sha3 v0.12.0
    Checking tinyvec v1.12.0
    Checking checkouts v0.0.1 (/workbench/crates/checkouts)
    Checking decode v0.0.1 (/workbench/crates/decode)
    Checking ml-kem v0.3.2
    Checking ssh-key v0.7.0-rc.11
    Checking generic-array v1.4.4
    Checking async-compression v0.4.50
    Checking russh-cryptovec v0.62.0
    Checking vsock v0.5.4
    Checking vte v0.15.0
    Checking async-tar v0.6.1
    Checking num-bigint v0.5.1
    Checking russh-util v0.52.0
    Checking serde_bytes v0.11.19
    Checking hex-literal v1.1.0
    Checking diagnostics v0.0.1 (/workbench/crates/diagnostics)
    Checking russh-sftp v2.4.0
    Checking russh v0.63.3
    Checking vt100 v0.16.2 (https://github.com/gominimal/vt100-rust.git?rev=9b8cce5a6798daf061948259ebcb073bb1ea54a6#9b8cce5a)
    Checking tokio-vsock v0.7.2
    Checking hickory-proto v0.26.3
    Checking minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
    Checking graph v0.0.1 (/workbench/crates/graph)
    Checking clap_complete v4.6.11
    Checking async-dialog v0.0.1 (/workbench/crates/async-dialog)
    Checking wait-timeout v0.2.1
    Checking sysinfo v0.39.6
    Checking switch v0.0.1 (/workbench/crates/switch)
    Checking quick-error v1.2.3
    Checking bit-vec v0.8.0
    Checking rusty-fork v0.3.1
    Checking bit-set v0.8.0
    Checking rand_xorshift v0.4.0
    Checking unarray v0.1.4
    Checking serial_test v4.0.1
    Checking proptest v1.11.0
    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...
error: could not compile `minimald-rpc` (lib test) due to 1 previous error

The exec tests in crates/minimald/src/exec/tests.rs and the wire tests in crates/minimald-rpc/src/tests.rs pass from their own files, and the no_direct_tokio_spawn_blocking scanner passes with them.

Notes from the agent: Revise round 3: replaced the eight tokio::spawn calls in exec/tests.rs with crate::traced::spawn. traced::spawn wraps tokio::spawn and only instruments the future with the current span, so test behaviour is the same. The macOS e2e failure was ignored, as the directive said. The minimald test run used one nextest invocation with three filters, not the test line alone.

@minimal-foundry minimal-foundry Bot added the needs-human An agent handed off; a human must act, then clear this label. Set by defer and handoffs. label Oct 20, 2026
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

The runtime will not revise this pull request again on its own: the diff is +4031/-4046 (8077 lines), past 3x the plan's estimate of 220 lines (est: 100 code, 120 tests), at round 3 (the last trigger was a /revise note). A person decides now. Remove needs-human from this pull request to let /revise <note> or the automatic rounds resume, or finish #2376 by hand.

@mitodrummer mitodrummer removed the needs-human An agent handed off; a human must act, then clear this label. Set by defer and handoffs. label Oct 20, 2026
@mitodrummer

Copy link
Copy Markdown
Member

/revise clippy (CI Linux native) fails on head 95cfc4e with one error:

error: this lint expectation is unfulfilled
  --> crates/minimald/src/exec.rs:2875:5
error: could not compile `minimald` (lib test) due to 1 previous error

crates/minimald/src/exec.rs:2873-2877 puts #[expect(clippy::disallowed_methods, reason = "upstream's tests spawn plain tokio tasks; …")] on mod tests;. Round 3 replaced every tokio::spawn in crates/minimald/src/exec/tests.rs with crate::traced::spawn, so the module no longer calls a disallowed method and the expectation is unfulfilled.

Remove that #[expect(...)] attribute from the mod tests; declaration and keep #[cfg(test)]. Do not change it to #[allow], and do not bring back tokio::spawn. The traced::tests::no_direct_tokio_spawn_blocking scan must stay green. Run cargo clippy -p minimald --all-targets and cargo nextest run -p minimald traced::tests::no_direct_tokio_spawn_blocking before you push.

The macOS e2e failure on this head is the self-hosted runner (VM integration harnesses, exit 100) and is red on every PR in this walk. It is not this change. Do not act on it.

The moved exec tests spawn through crate::traced::spawn, so no
disallowed method remains and the expect fails clippy -D warnings.

@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

The new commit removes the #[expect(clippy::disallowed_methods)] from the exec mod tests; declaration. The parent commit moved those tests to crate::traced::spawn, so the expect was not fulfilled. The design of record says nothing about test layout or lint attributes. The earlier PASS by absence on this PR stands, and this head passes too. There are no conditions.

Ruled at abf7437 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 — advisory review

Verdict COMMENT — 1 finding, 1 inline.

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

Comment thread crates/minimald/src/exec/tests.rs Resolved
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a /revise note, pushed as abf74374d486.

line exit tail
cargo nextest run -p minimald without_an_exporter_nothing_is_recorded 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-2b4f... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling paths v0.0.1 (/workbench/crates/paths) Compiling stdlib v0.0.22 (/workbenc
cargo nextest run -p minimald-rpc package_check_skipped_is_omitted_when_false 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-7c41... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling paths v0.0.1 (/workbench/crates/paths) Compiling common v0.0.1 (/workbench

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-805c...
    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 diagnostics v0.0.1 (/workbench/crates/diagnostics)
    Checking common v0.0.1 (/workbench/crates/common)
    Checking async-dialog v0.0.1 (/workbench/crates/async-dialog)
    Checking switch v0.0.1 (/workbench/crates/switch)
    Checking boxes v0.0.1 (/workbench/crates/boxes)
    Checking sandbox v0.0.1 (/workbench/crates/sandbox)
    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 decode v0.0.1 (/workbench/crates/decode)
    Checking checkouts v0.0.1 (/workbench/crates/checkouts)
    Checking graph v0.0.1 (/workbench/crates/graph)
    Checking lcache v0.0.1 (/workbench/crates/lcache)
    Checking rcache v0.0.1 (/workbench/crates/rcache)
    Checking op v0.0.1 (/workbench/crates/op)
    Checking orchestrator v0.0.1 (/workbench/crates/orchestrator)
    Checking check v0.0.1 (/workbench/crates/check)
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...
error: could not compile `minimald-rpc` (lib test) due to 1 previous error

Review threads the coder judged:

  • 👍 valid — crates/minimald/src/exec/tests.rs:646: Removed the unfulfilled #[expect(clippy::disallowed_methods)] from mod tests; in exec.rs. traced::spawn stays because the no_direct_tokio_spawn_blocking scan now checks the moved file, and tokio::spawn would fail it.

The exec tests run from crates/minimald/src/exec/tests.rs and the wire tests run from crates/minimald-rpc/src/tests.rs. Both pass, and clippy on minimald no longer reports the unfulfilled lint expectation on mod tests.

Notes from the agent: This round removed the #[expect(clippy::disallowed_methods)] attribute from mod tests; in exec.rs and kept #[cfg(test)]. The tests keep crate::traced::spawn because the no_direct_tokio_spawn_blocking scan now checks the moved file. So the eight spawn changes are a required change and not a pure move. The PR body must say this. The local toolchain is rustc 1.98.1. With it, cargo clippy -p minimald --all-targets -- -D warnings fails on clippy::chunks_exact_to_as_chunks in crates/minimald-rpc/src/trace.rs:199. That code is already on the branch and this task does not change it.

@minimal-foundry minimal-foundry Bot added the needs-human An agent handed off; a human must act, then clear this label. Set by defer and handoffs. label Oct 20, 2026
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

The runtime will not revise this pull request again on its own: the diff is +4031/-4050 (8081 lines), past 3x the plan's estimate of 220 lines (est: 100 code, 120 tests), at round 1 (the last trigger was a /revise note). A person decides now. Remove needs-human from this pull request to let /revise <note> or the automatic rounds resume, or finish #2376 by hand.

@mitodrummer mitodrummer removed the needs-human An agent handed off; a human must act, then clear this label. Set by defer and handoffs. label Oct 20, 2026
@mitodrummer

Copy link
Copy Markdown
Member

/revise

@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a /revise note: the coder changed nothing. Revise round 1: no code change this round. The one open thread asks to keep tokio::spawn and the #[expect(clippy::disallowed_methods)] in the move. That change already has its own commits, each with a reason: 95cfc4e (tokio::spawn to crate::traced::spawn) and abf7437 (drop the expect that no longer has a target). The move itself is 03fd72b and cff50e2. Keeping tokio::spawn fails traced::tests::no_direct_tokio_spawn_blocking. Its scanner exempts only inline #[cfg(test)] mod x { .. } blocks, so it scans exec/tests.rs. The alternative is to change that scanner in crates/minimald/src/traced.rs, which is outside the task's layers.

Review threads the coder judged:

  • 👎 invalid — crates/minimald/src/exec/tests.rs:583: The spawn change is already in its own commits, with reasons: 95cfc4e and abf7437, apart from the move commit 03fd72b. It is required. traced::tests::no_direct_tokio_spawn_blocking skips only inline #[cfg(test)] mod x { .. } blocks, so it scans exec/tests.rs and fails on tokio::spawn there. The d

@mitodrummer

Copy link
Copy Markdown
Member

/revise Make T51 a pure move again. That resolves both open review threads (PRRT_kwDOPdfcxM6uZNsF, PRRT_kwDOPdfcxM6uZ81T).

A maintainer decided this direction and accepts the edit to crates/minimald/src/traced.rs outside the task's layers. Make it this round. The last round declined it only because of the layers.

  1. In crates/minimald/src/exec/tests.rs, change the 8 crate::traced::spawn( calls back to tokio::spawn(, as they were in the base's inline mod tests (lines 581, 646, 660, 667 and the others round 3 changed).
  2. In crates/minimald/src/exec.rs, put back the attribute on the mod tests; declaration:
    #[cfg(test)]
    #[expect(
        clippy::disallowed_methods,
        reason = "upstream's tests spawn plain tokio tasks; the traced-spawn rule is for request handling"
    )]
    mod tests;
  3. In crates/minimald/src/traced.rs, no_direct_tokio_spawn_blocking (line 644) skips only traced.rs, and outside_test_modules skips inline mod tests blocks. A module's own tests.rs file is test-only in the same way. Extend the file filter so it also skips a file named tests.rs: !f.ends_with("traced.rs") && !f.ends_with("tests.rs"). Add a comment that says why.

Then run cargo clippy -p minimald --all-targets, cargo nextest run -p minimald traced::tests::no_direct_tokio_spawn_blocking and cargo nextest run -p minimald exec::tests. Say in the PR body that the scan now skips module tests.rs files, and that no test changed.

Restore tokio::spawn in exec/tests.rs and the disallowed_methods expect
on its mod declaration, as in the base's inline mod tests. The
no_direct_tokio_spawn_blocking scan now skips a module's tests.rs file,
which is test-only like an inline cfg(test) module.

@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

The change conforms. The design of record has no line on unit-test layout or on the traced-spawn scan, so this is a PASS by absence. The new commit makes the exec test move a pure move again. The scan now skips tests.rs files, and each of these files in minimald is a #[cfg(test)] module. The clippy ban on tokio::spawn still applies to them.

Ruled at 83a1628 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 — advisory review

Verdict COMMENT — 1 finding, 1 inline.

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

Comment thread crates/minimald/src/traced.rs Resolved
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 2 of 10 on a /revise note, pushed as 83a16281732d.

line exit tail
cargo nextest run -p minimald without_an_exporter_nothing_is_recorded 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-3b5e... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling paths v0.0.1 (/workbench/crates/paths) Compiling stdlib v0.0.22 (/workbenc
cargo nextest run -p minimald-rpc package_check_skipped_is_omitted_when_false 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-3df3... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling paths v0.0.1 (/workbench/crates/paths) Compiling common v0.0.1 (/workbench

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-3afd...
    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 diagnostics v0.0.1 (/workbench/crates/diagnostics)
    Checking common v0.0.1 (/workbench/crates/common)
    Checking async-dialog v0.0.1 (/workbench/crates/async-dialog)
    Checking switch v0.0.1 (/workbench/crates/switch)
    Checking boxes v0.0.1 (/workbench/crates/boxes)
    Checking sandbox v0.0.1 (/workbench/crates/sandbox)
    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)
    Checking op v0.0.1 (/workbench/crates/op)
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 test) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `minimald-rpc` (lib) due to 1 previous error

Outside the task's layers::

  • crates/minimald/src/traced.rs

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👍 valid — PRRT_kwDOPdfcxM6uZ81T: Restored the 8 tokio::spawn calls in exec/tests.rs and the disallowed_methods expect on mod tests;, so the move is pure. The traced.rs scan now skips module tests.rs files. (not posted on the thread: not an open thread on the pull request)

The exec tests live in crates/minimald/src/exec/tests.rs and the minimald-rpc tests live in crates/minimald-rpc/src/tests.rs. Both pass from those files, and the moved exec tests are again identical to the base's inline mod tests (8 tokio::spawn calls, same #[expect(clippy::disallowed_methods)] on the module).

Notes from the agent: Revise round 2: the maintainer's note was applied as written. exec/tests.rs again has the 8 tokio::spawn calls from the base, and exec.rs again has the #[expect(clippy::disallowed_methods, ...)] attribute on mod tests;. No test changed. Out of the layers, by the maintainer's decision: crates/minimald/src/traced.rs. The no_direct_tokio_spawn_blocking scan now skips module tests.rs files, because they are test-only like an inline cfg(test) module. Path::ends_with matches whole components, so it skips only files named exactly tests.rs. For the PR body: the scan now skips module tests.rs files, and no test changed. The box has rustc 1.98.1, but rust-toolchain.toml pins 1.97.0. On 1.98.1, cargo clippy -p minimald --all-targets -- -D warnings fails on a chunks_exact_to_as_chunks lint in crates/minimald-rpc/src/trace.rs:199. That file is untouched and the lint comes from the newer clippy. Without -D warnings, clippy exits 0 and shows no warnings in the files this task touches. Both threads (PRRT_kwDOPdfcxM6uZNsF, PRRT_kwDOPdfcxM6uZ81T) are addressed by the pure move. PRRT_kwDOPdfcxM6uZ81T changes from invalid to valid this round. PRRT_kwDOPdfcxM6uZNsF stays valid, so it has no new entry.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft October 20, 2026 18:23
@mitodrummer
mitodrummer marked this pull request as ready for review October 20, 2026 18:33

@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 83a1628 against T51's plan block. This is a pure move: exec.rs -2295 into exec/tests.rs, and minimald-rpc lib.rs -1751 into minimald-rpc/src/tests.rs. The tokio::spawn (8) and traced::spawn (16) counts match the base exactly, and the #[expect(clippy::disallowed_methods)] on mod tests; is restored. Every other unmatched line is rustfmt rewrapping after the dedent. The one edit outside the layers, traced.rs, makes no_direct_tokio_spawn_blocking skip module tests.rs files, which a maintainer chose.

@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Revise round 2 ran against ci-macos-success, e2e and left it red; a coder round cannot clear it, a person should look. No round was started for the failed suite on 83a16281732d.

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit 7ebdbe8 Oct 20, 2026
47 of 51 checks passed
@norrietaylor
norrietaylor deleted the agent/2376-move-the-exec-and-rpc-crate-tests-into-their-own branch October 20, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T51 — Move the exec and RPC-crate tests into their own files

2 participants