Background
From the testing strategy review (docs/reviews/testing-strategy-review.md): src/input/ and src/main_helpers/ (plus src/tick_events.rs) are mod-declared only in src/main.rs, never in src/lib.rs. That means the ~3,000 integration tests under tests/ — which link against the quest library crate — structurally cannot reach these modules, no matter what coverage invocation CI uses. Their only possible coverage source is inline #[cfg(test)] blocks inside the binary crate itself, and right now that's thin to nonexistent for the highest-risk files.
Measured directly with cargo-llvm-cov (full run, no exclusions):
| File |
Line coverage |
main_helpers/input_routing.rs |
0.00% |
main_helpers/persistence.rs |
0.00% |
input/soulforge_input.rs |
0.00% |
input/stormglass_input.rs |
0.00% |
input/minigame_input.rs |
0.00% |
input/haven_input.rs |
5.68% |
input/deep_input.rs |
27.11% |
input/mod.rs |
28.47% |
input/loom_input.rs |
53.85% |
input/voyage_input.rs |
57.08% |
input/prestige_input.rs |
71.92% |
input/harness.rs |
85.35% |
input/time_vault_input.rs |
95.30% |
time_vault_input.rs and harness.rs prove the pattern works when applied — the input-replay harness (src/input/harness.rs, extended in replay_tests.rs) can drive these handlers and assert on the resulting InputResult/state. It just hasn't been extended to the 0%/near-0% files yet.
Why this matters
main_helpers/input_routing.rs is the layer that turns an InputResult into an actual save/git-commit (route_game_input(), dispatch_time_vault_action(), save_and_commit, reload_game_state, refresh_vault_browser). A wrong branch here is silent save/commit loss with no automated tripwire — the input-replay harness currently asserts the InputResult variant but stops one layer short of asserting the routing actually performs the save.
Proposed work
2. Write tests for the confirmed gaps, prioritized by risk:
3. Once (2) has real content, give the binary crate its own coverage gate so input//main_helpers//tick_events stop being invisible to CI:
Do not attempt (3) before (2) — gating on it while these files are still near-0% would just fail the build for no benefit.
Background
From the testing strategy review (
docs/reviews/testing-strategy-review.md):src/input/andsrc/main_helpers/(plussrc/tick_events.rs) aremod-declared only insrc/main.rs, never insrc/lib.rs. That means the ~3,000 integration tests undertests/— which link against thequestlibrary crate — structurally cannot reach these modules, no matter what coverage invocation CI uses. Their only possible coverage source is inline#[cfg(test)]blocks inside the binary crate itself, and right now that's thin to nonexistent for the highest-risk files.Measured directly with
cargo-llvm-cov(full run, no exclusions):main_helpers/input_routing.rsmain_helpers/persistence.rsinput/soulforge_input.rsinput/stormglass_input.rsinput/minigame_input.rsinput/haven_input.rsinput/deep_input.rsinput/mod.rsinput/loom_input.rsinput/voyage_input.rsinput/prestige_input.rsinput/harness.rsinput/time_vault_input.rstime_vault_input.rsandharness.rsprove the pattern works when applied — the input-replay harness (src/input/harness.rs, extended inreplay_tests.rs) can drive these handlers and assert on the resultingInputResult/state. It just hasn't been extended to the 0%/near-0% files yet.Why this matters
main_helpers/input_routing.rsis the layer that turns anInputResultinto an actual save/git-commit (route_game_input(),dispatch_time_vault_action(),save_and_commit,reload_game_state,refresh_vault_browser). A wrong branch here is silent save/commit loss with no automated tripwire — the input-replay harness currently asserts theInputResultvariant but stops one layer short of asserting the routing actually performs the save.Proposed work
2. Write tests for the confirmed gaps, prioritized by risk:
main_helpers/input_routing.rs— assertroute_game_input()/dispatch_time_vault_action()actually perform save/commit/reload for eachInputResultvariant that should trigger one (highest priority — silent-data-loss risk)input/soulforge_input.rsinput/stormglass_input.rs(also fix the directSystemTime::now()call flagged in the review while touching this file)input/minigame_input.rsmain_helpers/persistence.rsinput/haven_input.rs3. Once (2) has real content, give the binary crate its own coverage gate so
input//main_helpers//tick_eventsstop being invisible to CI:cargo-llvm-covinvocation scoped to the bin target (or move stable, testable logic intolib.rs-reachable modules where that's a more natural fit than a parallel gate)ci.yml'scoveragejob andscripts/ci-checks.sh, keeping the two in syncDo not attempt (3) before (2) — gating on it while these files are still near-0% would just fail the build for no benefit.