Fix: Add auto-flush to renumber, rename-prefix, and compact commands

These commands modify issues in bulk but weren't triggering auto-export
to JSONL. This caused database and JSONL to get out of sync.

Added markDirtyAndScheduleFlush() calls to:
- bd renumber (after renumbering completes)
- bd rename-prefix (after prefix rename completes)
- bd compact (after single/batch compaction)
- bd delete (already had it)

Fixes the issue where massive cleanups weren't exported to JSONL.

Amp-Thread-ID: https://ampcode.com/threads/T-a43dc9fa-e9bc-43c7-9055-33acc08bc642
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Steve Yegge
2025-10-16 20:50:40 -07:00
parent 872f203c57
commit 8347e5bcd7
3 changed files with 14 additions and 0 deletions

View File

@@ -127,6 +127,9 @@ Risks:
os.Exit(1)
}
// Schedule auto-flush to export changes
markDirtyAndScheduleFlush()
fmt.Printf("%s Successfully renumbered %d issues\n", green("✓"), len(issues))
// Count actual changes