Skip to content

harden(reader): close depth-guard mutation-coverage gaps#173

Merged
dfa1 merged 1 commit into
mainfrom
harden/depth-guard-mutation-coverage
Jun 26, 2026
Merged

harden(reader): close depth-guard mutation-coverage gaps#173
dfa1 merged 1 commit into
mainfrom
harden/depth-guard-mutation-coverage

Conversation

@dfa1

@dfa1 dfa1 commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Follow-up to #172. Ran PIT (-pl reader -am -P pitest verify -DskipITs) on the depth/bounds guards added by the hardening work; it surfaced six survivors, each a real coverage hole.

Fixes

Survivor Gap Fix
convertDType:239/249/253 (MathMutator depth + 1) the depth-bomb test only nested via List, leaving the Struct / FixedSizeList / Extension recursion arms untested parameterize DTypeDepthBombSecurityTest over a new NestKind enum (all four arms)
convertDType:200 / convertArrayNode:85 (depth >>=) depth cap never pinned at its exact boundary add at-limit (parses) / limit+1 (throws) cases, mirroring the existing layout-depth tests
parseBlobs:120 (byteSize() > 0>= 0) empty-but-present dtype blob behavior untested pin that an empty dtype blob yields a null dtype

Result

Reader PIT: 0 survivors — 112 killed, 1 timed-out, 100% test strength (was 6 survived / 95%).

Tests only; no production change.

🤖 Generated with Claude Code

PIT on the reader (-P pitest) flagged six survivors in the depth/bounds guards
added by the hardening work. Each marks a real coverage hole, not an arbitrary
edge:

- convertDType recursion was only exercised through the List arm, so the
  depth+1 increment on the Struct / FixedSizeList / Extension arms could be
  mutated away undetected. Parameterize the dtype depth-bomb over all four
  NestKind variants.
- Pin the convertDType and convertArrayNode depth caps at their exact
  boundary (limit parses, limit+1 throws), mirroring the existing layout-depth
  tests.
- Pin parseBlobs treating a present-but-empty dtype blob as a null dtype.

Reader PIT is now 0 survivors (112 killed, 1 timed-out, 100% test strength).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dfa1 dfa1 merged commit a60f950 into main Jun 26, 2026
6 checks passed
@dfa1 dfa1 deleted the harden/depth-guard-mutation-coverage branch June 26, 2026 19:55
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