devbox/cmd/devbox-hub
shoemoney df33b5facd
Some checks are pending
CI / vet-build-test (push) Waiting to run
fix(hub): gc enumerates prunable manifest chunks before deleting blobs (cross-share double-prune leak)
Content-addressed snapshots can appear as prunable in two shares simultaneously.
The old inline manifestChunks call inside the prune loop read the blob after the
first share's iteration had already deleted it, returning ErrNotFound → nil hashes
→ DeleteSnapshot decremented nothing → chunk stayed at refcount 1 and leaked
forever. Pre-enumerate all chunk lists once before the deletion loop so both
(share,id) decrements always fire with the correct hash list.

No change to dry-run path: it never deletes blobs so ErrNotFound cannot occur there.
2026-06-30 18:30:22 -05:00
..
fsck_share_test.go round5-hub: fsck (at-rest blob integrity) + share ls 2026-06-30 15:28:02 -05:00
fsck_test.go feat(hub): fsck also detects dangling snapshots (manifest refs a missing blob) 2026-06-30 16:25:06 -05:00
gc_crossshare_test.go fix(hub): gc enumerates prunable manifest chunks before deleting blobs (cross-share double-prune leak) 2026-06-30 18:30:22 -05:00
gc_test.go round3-hub: backup, metrics auth, device ls, gc --keep-days, access log 2026-06-30 13:53:16 -05:00
isloopback_test.go round4-hub: non-loopback listen warning, version in startup log, graceful shutdown 🛰️🛑 2026-06-30 14:23:42 -05:00
lock_other.go fix(hub): flock gc against backup so a sweep can't strand a backup mid-copy 🔒💾 2026-06-30 17:27:00 -05:00
lock_test.go fix(hub): flock gc against backup so a sweep can't strand a backup mid-copy 🔒💾 2026-06-30 17:27:00 -05:00
lock_unix.go fix(hub): flock gc against backup so a sweep can't strand a backup mid-copy 🔒💾 2026-06-30 17:27:00 -05:00
main.go fix(hub): gc enumerates prunable manifest chunks before deleting blobs (cross-share double-prune leak) 2026-06-30 18:30:22 -05:00