Repository navigation
Description
Summary
The repository weighs ~90 MB on GitHub (size = 92,650 KB via the API) even though the current HEAD tree is only 3.58 MB of content — and 2.85 MB of that is assets/logo.png. Basically all of the weight lives in git history, not in the current source: build artifacts from .zig-cache-local/ and .zig-cache-local2/ were committed at some point and, although the files were later deleted, the blobs remain in history.
Evidence
Measured on main:
| Metric | Value |
|---|---|
GitHub repo size |
92,650 KB (~90.5 MB) |
| Total blob bytes across all reachable history | 269.5 MB |
Blobs under .zig-cache-local* |
209 objects / 207.9 MB |
Current HEAD tree (all tracked files) |
3.58 MB |
assets/logo.png alone (tracked at HEAD) |
2.85 MB |
Local packed .git |
49 MB |
So ~208 MB of history content is Zig build cache, while the checked-out sources are under a megabyte.
Largest single blobs in history:
9,134,656 .zig-cache-local/o/40435bca1bddd9dafc626fd817bd6ca3/build_zcu.o
5,257,624 .zig-cache-local/o/40435bca1bddd9dafc626fd817bd6ca3/build
3,591,464 .zig-cache-local/o/ee904ac84d4097604e4ec01a334e3aae/test_zcu.o
3,562,808 .zig-cache-local/o/63562846be42afb502b9dcffbb39fb2e/test_zcu.o
3,479,416 .zig-cache-local2/o/06f1f62c188b4fa32d663295a4002a2d/test_zcu.o
3,479,416 .zig-cache-local/o/0e8c9548db5580712ab9efbee53d0b26/test_zcu.o
Only 4 commits ever touched these paths. They were added by the orchestration/runtime commits and removed by 2200d0a ("chore: remove tracked junk files, update gitignore") — but deleting the files does not shrink history, so every clone still downloads them. .zig-cache-local/, .zig-cache-local2/ and zig-out/ are all in .gitignore today, so this is history-only, not an ongoing regression.
Impact
- Every clone/fetch pulls tens of MB of dead build cache; packfile download dominates first-time setup and CI checkout.
- GitHub repo size and local
.gitstay inflated (~49 MB packed after compression, ~90 MB as reported by GitHub). assets/logo.pngat 2.85 MB is 80% of the current tree and also ships as an asset.
Suggested fix
- Rewrite history to drop the cache directories, e.g.
git filter-repo --path .zig-cache-local/ --path .zig-cache-local2/ --invert-paths(or BFG), then force-pushmainand ask forks to re-clone. - In the same pass, consider shrinking
assets/logo.png(2.85 MB -> a few hundred KB is achievable with lossless re-compression or a resized variant). - Keep the existing
.gitignoreentries so it cannot recur, and optionally add a CI guard that fails if a tracked path matches.zig-cache*orzig-out/. - After the rewrite, verify with
gh api repos/justrach/codedb --jq .sizeand a fresh bare clone that the report drops from ~90 MB toward the ~1 MB of real source.
Activity
justrach commentedon Oct 3, 2026
@codegraff-bot can you review and fix this, perhaps see if you can replicate it in more than one ways
codegraff-bot commentedon Oct 3, 2026
On it — I picked up:
Running on your Codegraff account — I'll open a pull request here when it's done.
codegraff-bot commentedon Oct 3, 2026
Done — opened #769
🤖 codegraff-bot
chore(repo): untrack codedb.snapshot and guard against tracked build …
justrach commentedon Nov 9, 2026
Resolved:
mainwas already cleaned of.zig-cache-local*andassets/logo.png, and the remaining 65.23 MB of compressed packfile bloat (.zig-global-cache/,experiments/embed-distill/,.graff/) lived on the orphaned branchcursor/cloud-agent-1786946255415-h4jfw. Deleting that branch and closed PR branches reduced a fresh bare clone packfile from 92.45 MiB → 26.86 MiB (andrefs/heads/mainalone is 15.07 MiB).codedb.snapshotfromHEAD, added.zig-cache*/,.zig-global-cache/, andcodedb.snapshot.*to.gitignore, and added a CI guard inbench-regression.ymlrejecting tracked build caches or snapshots.