Repository navigation
T51 — Move the exec and RPC-crate tests into their own files - #2451
norrietaylor merged 8 commits into
Conversation
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.
|
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 |
|
Reviewed: 1 finding, none blocking at Address the comments on the diff. Clobber: none seen. |
|
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] |
|
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] |
|
/revise The Replace those |
|
/arch-review |
…xec-and-rpc-crate-tests-into-their-own
There was a problem hiding this comment.
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.
|
Revise round 2 ran against |
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.
There was a problem hiding this comment.
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.
|
Round 3 of 10 on a /revise note, pushed as
Verify 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. |
|
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 |
|
/revise
Remove that The macOS |
The moved exec tests spawn through crate::traced::spawn, so no disallowed method remains and the expect fails clippy -D warnings.
There was a problem hiding this comment.
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.
|
Round 1 of 10 on a /revise note, pushed as
Verify Review threads the coder judged:
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 |
|
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 |
|
/revise |
|
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:
|
|
/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
Then run |
…xec-and-rpc-crate-tests-into-their-own
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.
…xec-and-rpc-crate-tests-into-their-own
There was a problem hiding this comment.
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.
|
Round 2 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
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 |
mitodrummer
left a comment
There was a problem hiding this comment.
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.
|
Revise round 2 ran against |
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 onlymod 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
cargo nextest run -p minimald without_an_exporter_nothing_is_recordedcargo nextest run -p minimald-rpc package_check_skipped_is_omitted_when_falseVerify
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 #2376
Undrafted 2026-10-20. The edit outside the layers,
crates/minimald/src/traced.rs, is one a maintainer chose. Theno_direct_tokio_spawn_blockingscan now skips moduletests.rsfiles, so the exec tests stay a pure move withtokio::spawn. No test changed. The local clippy failure (chunks_exact_to_as_chunksin 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.