Skip to content

feat: variant index publishing (push / list / inspect / index update) - #4

Merged
achimnol merged 1 commit into
topic/providers-detectfrom
topic/publish
Aug 9, 2026
Merged

feat: variant index publishing (push / list / inspect / index update)#4
achimnol merged 1 commit into
topic/providers-detectfrom
topic/publish

Conversation

@achimnol

Copy link
Copy Markdown
Member

Summary

Stacked PR 4/7 (base: #3). Implements the Phase A registry side — client-maintained variant index artifacts:

  • pkg/oci: oras-go v2 client with Docker credential-store auth; plain HTTP auto-enabled for loopback registries (plus --plain-http). Index artifact fetch/push are target-generic (FetchIndexFrom/PushIndexTo) so they unit-test against in-memory stores and will be reused verbatim by the proxy. BuildIndex scans <version>-<label> tags and reads config labels, descending manifest lists and handling both OCI and Docker schema2 media types; inconsistent tags (label/tag drift, unlabeled images) are skipped with warnings.
  • pkg/docker: docker CLI shell-outs (push/pull/tag/inspect-labels) per ADR-4.
  • CLI: docker variant push (validates the tag suffix equals the image's dev.pep817.variant-label, pushes, upserts the -variants index), list (match-ranked table + best-match line), inspect, index update (reconcile after plain docker pushes — the recovery path for ADR-3's accepted race).

Testing

https://claude.ai/code/session_01D383U8kkQkJc1yzyC5H5Nk

pkg/oci wraps oras-go v2 with Docker credential-store auth and
loopback plain-HTTP detection, and implements the index artifact I/O:
FetchIndexFrom/PushIndexTo work against any OCI target (unit-tested on
in-memory stores), and BuildIndex reconstructs an index by scanning
"<version>-<label>" tags and reading config labels through either OCI
or Docker schema2 manifests and manifest lists — the same computation
the Phase B proxy will serve.

pkg/docker shells out to the docker CLI for engine ops (ADR-4).

New subcommands: `push` (docker push + index upsert, validating tag
suffix against the image's variant label), `list` (table with per-host
match ranking), `inspect` (raw index JSON), and `index update`
(rebuild-from-scan, reconciling plain docker pushes).

Smoke-tested against a local registry:2: push, plain-push + index
update discovery, and list under GPU/CPU-only mocked properties.

Claude-Session: https://claude.ai/code/session_01D383U8kkQkJc1yzyC5H5Nk
@achimnol
achimnol merged commit 2793fe6 into main Aug 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant