feat(storage): introduce internal/storage interface package (S06 Step 1)
Summary
Step 1 of the S06 storage-layer plan: introduce the internal/storage package with all S06 Go interface declarations and supporting types — no behavior. Establishes the contract that the in-memory stub, the real PostgreSQL-backed impl, and the ported drivers + middlewares all code against. Tests land in later steps with the conformance suite and first behavioral code (PathResolver).
Spec amendment dependency
Depends on !242 (land first; this MR is a no-op on Go semantics until then):
- Request-scoped ctx:
FileWriter/Sessioncapture ctx at construction and reuse it for all subsequent calls, keeping terminal methods (Close,Commit,Cancel) aligned withio.WriteCloser. OpenBlob/NewBlobRedirect/NewBlobStreamreturn*BlobContent— pointer-receiver accessors require it.- §Observability: delivery-mode and dedup signals emitted inside the storage layer, not via result types.
Reviewable size
~750 LOC across 7 new files + 2-line go.mod change (promotes google/uuid and opencontainers/go-digest to direct deps). Above the 500 LOC target, but kept as one MR because every godoc block maps to a numbered subsection of the S06 Design section — reviewer effort is a spec-vs-code compare.
Test plan
-
go build ./...,go vet,golangci-lint,go mod tidy,go test ./...all clean locally - CI green on MR pipeline (incl.
lint:mr-title)
References
- Plan: docs/plans/2026-05-15-storage-layer.md — Step 1
- Spec: docs/specs/S06-storage-layer.md (amended by !242 (merged))
- ADRs touched at the type-shape level: ADR-002, ADR-005, ADR-007, ADR-008, ADR-011, ADR-022