Fix validatePostImport false positive for legitimate deletions (bd-pg1)
The sync validation was incorrectly triggering 'data loss detected' when issue count decreased after import, even for legitimate deletions recorded in deletions.jsonl. Changes: - Modified validatePostImport to accept jsonlPath and check deletions manifest - When issue count decreases, check if decrease is within recorded deletions - Updated all call sites in sync.go and daemon_sync.go - Added comprehensive tests for deletion-aware validation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -332,7 +332,7 @@ Use --merge to merge the sync branch back to main branch.`,
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Warning: failed to count issues after import: %v\n", err)
|
||||
} else {
|
||||
if err := validatePostImport(beforeCount, afterCount); err != nil {
|
||||
if err := validatePostImport(beforeCount, afterCount, jsonlPath); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Post-import validation failed: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user