Commit Graph
9 Commits
Author SHA1 Message Date
pingqiuandClaude Opus 5.5 f230a1678d storage: golden bytes for the v1.1 record, pass cursor and coverage map
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>
2026-12-01 11:13:54 -08:00
pingqiuandClaude Opus 5.5 ecbf13fcea test(storage): pin the v1.0.0 chunk presence file
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>
2026-11-28 12:51:47 -08:00
pingqiuandClaude Opus 5.5 2eed189ba0 test: v1.0.1 keeps the v1.0.0 on-disk encodings (golden guard)
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>
2026-11-28 12:35:17 -08:00
pingqiuandClaude Opus 5.5 f679f2a5fe docs: drop internal names and paths from comments and notes
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>
2026-11-20 20:37:43 -08:00
pingqiu d2a778f849 storage: persist dark v3 chunk LSN maps as owned immutable COW generations 2026-11-17 02:22:32 -08:00
pingqiu 162ebc99fe docs: clarify record vector scope and separate RED evidence 2026-11-17 01:37:23 -08:00
pingqiu 94aca469ac test: pin independent nonzero batch and trim record vectors 2026-11-17 01:36:07 -08:00
pingqiu 26f4cb77eb storage: add dark impl-3 record codec and byte contract tests 2026-11-17 01:33:31 -08:00
pingqiuandClaude Opus 5.5 1de78938a9 storage: v3 descriptor slot codec, validity and A/B selection (format bump row 1)
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>
2026-11-17 01:28:38 -08:00