feat: variant index publishing (push / list / inspect / index update) - #4
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked PR 4/7 (base: #3). Implements the Phase A registry side — client-maintained variant index artifacts:
--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.BuildIndexscans<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.dockerCLI shell-outs (push/pull/tag/inspect-labels) per ADR-4.docker variant push(validates the tag suffix equals the image'sdev.pep817.variant-label, pushes, upserts the-variantsindex),list(match-ranked table + best-match line),inspect,index update(reconcile after plaindocker pushes — the recovery path for ADR-3's accepted race).Testing
ErrNoIndex, config-label traversal (direct manifest, via manifest list, empty list, unknown media type).registry:2:push→inspect; plaindocker pushof a null variant →index updatediscovers it by scan;listranks cu128 docs: plan and v1 design for PEP 817-style image variants #1 under a mocked CUDA-12.8 host and null docs: plan and v1 design for PEP 817-style image variants #1 under a CPU-only host.https://claude.ai/code/session_01D383U8kkQkJc1yzyC5H5Nk