LeVCS/crates/levcs-store/tests
Levi Neuwirth fb71bba615
Install an adopted projection through submit
`adopt_projection` reached `build` and stopped there. Wiring it through
`submit` is one change because there is no safe partial: the moment the
builder stops refusing, a submit that ignores the adoption drops a live
pin with no outcome, which is the leak scope 6.5 declares a bug.

The pin cannot live inside the transaction. `Prepared` retains an
`Arc<ValidatedTransaction>` so a group can be re-sequenced when the
pre-mark deadline recheck drops a member, and an `Arc` has no move-out.
It travels beside it in a one-shot `AdoptionSlot` that settles itself
from an append phase rather than from a guess: the phase advances at the
first frame write, not at the fence, so torn and unfenced bytes stay
recovery-owned. That makes the unenumerated routes safe by construction
-- queue rejection, pre-append errors and panics, deadline reforming,
writer unwinding -- instead of correct only where someone remembered.

Two orderings are now statements rather than drop-order accidents. Both
the poison window and every pre-append refusal settle the pin before
resolving the waiter; otherwise a submit could return while staging still
believed the pin was live.

Membership could not travel as an index delta. Adopted generations sit in
a reserved band `1 << 63` away from journal generations, and an index run
packs `segment_generation` as a 16-bit delta from a per-namespace section
base, so one section cannot hold both domains -- the adoption committed
and the next checkpoint poisoned the shard. B3 now materializes
staging-owned runs post-fence, deterministically and idempotently, and
`resolve_committed` only opens, verifies, and pins them. Recovery replays
the same materialization, which is what makes a crash between the fence
and materialization recoverable rather than ambiguous. Runs partition one
per adoption, splitting every 65,536 ordinals, because two adoptions'
sequences differ by more than a section can span.

The run count is therefore knowable before anything is appended, so the
ceiling check is a refusal at revalidation rather than a poison after the
fence.

Payload kind is a matrix axis: all eight Wave B rows drive inline and
staged-projection, and the adoption outcome is read from staging's
counters rather than derived, so the fixture and the run remain two
independent derivations.

Contract review 2026-08-09-A records the interface changes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JGdH5V43XWnj1PdHqiPktQ
2026-08-09 15:39:46 +02:00
..
fixtures Install an adopted projection through submit 2026-08-09 15:39:46 +02:00
support Install an adopted projection through submit 2026-08-09 15:39:46 +02:00
crash_matrix.rs Install an adopted projection through submit 2026-08-09 15:39:46 +02:00
d0_contract.rs Accept only the braced test-item shapes this crate uses 2026-07-29 20:30:41 -04:00
frame_golden.rs Freeze Wave A: Phase 1 storage spine 2026-07-26 19:47:03 -04:00
index_coverage.rs Represent every committed sequence in index coverage 2026-08-09 15:38:18 +02:00
namespace_snapshot.rs Answer reads from a captured root, scoped to one namespace 2026-08-07 21:34:48 +02:00
projection_adoption.rs Install an adopted projection through submit 2026-08-09 15:39:46 +02:00
recovery_checkpoint.rs Implement D0-B storage publication interfaces 2026-07-27 22:31:32 -04:00
recovery_checkpoint_faults.rs Implement D0-B storage publication interfaces 2026-07-27 22:31:32 -04:00
recovery_eio.rs Freeze Wave A: Phase 1 storage spine 2026-07-26 19:47:03 -04:00
recovery_identity.rs Freeze Wave A: Phase 1 storage spine 2026-07-26 19:47:03 -04:00
recovery_manifest.rs Implement D0-B storage publication interfaces 2026-07-27 22:31:32 -04:00
recovery_production_codec.rs Freeze Wave A: Phase 1 storage spine 2026-07-26 19:47:03 -04:00
recovery_receipts.rs Implement D0-B storage publication interfaces 2026-07-27 22:31:32 -04:00
recovery_reference_frame.rs Freeze Wave A: Phase 1 storage spine 2026-07-26 19:47:03 -04:00
recovery_seal.rs Freeze Wave A: Phase 1 storage spine 2026-07-26 19:47:03 -04:00
recovery_sequences.rs Freeze Wave A: Phase 1 storage spine 2026-07-26 19:47:03 -04:00
recovery_step8.rs Implement D0-B storage publication interfaces 2026-07-27 22:31:32 -04:00
recovery_tail.rs Freeze Wave A: Phase 1 storage spine 2026-07-26 19:47:03 -04:00
staging_sessions.rs Install an adopted projection through submit 2026-08-09 15:39:46 +02:00