Repository navigation
Implement immutable append-only segment writing and verified reading #15
Copy link
Copy link
Closed
Labels
area:formatCanonical durable formats and decodingCanonical durable formats and decodingarea:identityLogical content identity and typed coordinatesLogical content identity and typed coordinatesarea:readReconstruction, streaming, and byte-range readsReconstruction, streaming, and byte-range readsarea:segmentPhysical immutable segment representationPhysical immutable segment representationarea:verificationIntegrity verification and corruption postureIntegrity verification and corruption posturekind:implementationProduction implementation workProduction implementation workkind:testTest infrastructure or failure-mode evidenceTest infrastructure or failure-mode evidence
Milestone
Description
Outcome
Persist chunk and layout records into bounded append-only segments and read them back only after structural and identity verification.
Dependencies
Acceptance criteria
- Staging and sealed segment states are represented by distinct types.
- Record and segment headers match golden format fixtures exactly.
- Writes handle short writes, interruptions, full disk, permissions changes, and sync failures.
- Sealing is explicit, fallible,
#[must_use], and follows the ADR's durability order. - Readers validate framing, bounds, checksum, record identity, and trailing-state rules before trusting payloads.
- Sealed segments cannot be mutated through the public API.
- Partial tails, conflicting duplicate records, unsupported versions, unknown flags, and checksum mismatch return exact typed errors.
- Memory and allocation remain bounded by configured record and chunk limits.
- No filesystem enumeration is used as the normal content index.
- Corruption and crash-injection tests cover every write boundary implemented by this issue.
Non-goals
- Catalog publication.
- Retention or garbage collection.
- Compression, mmap, direct I/O, or unsafe optimization.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:formatCanonical durable formats and decodingCanonical durable formats and decodingarea:identityLogical content identity and typed coordinatesLogical content identity and typed coordinatesarea:readReconstruction, streaming, and byte-range readsReconstruction, streaming, and byte-range readsarea:segmentPhysical immutable segment representationPhysical immutable segment representationarea:verificationIntegrity verification and corruption postureIntegrity verification and corruption posturekind:implementationProduction implementation workProduction implementation workkind:testTest infrastructure or failure-mode evidenceTest infrastructure or failure-mode evidence
Activity