LeVCS/crates/levcs-store
Levi Neuwirth dccc1859b0 Read the run's identity from an entry, not from a guessed range
The test oracle probed generations 0..16 to discover what a published run
names, which reproduced the defect it was written to catch: it could not report
an identity outside the range it guessed. Review drifted the identity to 101 and
the test died on "a run with entries names some generation" before reaching
either the identity assertion or the damage assertion. It would also have picked
the lowest of several once a run spans generations.

The helper now takes an IndexKey the test knows is covered and reads
`segment_generation` off `IndexRun::get`, which answers exactly and has no
range to outgrow. It fails loudly if the key is absent, since a missing entry
means the test is measuring nothing.

The surviving-journal regression keeps a second orphan at generation 100, so the
fallback it must not take is 101 — a number that cannot be read as an
off-by-one. Verified by reverting the tail fix under it: the assertion now
reports left: 101, right: 1 instead of failing to find a generation at all.

No production change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XKzM69CHmBuDcA3qN1jFdh
2026-07-30 18:34:36 -04:00
..
benches Freeze Wave A: Phase 1 storage spine 2026-07-26 19:47:03 -04:00
examples Freeze Wave A: Phase 1 storage spine 2026-07-26 19:47:03 -04:00
src Read the run's identity from an entry, not from a guessed range 2026-07-30 18:34:36 -04:00
tests Accept only the braced test-item shapes this crate uses 2026-07-29 20:30:41 -04:00
Cargo.toml Implement D0-B storage publication interfaces 2026-07-27 22:31:32 -04:00