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.

  1. FileWriter and Session capture ctx at construction. StorageDriver.Writer(ctx, ...), BlobStore.NewSession(ctx, ...), and ResumeSession(ctx, ...) capture ctx and reuse it for Write, Close, Cancel, Commit. Signatures become Session.Commit(expectedDigest, ...) and Session.Cancel(), mirroring io.WriteCloser and the Container Registry's FileWriter. StorageDriver methods remain per-call ctx.
  2. OpenBlob returns *BlobContent (was value); NewBlobRedirect / NewBlobStream return *BlobContent. The pointer-receiver accessors did not compile on a value return; pointer return lets call-chains compose (store.OpenBlob(...).IsRedirect()).
  3. Session.Commit expectedDigest is *digest.Digest. nil means skip verification; non-nil means verify. A non-nil pointer 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.
  4. URLFor / NewBlobRedirect absolute-URL + allowlisted-scheme contract. URLFor implementations must return absolute URLs with https (or http in test only), validating scheme and host when any portion derives from untrusted input. Defends against open-redirect and javascript:-scheme vectors flowing into the format-layer Location: header. New Decisions entry captures the rationale.
  5. 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 via StoreResult / BlobContent. Wrapping BlobStore with a metric-emitting decorator is not a supported pattern.
  6. Minor wording cleanup in §StorageDriver "Object size": drop "e.g.,".

Test plan

  • Markdown lint, lychee / vale pre-commit hooks pass locally
  • CI green
  • lint:mr-title passes

References

🤖 Generated with Claude Code

Edited by Pawel Rozlach

Merge request reports

Loading
Loading