From 003a7d98db9faca08c276d47bf9ca550b6dd559f Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Wed, 17 Dec 2025 23:32:37 -0800 Subject: [PATCH] fix: Exclude closed issues from orphan detection warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No point warning about orphaned issues that are already closed or tombstoned - they're dead either way. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- internal/storage/sqlite/migrations/016_orphan_detection.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/storage/sqlite/migrations/016_orphan_detection.go b/internal/storage/sqlite/migrations/016_orphan_detection.go index fb84b166..26b99934 100644 --- a/internal/storage/sqlite/migrations/016_orphan_detection.go +++ b/internal/storage/sqlite/migrations/016_orphan_detection.go @@ -37,8 +37,8 @@ func MigrateOrphanDetection(db *sql.DB) error { (id GLOB '*.[0-9]' OR id GLOB '*.[0-9][0-9]' OR id GLOB '*.[0-9][0-9][0-9]' OR id GLOB '*.[0-9][0-9][0-9][0-9]') -- Parent (remove trailing digits then dot) must not exist AND rtrim(rtrim(id, '0123456789'), '.') NOT IN (SELECT id FROM issues) - -- Skip tombstones - they're already deleted - AND status != 'tombstone' + -- Skip tombstones and closed issues - no point warning about dead orphans + AND status NOT IN ('tombstone', 'closed') ORDER BY id `) if err != nil {