Repository navigation
feat: shallow snapshot synchronization and storage budgets - #9
Merged
Merged
Conversation
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.
First synchronization now fetches depth-one branch-head snapshots. Later runs reuse objects and retain observed versions; an explicitly requested SHA is fetched on demand and pinned. Repository settings expose pins and a storage budget (100 GiB by default), while collection removes expired Git objects and retired indexes without deleting retained baselines.
Existing published baselines remain pinned when snapshot retention is first adopted. Path-group hydration uses bounded direct object requests compatible with Git 2.30. Git collection publishes a reachable-only replacement pack before removing obsolete packs, including promisor packs; adding snapshots avoids a full rewrite.
Validation: full Go suite, Git/service race tests, web checks and Go vet, release build, and public artifact audit. Real Git fixtures cover shallow/incremental/history fetch, full-history compaction, partial clone hydration, interruption recovery, object reclamation and concurrent retained reads. API tests cover exact-SHA queueing and idempotent retry. Database contract and production container checks run in CI.
Operational bounds: at most 4096 retained snapshots per path group. Storage budgets are sampled, and compaction needs temporary disk headroom protected by the global reserve. Automatic expiry and Git collection run during synchronization. Usage is documented in docs/snapshots.md.