feat: add --hard flag to bd cleanup for bypassing tombstone TTL safety
Adds the ability to permanently remove tombstones before the default 30-day TTL: - bd cleanup --hard --older-than N: prune tombstones older than N days - bd cleanup --hard: prune all tombstones This bypasses sync safety for scenarios like cleaning house after extended absence where resurrection from old clones is not a concern. Closes: bd-adoe 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -457,8 +457,8 @@ func TestPruneExpiredTombstones(t *testing.T) {
|
||||
defer func() { dbPath = originalDBPath }()
|
||||
dbPath = filepath.Join(beadsDir, "beads.db")
|
||||
|
||||
// Run pruning
|
||||
result, err := pruneExpiredTombstones()
|
||||
// Run pruning (0 = use default TTL)
|
||||
result, err := pruneExpiredTombstones(0)
|
||||
if err != nil {
|
||||
t.Fatalf("pruneExpiredTombstones failed: %v", err)
|
||||
}
|
||||
@@ -551,8 +551,8 @@ func TestPruneExpiredTombstones_NoTombstones(t *testing.T) {
|
||||
defer func() { dbPath = originalDBPath }()
|
||||
dbPath = filepath.Join(beadsDir, "beads.db")
|
||||
|
||||
// Run pruning - should return zero pruned
|
||||
result, err := pruneExpiredTombstones()
|
||||
// Run pruning - should return zero pruned (0 = use default TTL)
|
||||
result, err := pruneExpiredTombstones(0)
|
||||
if err != nil {
|
||||
t.Fatalf("pruneExpiredTombstones failed: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user