Summary
ssd_tier::tests::startup_maintenance_prunes_and_evicts_to_budget (in crates/rmlx-kv-ssd/src/ssd_tier_tests.rs) rarely fails (exit 101, ~1-in-6) under cargo test --workspace / make ci. It passes on re-run.
Cause
The process-global paths::home() OnceLock gets seeded by another test in the same test binary before this test's set_var(RMLX_HOME) runs, so home() resolves to a stale root for this test. Order-dependent across the parallel test threads → nondeterministic.
This is test-isolation only — not a product bug. #106/#111 fixed the production path (the startup_maintenance routine now takes an injected SsdKvIndex instead of calling home()), and the test passes reliably when run alone (cargo test -p rmlx-kv-ssd is 5/5 green). The residual hazard is the shared global in the --workspace test binary.
Impact
make ci may need one re-run. Annoying for a clean release gate; otherwise harmless.
Suggested fix (general)
Make the test not depend on the global home() OnceLock:
Prefer the DI approach (no new dep, matches #111).
Summary
ssd_tier::tests::startup_maintenance_prunes_and_evicts_to_budget(incrates/rmlx-kv-ssd/src/ssd_tier_tests.rs) rarely fails (exit 101, ~1-in-6) undercargo test --workspace/make ci. It passes on re-run.Cause
The process-global
paths::home()OnceLockgets seeded by another test in the same test binary before this test'sset_var(RMLX_HOME)runs, sohome()resolves to a stale root for this test. Order-dependent across the parallel test threads → nondeterministic.This is test-isolation only — not a product bug. #106/#111 fixed the production path (the
startup_maintenanceroutine now takes an injectedSsdKvIndexinstead of callinghome()), and the test passes reliably when run alone (cargo test -p rmlx-kv-ssdis 5/5 green). The residual hazard is the shared global in the--workspacetest binary.Impact
make cimay need one re-run. Annoying for a clean release gate; otherwise harmless.Suggested fix (general)
Make the test not depend on the global
home()OnceLock:serial_test), orPrefer the DI approach (no new dep, matches #111).