Found while verifying PR #52. This is not a doc nit: one of the commands AGENTS.md documents reports zero tests run as a green pass.
The mechanism
.cargo/config.toml in this repo contains only:
[build]
rustflags = ["--cfg", "feature=\"docker-tests\""]
But ~/.cargo/config.toml sets a target-specific rustflags table:
[target.x86_64-unknown-linux-gnu]
rustflags = ["-C", "link-arg=-Wl,-rpath,/home/admin/.local/share/koharu-toolchain/lib"]
Cargo does not merge [build].rustflags with [target.<triple>].rustflags; the target table takes precedence. So on this host the --cfg feature="docker-tests" never reaches the compiler, and everything behind #[cfg(feature = "docker-tests")] is compiled out.
The symptom
AGENTS.md documents this as the way to run the suite:
cargo test -p lab-ops --test auto_discover # auto-discover Docker integration tests
It reports:
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
A green result for a suite that did not run. I hit this myself earlier in the session and misread it as a passing run; it took a second look to catch.
AGENTS.md asserts that .cargo/config.toml "always enables docker-tests" and that --all-features is therefore "redundant but harmless". On this host the opposite is true: --all-features is required, and omitting it silently skips the whole suite.
What to build
A state where the documented commands either work or fail loudly. Options, in order of preference:
- (a) Add
--all-features to the documented commands and correct the AGENTS.md claim. Smallest honest fix, and it makes the intent explicit at the call site rather than depending on a config file that is being overridden from outside the repo.
- (b) Make the user-level config stop clobbering the project one. The
[env] entries in ~/.cargo/config.toml are load-bearing for this host (libclang, fontconfig pkg-config), but the [target.*] rustflags entry exists only to bake an rpath. Merging the rpath into [build].rustflags in the user config, or using RUSTFLAGS plus a second flag, would let the project config apply again. This is machine config, not repo config, so it does not travel with the repo and is easier to regress.
- (c) Add a guard so the suite cannot report green while running nothing, e.g. an assertion on the test count.
Note (b) alone does not help CI or anyone else whose config differs, so (a) is the part that travels.
Acceptance criteria
Blocked by
None (can start immediately).
Related: PR #52 touches this harness. Its --test-threads=1 claim in AGENTS.md is also false and is reported separately.
Found while verifying PR #52. This is not a doc nit: one of the commands
AGENTS.mddocuments reports zero tests run as a green pass.The mechanism
.cargo/config.tomlin this repo contains only:But
~/.cargo/config.tomlsets a target-specificrustflagstable:Cargo does not merge
[build].rustflagswith[target.<triple>].rustflags; the target table takes precedence. So on this host the--cfg feature="docker-tests"never reaches the compiler, and everything behind#[cfg(feature = "docker-tests")]is compiled out.The symptom
AGENTS.mddocuments this as the way to run the suite:It reports:
A green result for a suite that did not run. I hit this myself earlier in the session and misread it as a passing run; it took a second look to catch.
AGENTS.mdasserts that.cargo/config.toml"always enables docker-tests" and that--all-featuresis therefore "redundant but harmless". On this host the opposite is true:--all-featuresis required, and omitting it silently skips the whole suite.What to build
A state where the documented commands either work or fail loudly. Options, in order of preference:
--all-featuresto the documented commands and correct the AGENTS.md claim. Smallest honest fix, and it makes the intent explicit at the call site rather than depending on a config file that is being overridden from outside the repo.[env]entries in~/.cargo/config.tomlare load-bearing for this host (libclang, fontconfig pkg-config), but the[target.*] rustflagsentry exists only to bake an rpath. Merging the rpath into[build].rustflagsin the user config, or usingRUSTFLAGSplus a second flag, would let the project config apply again. This is machine config, not repo config, so it does not travel with the repo and is easier to regress.Note (b) alone does not help CI or anyone else whose config differs, so (a) is the part that travels.
Acceptance criteria
AGENTS.mdthat targets the Docker suites actually runs them on a clean hostok. 0 passedas if it passedAGENTS.mdno longer claims.cargo/config.tomlalways enablesdocker-tests, and no longer calls--all-featuresredundantdocs/dev/testing.mdBlocked by
None (can start immediately).
Related: PR #52 touches this harness. Its
--test-threads=1claim in AGENTS.md is also false and is reported separately.