PackLog: git packs appended into a numbered log

A pack log is Keeper's sole object storage: a numbered append-only file holding git packs back-to-back, never mutated in place. The goal is a store trivially git-exchangeable that still never rewrites packs, so bytes copy verbatim and a dropped branch is just a refs tombstone. The method: keep git's pack encoding but strip the per-pack header and checksum, append object records to the project's tail log, and index every object and pack boundary in the Indices so a valid packfile reframes on the fly.

Numbered append-only logs

A log is named NNNNN.keeper with a 10-char RON64 store-wide sequential seqno, so a file_id names a log uniquely; the file sits in the project shard that wrote it.

Many packs per log, stripped framing

One log holds many packs back-to-back; a new log starts only past a size threshold, so a lone local commit appends to the tail rather than opening a file.

Intra-pack object order

Within a pack, objects MUST follow git's type order — commits, trees, blobs, tags; keeper makes the implicit git repack grouping an explicit invariant writers enforce and readers trust.

Delta-dependency rules

Two git delta encodings get two base rules; together they keep every project shard self-contained, so a shard copies or recompacts in isolation.

Pack bookmarks

Every appended pack also gets a bookmark index entry recording its extent, so per-pack reconstruction for the wire is O(1) — no varint scan, no inflation.

Epoch recompaction replaces GC

Keeper never rewrites or GCs packs live; dropping a branch is a refs tombstone and its objects linger until an out-of-band epoch.