Skip to content

test(index): cover lookup_vaet_ref with a fixed unit test - #571

Merged
adityamukho merged 1 commit into
mainfrom
test/vaet-lookup-coverage
Oct 13, 2026
Merged

adityamukho merged 1 commit into
mainfrom
test/vaet-lookup-coverage

Conversation

@adityamukho

Copy link
Copy Markdown
Collaborator

Summary

  • src/storage/index.rs line coverage depended on the proptest seed. lookup_vaet_ref (21 lines) was reached only when tests/property_test.rs happened to generate a query planned with [?e ?a <entity>] first. Main's last run measured 93.89%; the corpus-only PR fuzz: minimized corpus for main #563 measured 88.06% against the 92% floor and failed the coverage gate.
  • Adds test_lookup_vaet_ref_returns_only_refs_to_target: refs from two sources and attributes to one target are both returned, a ref to another target is not, and an unknown target returns nothing.
  • Test counts bumped in CLAUDE.md, README.md, docs/TEST_COVERAGE.md.

v3 is not affected (no lookup_vaet_ref there).

Test plan

  • cargo test --lib storage::index passes
  • With PROPTEST_CASES=1, lookup_vaet_ref showed 0 hits before this change and is covered by the lib tests after it
  • cargo fmt --check, cargo clippy --all-features -- -D warnings

🤖 Generated with Claude Code

https://claude.ai/code/session_0182dkj73849VS8eeGFFHXbW

Only proptest-generated queries reached lookup_vaet_ref, when one happened
to plan [?e ?a <entity>] first. On runs where none did, src/storage/index.rs
fell to 88% lines against its 92% floor, failing the coverage gate on a
corpus-only PR (#563). A unit test now checks that the VAET lookup returns
exactly the refs to its target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0182dkj73849VS8eeGFFHXbW
@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@adityamukho
adityamukho merged commit 099da8d into main Oct 13, 2026
22 checks passed
@adityamukho
adityamukho deleted the test/vaet-lookup-coverage branch October 13, 2026 06:10
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