diff --git a/internal/api/project_deletion.go b/internal/api/project_deletion.go index 094e1d68..e31033cc 100644 --- a/internal/api/project_deletion.go +++ b/internal/api/project_deletion.go @@ -452,9 +452,14 @@ func (s *server) deleteProjectTarget(ctx context.Context, plan domain.ProjectDel } return nil case "bos": - if err := s.validateDeletionReferences(ctx, plan); err != nil { - return err - } + // validateDeletionReferences is already re-run once by + // executeProjectDeletion immediately before it starts processing + // non-runtime targets (the runtimeDone gate) — that is the right + // point to catch a run created between plan-build and execution + // referencing this path. Re-running the whole org-wide validation + // again here, per bos target, made a project with a few thousand + // BOS targets take hours (each call re-fetches and re-scans every + // other run in the organization). browser, conn, cleanup, err := s.resolveObjectStorageBrowser(ctx, t.ConnectionID) if err != nil { return err