Skip to content

feat: docker variant pull + end-to-end test harness - #5

Merged
achimnol merged 2 commits into
topic/publishfrom
topic/pull
Aug 9, 2026
Merged

feat: docker variant pull + end-to-end test harness#5
achimnol merged 2 commits into
topic/publishfrom
topic/pull

Conversation

@achimnol

Copy link
Copy Markdown
Member

Summary

Stacked PR 5/7 (base: #4). Completes the client-side story: variant-aware pull.

  • docker variant pull REGISTRY/REPO:VERSION: fetch index → detect (or --properties-file) → rank → docker pull by digest → tag as both the base tag and the selected variant tag (ADR-6).
  • Fallback chain per DESIGN.md §4: best variant → null variant (falls out of ranking naturally) → plain base tag with a notice. --no-fallback turns fallbacks into errors; --dry-run prints the ranked candidates and the would-be pull.
  • e2e harness (e2e/run.sh, make e2e, new CI job): disposable registry:2; three variants (cu128/cu126 via variant push, null via plain docker push + index update reconciliation); pull assertions under mocked CUDA-12.8, CUDA-12.6, and CPU-only profiles (verified by inspecting the variant label of what the base tag points to locally); dry-run, missing-index fallback, and --no-fallback failure.

Test results

./e2e/run.sh passes locally end-to-end (all three hardware profiles select the expected variant; fallback and error paths behave). Unit tests and vet unchanged-green.

https://claude.ai/code/session_01D383U8kkQkJc1yzyC5H5Nk

pull fetches the variant index, resolves system properties (real
detection or --properties-file), ranks compatible variants, and pulls
the best match by digest, tagging the result as both the base tag and
the selected variant tag (ADR-6). Missing index or no compatible
variant falls back to the plain base tag with a notice (the null
variant, when indexed, is preferred over that fallback by
construction); --no-fallback makes those cases hard errors and
--dry-run prints the full ranking without pulling.

e2e/run.sh exercises the whole loop against a disposable registry:2:
variant pushes, plain-push + index update reconciliation, selection
under three mocked hardware profiles (asserted via the variant label
of the locally tagged result), dry-run, fallback, and --no-fallback.
Wired into CI as a second job and `make e2e`.

Claude-Session: https://claude.ai/code/session_01D383U8kkQkJc1yzyC5H5Nk
grep -q exits on the first match; if the plugin is still writing its
ranking output, the write hits a closed pipe, Go's runtime raises
SIGPIPE for stdout, and with pipefail the whole check fails. Capture
the output first, as the fallback check already does.

Claude-Session: https://claude.ai/code/session_01D383U8kkQkJc1yzyC5H5Nk
@achimnol
achimnol merged commit 3b3ee13 into main Aug 9, 2026
2 checks 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