Loading
docs(specs): S06 amendments from Step 1 review feedback
Summary
Six amendments to S06 surfaced by /review-branch on the Step 1 implementation MR (!241). All tighten the contract Steps 2-9 will code against; none change spec behavior.
FileWriterandSessioncapturectxat construction.StorageDriver.Writer(ctx, ...),BlobStore.NewSession(ctx, ...), andResumeSession(ctx, ...)capturectxand reuse it forWrite,Close,Cancel,Commit. Signatures becomeSession.Commit(expectedDigest, ...)andSession.Cancel(), mirroringio.WriteCloserand the Container Registry'sFileWriter.StorageDrivermethods remain per-callctx.OpenBlobreturns*BlobContent(was value);NewBlobRedirect/NewBlobStreamreturn*BlobContent. The pointer-receiver accessors did not compile on a value return; pointer return lets call-chains compose (store.OpenBlob(...).IsRedirect()).Session.CommitexpectedDigestis*digest.Digest.nilmeans skip verification; non-nilmeans verify. A non-nilpointer to an empty digest is a programming error and is rejected — callers must propagate parse errors rather than passing&emptyDigest. Makes "skip verification" unrepresentable by a forgotten or zero-initialized parameter.URLFor/NewBlobRedirectabsolute-URL + allowlisted-scheme contract.URLForimplementations must return absolute URLs withhttps(orhttpin test only), validating scheme and host when any portion derives from untrusted input. Defends against open-redirect andjavascript:-scheme vectors flowing into the format-layerLocation:header. New Decisions entry captures the rationale.- Observability clarification: all metrics emitted inside the storage layer. Implementation-internal outcome labels (resolved
DeliveryMode, dedup-hit, per-driver action) are recorded against storage-owned metrics, not surfaced viaStoreResult/BlobContent. WrappingBlobStorewith a metric-emitting decorator is not a supported pattern. - Minor wording cleanup in §StorageDriver "Object size": drop "e.g.,".
Test plan
- Markdown lint,
lychee/valepre-commit hooks pass locally - CI green
-
lint:mr-titlepasses
References
- Spec: docs/specs/S06-storage-layer.md
- Step 1 implementation: !241
Edited by Pawel Rozlach