Complete bd-95: Add content-addressable identity (ContentHash field)

This commit is contained in:
Steve Yegge
2025-10-28 18:57:16 -07:00
parent ad267b5de6
commit d9eb273e15
10 changed files with 287 additions and 45 deletions

View File

@@ -375,6 +375,14 @@ func RemapCollisions(ctx context.Context, s *SQLiteStorage, collisions []*Collis
// Process each collision based on which version should be remapped
for _, collision := range collisions {
// Skip collisions with nil issues (shouldn't happen but be defensive)
if collision.IncomingIssue == nil {
return nil, fmt.Errorf("collision %s has nil IncomingIssue", collision.ID)
}
if collision.ExistingIssue == nil {
return nil, fmt.Errorf("collision %s has nil ExistingIssue", collision.ID)
}
oldID := collision.ID
// Allocate new ID using atomic counter