test(opencode-v2): cover 20 untested row-mapping and full-read cases (#54)

Merged
IC
42m ago
+338-0

Which issue gave this a go?

#54, the go of 2026-12-05 18:19Z.

Closes #54

What changed

This PR adds 20 tests in crates/astrocyte-module/src/opencode_v2_source_tests.rs. That file is included only in the tests module of opencode_v2_source.rs. It changes only test code: 338 added lines and no removed lines.

What proves it

  • Test: the 20 tests that #54 names, from v2_creation_time_rejects_negative_fraction_that_truncates_to_zero to v2_older_payload_waits_when_the_instruction_budget_is_exactly_spent.
  • Failed without the fix: this PR has no production change. For each of the 20 mutants in #54, 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 (20 of 20 pairs). No test can be satisfactory without its case: each test compares the accurate time, cutoff, count, error variant or rowid position.
  • At this branch on Linux, these commands are satisfactory: scripts/fmt-check.sh, cargo clippy --workspace --all-targets --locked -- -D warnings and cargo test --workspace --all-targets --locked (0 unsatisfactory, and 1,106 satisfactory with 20 ignored in astrocyte-module).

AI helped write this draft.


Summary by cubic

Adds 20 tests covering the OpenCode 2 row-to-record mapping and full-read paths, closing #54. Mutation testing found 20 code changes undetected by existing tests; each new test passes on the current code and fails when its corresponding mutant is applied. The change is test-only: 338 added lines in crates/astrocyte-module/src/opencode_v2_source_tests.rs, no production code touched.