The chunk record's page and header, the upgrade pass cursor, and the
coverage map's two leaves, index page and root are pinned byte for byte:
each encodes to its fixture, each fixture decodes to its input, and the
fixtures are pinned by SHA-1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chunkpresence.txt, generated on the v1.0.0 tag checkout (where write.bin
regenerates identical): a fresh-from-HEAD volume with chunks 1, 2 and 5
absent and one flushed local block in chunk 5. Today's layer writes the
same file for the same volume and loads it as those sets; its blob hash
joins the format_v3 table.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Layout: fixtures for HEAD (unclaimed; live with two snapshots, metadata
and a dependent; with an open snap session; detached; deleting; a
tombstone), VOLUME, a root and its segment, written once by a fixed-input
generator on the v1.0.0 tag checkout (25a3b755). Today's encoders must
produce those bytes, decode then encode must return them, and each
fixture's git blob hash must be the one written on the tag.
Storage: the v1.0.0 vectors in testdata/format_v3 gain the single-block
write record (generated on the tag), checked by encode and by the
scanner's decode; every format_v3 file's git blob hash is checked against
the tag's. A failing guard is fixed by restoring the encoder or by the
version-bump-and-refusal path, never by rewriting a fixture.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Public text states what the code guarantees, not who asked for it or
where an internal note lives. Comments and docs only; no code change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DESIGN r15 section 2 (f2122d66), PLAN row 1 (b870a569). Dark: no
production open or create path reaches the v3 codec until activation
(row 12b); v2 superblock.go is unchanged.
- superblock_v3.go: 4096-byte slots A@0/B@4096, WAL at 8192; CRC32C
(Castagnoli) over [0,4092); reserved bytes, flags, impl acceptance,
slotGen/nonce, checked geometry, BASE per-state rules (installed may
have BaseCursor below retainedTail, r15), WMode, MigrationPhase, and the
slot-local map coverage CheckpointLSN <= C <= W. Selection: the valid
selectable slot with the higher slotGen; a prepared slot is never
selected (ErrMigrationIncomplete when it is the only one); equal
generation with different bytes or identity/geometry mismatch refuse.
Counters stop at 2^64-2 (ErrCounterExhausted).
- Tests decode 25 vectors from an independent stdlib generator with its
own CRC32C (testdata/format_v3/slot), re-encode the positives
byte-exact, and cover selection, exhaustion and the r15 installed rule.
- invariants.md: INV-WAL-V3-DESCRIPTOR-001 (STUB until activation).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>