⚡ Scope deletion-reference validation to organization instead of full DB scan #11

Merged
longtao.wu merged 1 commits from fix/project-deletion-org-wide-scan-perf-2 into dev 2026-09-22 20:30:51 +08:00
Owner

PR #9 scoped the run/workflow counting pass in buildProjectDeletionPlan but missed validateDeletionReferences, which still called ListAllWorkflows/ListRunArtifacts(ctx, "") — an unscoped scan across every organization on every project deletion preview. Scopes both to plan.OrganizationID. Tests: go build ./..., go test ./internal/api/... ./internal/store/... (TestProjectDeletion*/TestWorkflowDeletionPreview* pass; no new failures vs the pre-existing 75-failure baseline).

🤖 Generated with Claude Code

PR #9 scoped the run/workflow counting pass in buildProjectDeletionPlan but missed validateDeletionReferences, which still called ListAllWorkflows/ListRunArtifacts(ctx, "") — an unscoped scan across every organization on every project deletion preview. Scopes both to plan.OrganizationID. Tests: go build ./..., go test ./internal/api/... ./internal/store/... (TestProjectDeletion*/TestWorkflowDeletionPreview* pass; no new failures vs the pre-existing 75-failure baseline). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
longtao.wu added 1 commit 2026-09-22 20:30:46 +08:00
PR #9 scoped the run/workflow counting pass in buildProjectDeletionPlan
but missed validateDeletionReferences, which still called
ListAllWorkflows/ListRunArtifacts(ctx, "") — an unscoped scan across
every organization's workflows and runs on every single project
deletion preview. This is why SL-data and BLF-data deletion previews
kept hanging even after the earlier fix was deployed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
longtao.wu merged commit d368d21bff into dev 2026-09-22 20:30:51 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: longtao.wu/droboticflow#11
No description provided.