LeVCS/crates/levcs-store
Levi Neuwirth ef7d263fed Amend Wave B storage contracts after adversarial review
The B2 review of the first B1/B3 slice found five defects whose fixes were
not available to the packages that had to make them: each needed a change
to a surface those packages do not own. Rather than let them restate a
frozen fact locally, the lead amends the surfaces and the packages consume
them. Contract review 2026-07-28-A records all five with the weaker
alternative that was rejected for each.

  - CommitEvidenceSigner::sign_event's parameter becomes signing_digest.
    The message is SignedCommittedTransactionV1::signing_digest, which
    binds key epoch and durability result around the canonical event; the
    bare event digest is chain identity, not signature material. A doc line
    was not enough: misuse is undetectable until after durability, and is
    first observed by a mirror on another instance.

  - TransactionEvidenceV1::actor() is new, exhaustive over all six
    variants. A destination event's actor must restate the evidence's
    source instance, and deriving it a second way store-side is what
    produced the defect it closes.

  - format::object_type_code becomes pub(crate) and recovery.rs's private
    twin is deleted, so one table exists where three did.

  - RefRecord gains from_target/target() in terms of RefTarget, with the
    code table stated once per direction and an unknown kind refused by
    value as CheckpointError::RefKind. Defaulting an unknown kind would
    launder it into the next checkpoint within one interval.

  - max_projection_objects is capped at MAX_CANONICAL_ITEMS and its default
    lowered to it; max_projection_chunks likewise, and max_projection_bytes
    against the transitive per-chunk allowance. The old default described a
    projection no manifest could encode. Supporting a hundred million
    objects requires a versioned chunked or indexed manifest design, not a
    larger hostile-decode ceiling.

Both governing documents are updated where they now misstate a frozen
fact, including §6.4's claim that signing covers the event digest. §6.5
records the two carry-forwards from B3's first slice — production staging
use is incomplete, and expire() has no scheduler — and records that the
requested StoreEngine staging accessor is a pending amendment which must
not be a bare Arc<ProjectionStaging>, since a clone could outlive
EngineShared, survive release of the root LOCK, and keep serving a root
this process no longer holds.

No package file is touched: engine.rs, transaction.rs, and staging.rs
consume these in their own commits.

levcs-protocol 6 consumer tests, levcs-store 109 library tests.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 18:01:05 -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 Amend Wave B storage contracts after adversarial review 2026-07-28 18:01:05 -04:00
tests Close the Wave A matrix carry-forward (B4 deliverable 1) 2026-07-28 14:25:07 -04:00
Cargo.toml Implement D0-B storage publication interfaces 2026-07-27 22:31:32 -04:00