Loading
ci(oci): OCI Distribution Spec conformance harness (S12 Step 7)
Why
S12 (Container/OCI local) ships endpoint by endpoint across the OCI local plan's steps. Each endpoint MR has to show how many upstream OCI Distribution Spec conformance specs it turns green, and reviewers need to diff that pass set across MRs. Nothing in the repo runs the upstream suite yet, so this MR stands up that gate.
This is Step 7 of the OCI local plan. Only GET /v2/ exists today, so the suite passes about 2 of 80 specs. The conformance:oci job is allow_failure: true until Step 18 removes it once the full suite passes.
What (the non-obvious parts)
go test -c, notgo build. The upstream suite ispackage conformancewith nomain, so onlygo test -cproduces a runnable binary. It builds in a throwaway module so its dependencies never enter ourgo.mod.- psql seed, not a management API. AR has no repository-creation API yet and does not auto-create on push, so
provision.shseeds the namespace and repository rows directly as a test fixture. The S12 spec wording now describes that seed rather than the API it does not implement. development_stubsbuild. AR runs with the bootstrap-token validator, a dev stand-in for the S08 auth that is not built yet. The suite authenticates with that token.- Broken-harness visibility. Under
allow_failure, a harness that dies before the suite would look identical to the expected failing-spec baseline.teardownwrites a sentinel JUnit so a setup failure surfaces as a distinctHARNESStest instead of an empty report. - Binary cache. The compiled suite is cached, keyed by the pinned upstream commit, with
when: alwaysso it persists across the expected failing runs.
Test plan
mise run conformancelocally (needs Go, psql, and curl) builds the suite, boots AR, seeds the target, runs the suite, and writesconformance-oci.xml.- CI
conformance:ociruns the samerun.shagainst a Postgres service and archives the JUnit even on failure. - shellcheck passes on both scripts. The signal trap, sentinel JUnit, and DSN parsing were tested during review.
Context for LLM agents
Design rationale:
- psql seed over management API: no repository-creation API exists at Step 7, so the harness seeds rows directly. The S12 spec was amended to match, following the code-first pattern.
allow_failureuntil Step 18: gating on all-pass would block every endpoint MR until the suite is complete. The tracked signal is each MR's pass-count delta, read from the JUnit at runtime rather than hardcoded.- The sentinel JUnit,
cache:when:alwaysplus the-sreuse guard, the INT/TERM re-raise, and the comment corrections came from a/review-branchplus/walk-findingspass on this branch.
Non-goals:
- No GC coordination. That lands in S20.
- No object store configuration. Blobs are not pushed until Step 8 and later, so AR boots database-only.
- No real S08 auth. The bootstrap-token stand-in covers the auth-challenge specs until S08 ships.
- The
conformance:ocichanges:rule stays broad because the binary cache makes re-runs cheap. Residual S12 prose about an object store and the S08 auth contract describes the end-state setup and is left for the S12 reimplementation.