fix(workspace): make Pause/Resume cascade opt-in via ?cascade=true #2122
Reference in New Issue
Block a user
Delete Branch "fix/pause-resume-cascade-opt-in-1991"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #1991
Makes the implicit recursive Pause/Resume cascade opt-in via
?cascade=truequery parameter. Without the flag, only the named workspace is paused/resumed; with the flag, the full descendant subtree is collected viaWITH RECURSIVE descendantsand processed.Caller-impact assessment (CEO Assistant ruling)
Grep across
molecule-aiorg identified live callers that depend on implicit cascade and will break with 409 Conflict if this PR merges as-is:canvas/src/components/ContextMenu.tsxcanvas/src/store/canvas.tsmolecule-mcp-server/src/tools/management/index.tspause_workspace/resume_workspacetools failmolecule-mcp-server/src/tools/workspaces.tspause_workspace/resume_workspacetools failBranch B executed: migrate callers FIRST, keep #2122 on HOLD until follow-ups merge.
Merge dependency chain
molecule-core) — Canvas frontend?cascade=truemigrationmolecule-mcp-server) — MCP server?cascade=truemigrationmainTest plan
cascade=trueand default (non-cascade) pathspaused_count/resumed_countcorrectly reflects affected workspace countcore-be referenced this pull request2026-06-05 00:51:42 +00:00
a5b89524a6to22ee2b0e735-axis review: APPROVED.
Correctness: This makes pause/resume cascade behavior explicit: parent workspaces with eligible descendants now return 409 unless the caller passes ?cascade=true, while ?cascade=true preserves the prior recursive pause/resume behavior. The tests cover no-cascade conflict and cascade success for both pause and resume.
Robustness: The response includes descendant IDs/names so callers can make an informed cascade retry. Existing descendant query errors still fail normally rather than silently partial-applying. Security: no auth or secret handling changes. Performance: the recursive descendant query already existed; the added list construction is bounded by the same result set. Readability: the new branches are localized and the tests make the new contract clear.
Required-context review: head
22ee2b0e73is mergeable; CI/all-required, E2E API Smoke, Handlers PG, and Canvas are green. Combined red was not used as the merge gate.merge-queue: updated this branch with
mainate441def8b3a8. Waiting for CI on the refreshed head.New commits pushed, approval review dismissed automatically according to repository settings
merge-queue: updated this branch with
mainat31283a292a34. Waiting for CI on the refreshed head.merge-queue: updated this branch with
mainatd768d8667b0f. Waiting for CI on the refreshed head.APPROVED on current head
35ed79dc3a. 5-axis review: Pause/Resume now fail closed with 409 when descendants exist unless?cascade=trueis explicit, preventing accidental subtree operations. Cascade=true preserves prior multi-workspace behavior; tests cover no-cascade 409 and cascade success for both pause and resume. No auth, gate, or merge-control changes; BP-required contexts are present+green.APPROVE: verified current head, BP-required contexts present+green, mergeable=true. Cascade pause/resume is fail-closed by default: descendants block unless cascade=true is explicit; tests cover no-cascade 409 and cascade success. No gate/auth/merge-control weakening found.