feat(oci): wire manifest push endpoint with datastore persister (S12 Step 12, 3/3)

Why

Third of three MRs splitting the OCI manifest push endpoint (S12 Step 12), stacked on the manifest-logic layer in feat(oci): manifest push parsing, validation, a... (!519 - merged) • Hayley Swimelar. This slice mounts the endpoint: the datastore-backed persister adapter, the dispatcher route, the composition-root wiring, and the end-to-end conformance contract.

The bottom of the stack (datastore) is feat(datastore): container manifest persistence... (!518 - merged) • Hayley Swimelar, and the original combined MR is feat(oci): manifest push endpoint (S12 Step 12) (!511 - closed) • Hayley Swimelar.

What (non-obvious)

  • store.go's ManifestPersister and BlobInfoSizer are the format-side adapter over the datastore persister from !518 (merged). The dispatcher delegates only PUT manifests/<reference> through NewDispatchHandlerWithManifest; GET, HEAD, and DELETE stay on the interim 501 until Steps 13 and 14.
  • Partial failure: if the 6a CAS write succeeds and the 6b transaction fails, the staged payload is an orphan reclaimed by ADR-011 reconciliation, and the handler returns 500 with oci.manifest.partial_persist=true on the wide event. Cleanup is not retried inline.
  • Conformance stub FK fix (cross-workstream). S06 added a validating FK from blob_storage_attachments to blob_storage_blobs. The conformance harness runs the in-memory storage stub over a real database, so the parent row lived only in memory while format-side attachment inserts hit real Postgres and failed the FK, returning 500 on every finalize. That capped main at 19/80, and this MR does not introduce it. The development_stubs wiring now mirrors each committed blob row into the database through datastore.BlobStorageBlobStore, transitional until the real S06 BlobStore writes the row itself at Step 18.

Test plan

go test -tags=integration ./internal/format/oci/... (the manifest-push e2e contract) and the dispatcher wiring unit test pass. go build ./..., go vet (default and integration tags), and golangci-lint 2.12 pass. End-to-end, conformance:oci rises from 19/80 to 47/80; the job stays allow_failure until Step 18.

Related to #19 (closed)

Edited by Hayley Swimelar

Merge request reports

Loading
Loading