Skip to content

Add OCI Referrers API and image index support#11

Merged
coryodaniel merged 8 commits intomainfrom
feat/referrers-support
Mar 31, 2026
Merged

Add OCI Referrers API and image index support#11
coryodaniel merged 8 commits intomainfrom
feat/referrers-support

Conversation

@coryodaniel
Copy link
Copy Markdown
Member

@coryodaniel coryodaniel commented Mar 31, 2026

Summary

  • Add GET /v2/<name>/referrers/<digest> endpoint per OCI Distribution Spec
  • Handle image index manifests (application/vnd.oci.image.index.v1+json) in parser and storage
  • Move blob validation from storage adapters to the registry layer
  • Add Link header for paginated tag list responses
  • Maintain referrer reverse index on manifest store (subject digest → referring descriptors)
  • Support artifactType query param filtering with OCI-Filters-Applied response header
  • Bump version to 0.1.0

Test plan

  • All existing conformance tests pass (pull, push, content discovery)
  • 4 new referrers conformance tests enabled and passing (nonexistent digest, existing digest, artifact type filter, missing manifest subject)
  • Image index manifest PUT no longer crashes (was the original blocker)

🤖 Generated with Claude Code

Closes #4

coryodaniel and others added 8 commits March 31, 2026 15:53
Snapshot of in-progress work before resuming development.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
User prompts:
- "lets work through it adding support"
- "fix this warning: Module.eval_quoted/2 is deprecated"

Changes:
- Parser: handle application/vnd.oci.image.index.v1+json content type
- Registry: move blob validation from storage adapter to registry layer
  with referenced_blobs/1 that handles manifest vs index types
- Local storage: store_manifest now just stores, no blob validation
- Fix deprecated Module.eval_quoted -> Code.eval_quoted
- Update TODO checklists in registry.ex and handler.ex

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
User prompts:
- "finish the referrers marking todos off as you go"
- "Enable appropriate tests suite in generate_report/0"

Changes:
- Add GET /v2/<name>/referrers/<digest> endpoint
- Index subject->referrer relationship on manifest store
- Add list_referrers/put_referrer to storage adapter behaviour
- Implement referrer storage in local adapter (JSON files per subject)
- Build referrer descriptors with mediaType, digest, size, artifactType, annotations
- Support artifactType query param filtering with OCI-Filters-Applied header
- Uncomment referrers conformance tests in 03_discovery_test.go
- All 4 referrers conformance tests passing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
User prompts:
- "pass the filters to list_referrers so the adapter can do the filtering"

Changes:
- Add filters map param to list_referrers in adapter behaviour, registry, and local impl
- Handler builds filters from query params and passes down
- Adapter can filter efficiently at query time

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Changes:
- Add Link header with rel="next" for paginated tag list responses
- Remove OCI-Subject TODO (reading from manifest body is correct)
- Remove completed TODO checklist from list_tags
- Bump version to 0.1.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
See #12

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coryodaniel coryodaniel merged commit feab01d into main Mar 31, 2026
1 check failed
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.

Referrers API Support (and config to enable / disable)

1 participant