Fix bd-346: Auto-flush after renumber/rename-prefix now does full export
Problem: Incremental flush merged dirty issues with existing JSONL, leaving old IDs when issues were renamed (e.g., test-3 remained after renumbering to test-2). Solution: - Add needsFullExport flag to force complete JSONL rebuild from DB - Skip loading existing JSONL when fullExport=true (start with empty map) - Use markDirtyAndScheduleFullExport() in renumber and rename-prefix commands - PersistentPostRun flushes immediately before process exits (respects fullExport) Test: Verified renumber with gaps correctly exports only current IDs to JSONL
This commit is contained in:
@@ -96,8 +96,8 @@ Example:
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Schedule auto-flush to export changes
|
||||
markDirtyAndScheduleFlush()
|
||||
// Schedule full export (IDs changed, incremental won't work)
|
||||
markDirtyAndScheduleFullExport()
|
||||
|
||||
fmt.Printf("%s Successfully renamed prefix from %s to %s\n", green("✓"), cyan(oldPrefix), cyan(newPrefix))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user