Skip to content

Commit f05a75e

Browse files
JAORMXclaude
andcommitted
Refactor: use oras.CopyGraph/Copy, add storeAdapter, fix review findings
Replace ~350 lines of manual staging/storing code with ORAS's built-in oras.CopyGraph (push) and oras.Copy (pull). Introduce storeAdapter to bridge the local Store with ORAS content interfaces. Key changes: - storeAdapter wraps Store, routing by media type to PutManifest/PutBlob - validatingTarget enforces size/count limits on the pull path - oras.CopyGraph handles recursive graph traversal for push - oras.Copy handles recursive pull with automatic tagging - Removed SetPlainHTTP mutable setter (WithPlainHTTP option suffices) - Removed all manual staging/storing helpers Review findings addressed: - Compile-time interface assertions for storeAdapter and validatingTarget - Exists distinguishes not-found from real I/O errors - Digest integrity verification in both storeAdapter and validatingTarget - Size cap on storeAdapter.Push (defense-in-depth) - Comment clarifying double-tag behavior in Pull Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent bf4715b commit f05a75e

2 files changed

Lines changed: 286 additions & 623 deletions

File tree

0 commit comments

Comments
 (0)