Fix bd-437: Use addDependencyUnchecked during collision resolution

When remapping dependencies during collision resolution, skip semantic
validation (like parent-child direction checks) since we're just updating
IDs on existing dependencies that were already validated.

Fixes parent-child validation error during import --resolve-collisions.
This commit is contained in:
Steve Yegge
2025-10-16 13:42:47 -07:00
parent 21bd7809b5
commit 4fe648d140
2 changed files with 112 additions and 1 deletions

View File

@@ -474,7 +474,9 @@ func updateDependencyReferences(ctx context.Context, s *SQLiteStorage, idMapping
}
// Add new dependency with updated IDs
if err := s.AddDependency(ctx, update.newDep, "import-remap"); err != nil {
// Use addDependencyUnchecked to skip semantic validation (like parent-child direction)
// since we're just remapping existing dependencies that were already validated
if err := s.addDependencyUnchecked(ctx, update.newDep, "import-remap"); err != nil {
return fmt.Errorf("failed to add updated dependency %s -> %s: %w",
update.newDep.IssueID, update.newDep.DependsOnID, err)
}