Skip to content

feat: shallow snapshot synchronization and storage budgets - #9

Merged
qiansc merged 5 commits into
mainfrom
feat/snapshot-retention
Oct 28, 2026
Merged

qiansc merged 5 commits into
mainfrom
feat/snapshot-retention

Conversation

@qiansc

@qiansc qiansc commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

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.

@qiansc
qiansc merged commit 94e38a5 into main Oct 28, 2026
3 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