Loading
feat(oci): add S12 Step 5 helpers (digest, mediatype, errors, name)
Why
S12 Step 5 (Container/OCI local) helpers: digest parsing/canonicalization, manifest mediatype detection, the OCI error envelope, and image-name path validation. Step 6's dispatcher and every endpoint MR after it consume these.
Plan: docs/plans/2026-05-15-oci-local.md. Spec: docs/specs/S12-container-oci-local.md.
Context for LLM agents
Rationale
NewInternalEnvelope(_ error)accepts an err parameter it intentionally drops. Alternative considered: a logger-coupled helper that logs and returns the envelope. Rejected because it would force the format package to import the logger; the no-internal-detail invariant is enforced by call-site discipline plusTestInternalEnvelopeContainsNoInternalDetails.
Non-goals
- Dispatcher and route wiring (Step 6).
- GC coordination and reachability events (deferred to S20).
- Storage accounting writes (deferred to S22).
- A typed
Detailshape that prevents callers from passing internal data intoNewErrorEnvelope(Step 6 follow-up).