From eb18d342f4157da10cf7223adcd314c21eada14f Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Fri, 31 Oct 2025 13:39:38 -0700 Subject: [PATCH] Fix: Treat same-ID updates as normal updates, not collisions (bd-0134cc5a) --- internal/importer/importer.go | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/internal/importer/importer.go b/internal/importer/importer.go index bb8cee2b..ddd78233 100644 --- a/internal/importer/importer.go +++ b/internal/importer/importer.go @@ -206,24 +206,12 @@ func handleCollisions(ctx context.Context, sqliteStore *sqlite.SQLiteStorage, is result.CollisionIDs = append(result.CollisionIDs, collision.ID) } - // Handle collisions - with hash IDs, collisions shouldn't happen + // With hash IDs, "collisions" (same ID, different content) are actually UPDATES + // Hash IDs are based on creation content and remain stable across updates + // So same ID + different fields = normal update operation, not a collision + // The collisionResult.Collisions list represents issues that will be updated if len(collisionResult.Collisions) > 0 { - // Hash-based IDs make collisions extremely unlikely (same ID = same content) - // If we get here, it's likely a bug or manual ID manipulation - return nil, fmt.Errorf("collision detected for issues: %v (this should not happen with hash-based IDs)", result.CollisionIDs) - - // Remove colliding issues from the list (they're already processed) - filteredIssues := make([]*types.Issue, 0) - collidingIDs := make(map[string]bool) - for _, collision := range collisionResult.Collisions { - collidingIDs[collision.ID] = true - } - for _, issue := range issues { - if !collidingIDs[issue.ID] { - filteredIssues = append(filteredIssues, issue) - } - } - return filteredIssues, nil + result.Updated = len(collisionResult.Collisions) } // Phase 4: Renames removed - obsolete with hash IDs (bd-8e05)