fix: GC has no grace period (TOCTOU with dedup uploads) #71
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
FindOrphanedBlobs(internal/database/artifacts.go:112) returns any blob not currently referenced. Because CAS dedups (blob row can exist before its artifact/local_files row is written), a concurrent upload reusing an existing hash can have its S3 object deleted mid-flight byinternal/gc/gc.go. Add an age filter so only comfortably-old orphans (e.g. created_at < now()-1h) are collected.