ref:main

Implement garbage collection and object pruning #4

open Opened by cole.christensen@gmail.com

Links

No links yet.

Problem

There is no mechanism to identify or remove unreachable objects. Storage grows monotonically — deleted branches, force-pushes, and amended commits leave orphaned objects forever.

Impact

  • Storage costs grow without bound
  • No way to reclaim space after branch deletion or history rewrite
  • S3 backend particularly affected due to per-object storage costs

Acceptance Criteria

  • Reachability walk from all refs to identify live objects
  • Pruning of unreachable loose objects older than a configurable grace period
  • Works across all three storage backends
  • Dry-run mode that reports what would be deleted
  • Safety: never deletes objects reachable from any ref
  • Tests covering: orphan cleanup, grace period, concurrent write safety