Skip to content

test(writer): close zone-map stat + segment-alignment mutation gaps#174

Merged
dfa1 merged 1 commit into
mainfrom
test/writer-zonemap-stat-coverage
Jun 26, 2026
Merged

test(writer): close zone-map stat + segment-alignment mutation gaps#174
dfa1 merged 1 commit into
mainfrom
test/writer-zonemap-stat-coverage

Conversation

@dfa1

@dfa1 dfa1 commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Ran PIT on the writer (-pl writer -am -P pitest verify -DskipITs). Started at 84% test strength (82 survivors + 6 no-coverage of 510 mutations); triaged each survivor as a real coverage hole vs an equivalent-w.r.t-correctness mutant.

Fixes (genuine gaps)

Survivors Gap Fix
VortexWriter#scalarDouble, F64 sumColumn/statColumn float zone-map stats untested — only I64 covered F64 per-zone MIN/MAX/SUM round-trip test
statColumn I8/I16/I32/F32 arms + f32 scalar field per-zone MIN/MAX values only asserted for I64/F64 parameterized I8/I16/I32/F32 per-zone MIN/MAX test
writeSegment padding (modulus + writePadding) 64-byte segment alignment (Arrow compat) unverified assert every data segment offset is 64-aligned

Intentionally not pinned (equivalent w.r.t. correctness)

The bulk of the residual survivors are compression-quality heuristics, not correctness:

  • ALP-RD (42) — dictionary selection (findBestDictionary/countExceptions/topKByCount/buildLookup). Round-trip is already bit-exact regardless of which dictionary is chosen (exceptions are stored verbatim), so these change only the encoded size. Pinning them would lock the heuristic and add brittleness.
  • Delta (7) — min/max < vs <= (equivalent on ties: equal values assign identically), ceil-division +1 (yields a valid larger encoding), padding-fill arithmetic (touches only unused padding).
  • A handful of VortexWriter FlatBuffer-construction / global-dict boundary mutants in the same equivalent-or-structural category.

Per the repo's mutation-signal guidance (CLAUDE.md: only add a test when the mutated bound is a genuine, independent edge), these are left as-is.

Tests only; no production change.

🤖 Generated with Claude Code

PIT on the writer (-P pitest) surfaced survivors in VortexWriter's zone-map stat
emission and segment alignment that round-trip tests never reached:

- Float zone-map stats were untested (only I64 covered), leaving scalarDouble's
  f64/f32 reads and the F64 sumColumn/statColumn arms killable. Add an F64
  per-zone MIN/MAX/SUM round-trip test.
- Per-zone MIN/MAX values were only asserted for I64/F64. Add a parameterized
  I8/I16/I32/F32 per-zone MIN/MAX test (covers the remaining statColumn arms and
  the f32 scalar field).
- Segment 64-byte alignment (Arrow compat) was unverified. Add a test asserting
  every data segment offset is 64-aligned, covering the writeSegment padding
  arithmetic.

Writer PIT strength rises from 84% toward parity; the residual survivors are
compression-quality heuristics (ALP-RD dictionary selection, Delta tie-break
boundaries) that are equivalent w.r.t. correctness — round-trip is already
bit-exact regardless — so they are intentionally not pinned.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dfa1 dfa1 merged commit 3c98966 into main Jun 26, 2026
6 checks passed
@dfa1 dfa1 deleted the test/writer-zonemap-stat-coverage branch June 26, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant