test(opencode-v2): cover 22 untested fast-read cases (#52)
Merged
IC
2d ago+461+461+012345678901234567890123456789-0-0-0123456789
Which issue gave this a go?
#52, the go of 2026-12-04 17:57Z.
Closes #52
What changed
This PR adds 14 tests in crates/astrocyte-module/src/opencode_v2_source.rs, in the tests module. It changes only test code: one hunk of 461 added lines and no removed lines.
What proves it
- Test: the 14 tests that #52 names, from
v2_idle_fast_polls_keep_the_rewind_boundarytov2_fast_tail_leaves_both_evicted_calls_for_the_full_sweep. - Failed without the fix: this PR has no production change. For each of the 22 mutants in #52, I applied that one code change and ran its test. Each test stopped on an equality assertion. The same test is satisfactory on the unchanged code (22 of 22 pairs). No test can be satisfactory without its case: each test compares the accurate record count, key, rowid position or coverage value.
- At this branch on Linux, these commands are satisfactory:
scripts/fmt-check.sh,cargo clippy --workspace --all-targets --locked -- -D warningsandcargo test --workspace --all-targets --locked(0 unsatisfactory, and 1,079 satisfactory with 20 ignored inastrocyte-module).
AI helped write this draft.
Summary by cubic
Adds 14 tests covering the 22 mutation-testing gaps in the OpenCode 2 fast-read path, with no production code changes.
The tests target edge cases around rewind boundaries, pending coverage, and evicted calls in crates/astrocyte-module/src/opencode_v2_source.rs. Each test passes against current code and fails against its corresponding mutant from cargo-mutants run of 193 mutants.