This repository was archived by the owner on Jan 24, 2026. It is now read-only.
Repository navigation
refactor!: move internal interfaces to internal/contracts - #29
Merged
jmgilman merged 2 commits intoJan 10, 2026
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
blobber | 74f558f | Commit Preview URL Branch Preview URL |
Jan 10 2026, 07:03 PM |
Move implementation interfaces from core/types.go (public API) to internal/contracts/contracts.go to avoid exposing internal contracts to external consumers. Changes: - Create internal/contracts package with Registry, ArchiveBuilder, ArchiveReader, BlobHandle, BlobSource, PathValidator, and Extractor - Remove adapter pattern from internal packages (archive, registry, safepath) - implementations now satisfy contracts directly - Remove contracts.go from root package (unexported interface aliases) - Remove unused BlobHandle/BlobSource type aliases from cache.go - Make NewImageFromBlob/NewImageFromHandle unexported (internal only) - Update image_test.go to package blobber for internal function access - Clean up core/types.go to contain only public data types BREAKING CHANGE: Remove public interfaces (Registry, ArchiveBuilder, ArchiveReader, PathValidator, BlobHandle, BlobSource, Extractor) from core/types.go and type aliases from root package. Remove exported functions NewImageFromBlob and NewImageFromHandle. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
jmgilman
force-pushed
the
codex/define-minimal-unexported-interfaces-in-root
branch
from
January 10, 2026 19:02
41f9353 to
74f558f
Compare
jmgilman
deleted the
codex/define-minimal-unexported-interfaces-in-root
branch
January 10, 2026 19:06
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
core/types.go(public API) tointernal/contracts/contracts.goto avoid exposing internal contracts to external consumersChanges
Create
internal/contractspackage containing:Registry- OCI registry operationsArchiveBuilder/ArchiveReader- eStargz blob building and readingBlobHandle/BlobSource- cached blob accessPathValidator- path security validationExtractor- archive extractionRemove adapter wrappers from internal packages:
internal/archive/adapter.go(deleted)internal/registry/adapter.go(deleted)internal/safepath/adapter.go(deleted)Clean up root package:
contracts.go(unexported interface aliases)BlobHandle/BlobSourcetype aliases fromcache.goNewImageFromBlob/NewImageFromHandleunexportedSimplify
core/types.go:internal/contracts)Update documentation to reflect new architecture
Test plan
just ci(lint, test, build) - all checks pass🤖 Generated with Claude Code