Found while working #1363 (the project-sidebar addressing fix), and deliberately left out of that PR: it is a cleanup defect, not an addressing one, and #1363's branch already touches this file for a different reason.
Measured
On 1.12.0.dev20, one clean --workers=1 --retries=0 run of tests/tests-automations/regression/mcp/server/mcp-server-starter-projects.spec.ts, counted against GET /api/v1/flows/?get_all=true and GET /api/v1/projects/ before and after:
| File |
flows |
projects |
mcp-server-starter-projects.spec.ts |
+1 |
+1 |
Every sibling in core-functionality/project-management/ measured 0 in the same sweep (folder-crud, folder-deletion-integrity, bulk-actions, flow-navigation-between-folders, folder-drag-drop-flow), so this file is the outlier, not the norm.
The two leaks
- The flow — test 2 (
user must not be able to add duplicate mcp servers from starter projects) opens the Basic Prompting template, which POST /api/v1/flows/ creates, and nothing deletes it. The file has no afterEach at all.
- The project — test 1 (
user must be able to see starter projects for mcp servers) creates two projects and only ever deletes the one it renames to renamed_project. The second survives the test.
Why the project half looks like zero and is not
The account count comes back flat across consecutive runs, which reads as "no leak". It is not: cleanOldFolders(page) at the top of test 1 sweeps the previous run's leftover. The file is clean only because the next run cleans up after it — and #1363 is precisely the incident where that dependency stopped holding. When upstream re-keyed the sidebar testid, cleanOldFolders silently deleted nothing, and the daily's own retries recorded New Project through New Project (5) accumulating inside a single attempt.
So the leak is latent by design today, and the blast radius is whatever cleanOldFolders happens to be able to do.
Done when
Refs #1363, #515, #1023.
Found while working #1363 (the project-sidebar addressing fix), and deliberately left out of that PR: it is a cleanup defect, not an addressing one, and #1363's branch already touches this file for a different reason.
Measured
On
1.12.0.dev20, one clean--workers=1 --retries=0run oftests/tests-automations/regression/mcp/server/mcp-server-starter-projects.spec.ts, counted againstGET /api/v1/flows/?get_all=trueandGET /api/v1/projects/before and after:mcp-server-starter-projects.spec.tsEvery sibling in
core-functionality/project-management/measured0in the same sweep (folder-crud,folder-deletion-integrity,bulk-actions,flow-navigation-between-folders,folder-drag-drop-flow), so this file is the outlier, not the norm.The two leaks
user must not be able to add duplicate mcp servers from starter projects) opens the Basic Prompting template, whichPOST /api/v1/flows/creates, and nothing deletes it. The file has noafterEachat all.user must be able to see starter projects for mcp servers) creates two projects and only ever deletes the one it renames torenamed_project. The second survives the test.Why the project half looks like zero and is not
The account count comes back flat across consecutive runs, which reads as "no leak". It is not:
cleanOldFolders(page)at the top of test 1 sweeps the previous run's leftover. The file is clean only because the next run cleans up after it — and #1363 is precisely the incident where that dependency stopped holding. When upstream re-keyed the sidebar testid,cleanOldFolderssilently deleted nothing, and the daily's own retries recordedNew ProjectthroughNew Project (5)accumulating inside a single attempt.So the leak is latent by design today, and the blast radius is whatever
cleanOldFoldershappens to be able to do.Done when
afterEachcleanup (thetrackCreatedFlows+createdFlowIds/createdProjectIdspatternfolder-deletion-integrity.spec.tsalready uses), covering both tests.deleteProjecttreats the404of the UI-deleted one as the desired end state.cleanOldFoldersstays where it is — it guards against other runs' leftovers, and this issue does not make it redundant.Refs #1363, #515, #1023.