LeVCS/crates
Levi Neuwirth 4f799e32a4
Let a sealed index run be read back entry by entry
Nothing in the store has ever removed an index run. `seal_index` pushes
one per seal, adoption pushes the runs staging materialized, and each
successor generation carries the predecessor's forward. That was invisible
while nothing checkpointed on a cadence; wiring the P2 harness to
checkpoint inside its measured window made it immediate, and a 125-second
run died with `max_open_index_runs (observed: 33, allowed: 32)`.

The frozen workload is arithmetically unreachable without compaction: 300s
warmup plus 900s measured against 32 open runs allows at most one
checkpoint per ~37 seconds and ends at the ceiling with no headroom for a
fan-out-triggered seal. Raising the ceiling is the disclosed-weakening
pattern retired earlier today, and would make `runs_sealed` describe a run
whose fan-out grows unbounded; shortening the measured window is a Phase 0
contract. Merging runs is the only option that does not trade what the
number means for the ability to produce one.

A merge cannot be written against an API that answers point lookups only,
so `IndexRun::entries` is granted by contract review 2026-08-09-C --
requested rather than emitted, because `index.rs` is a frozen Wave A
interface. It is additive and read-only; no byte of the format moves. The
order is the one already on the device, so a caller that re-encodes what
it reads produces the layout it consumed. It reports no per-entry error:
every value is decoded from bytes the run validated at `open`, and a run
that could not be trusted entry by entry should not have opened.

The test asserts the walk against the run's own `get` rather than against
the delta it was built from. The delta is what the encoder was given; the
question is whether the decoder reads back what was written, and a merge
built on an iterator that disagreed with `get` would relocate entries
silently.

The compaction that consumes this is not here. Its shape is recorded in
the review: partition by generation domain, because a run section is
per-namespace with a 16-bit generation span and adopted-projection
generations sit at `1 << 63`, so journal-backed and staging-owned runs can
never merge into one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JGdH5V43XWnj1PdHqiPktQ
2026-08-09 20:15:11 +02:00
..
levcs-cli Robustness fixes 2026-05-03 20:56:46 -04:00
levcs-client integrate CI and docs 2026-05-01 11:29:18 -04:00
levcs-core integrate CI and docs 2026-05-01 11:29:18 -04:00
levcs-identity Freeze Wave A: Phase 1 storage spine 2026-07-26 19:47:03 -04:00
levcs-instance Robustness fixes 2026-05-03 20:56:46 -04:00
levcs-merge integrate CI and docs 2026-05-01 11:29:18 -04:00
levcs-protocol Declare a raised index-run ceiling without naming a cause 2026-08-09 18:38:04 +02:00
levcs-store Let a sealed index run be read back entry by entry 2026-08-09 20:15:11 +02:00
levcs-tui integrate CI and docs 2026-05-01 11:29:18 -04:00