From f4b8a7ad4f7eb3bd47b24357f69f22bc1a75d4b7 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Wed, 3 Dec 2025 22:44:59 -0800 Subject: [PATCH] feat: change deletions TTL default from 7 to 3 days MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reduces the default retention period for deletion manifest entries. Shorter TTL limits blast radius of stale deletions that can poison beads installations when agents get out of sync. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- cmd/bd/compact.go | 2 +- internal/configfile/configfile.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/bd/compact.go b/cmd/bd/compact.go index b8ac50ab..d83e299d 100644 --- a/cmd/bd/compact.go +++ b/cmd/bd/compact.go @@ -53,7 +53,7 @@ Tiers: Deletions Pruning: All modes also prune old deletion records from deletions.jsonl to prevent - unbounded growth. Default retention is 7 days (configurable via --retention + unbounded growth. Default retention is 3 days (configurable via --retention or deletions_retention_days in metadata.json). Examples: diff --git a/internal/configfile/configfile.go b/internal/configfile/configfile.go index 9a9854b8..3c1a6db0 100644 --- a/internal/configfile/configfile.go +++ b/internal/configfile/configfile.go @@ -14,7 +14,7 @@ type Config struct { JSONLExport string `json:"jsonl_export,omitempty"` // Deletions configuration - DeletionsRetentionDays int `json:"deletions_retention_days,omitempty"` // 0 means use default (7 days) + DeletionsRetentionDays int `json:"deletions_retention_days,omitempty"` // 0 means use default (3 days) // Deprecated: LastBdVersion is no longer used for version tracking. // Version is now stored in .local_version (gitignored) to prevent @@ -104,7 +104,7 @@ func (c *Config) JSONLPath(beadsDir string) string { } // DefaultDeletionsRetentionDays is the default retention period for deletion records. -const DefaultDeletionsRetentionDays = 7 +const DefaultDeletionsRetentionDays = 3 // GetDeletionsRetentionDays returns the configured retention days, or the default if not set. func (c *Config) GetDeletionsRetentionDays() int {