Skip to content

[Chore] Unskip VS Code e2e replay for subtasks#94

Draft
roomote[bot] wants to merge 3 commits into
mainfrom
chore-unskip-e2e-subtasks
Draft

[Chore] Unskip VS Code e2e replay for subtasks#94
roomote[bot] wants to merge 3 commits into
mainfrom
chore-unskip-e2e-subtasks

Conversation

@roomote
Copy link
Copy Markdown
Contributor

@roomote roomote Bot commented May 13, 2026

Opened on behalf of Elliott de Launay. View the task or mention @roomote for follow-up asks.

What problem this solves

Fixes an issue where the subtasks VS Code e2e replay still missed the cancelled-child resume path, which left delegated cancellation behavior under-covered and could let a cancelled child reopen its parent when it later finished.

Why this change was made

This keeps the test on the same cancelled child, validates the actual follow-up tool results in replay mode, teaches mock mode how the resumed child re-asks the follow-up, and detaches a user-cancelled delegated child from the parent it was previously blocking before that child is rehydrated.

AttemptCompletionTool mirrors that detach with an idempotency guard so a cancelled-then-resumed child whose parent is no longer awaiting it falls through to the normal completion-ask flow instead of delegating back into the parent.

User impact

No direct UI change. The subtasks replay suite now catches delegated cancellation regressions, and a cancelled delegated child can finish without reviving the parent task it was cancelled out of.

Related PRs

@roomote roomote Bot added the roomote:auto-resolve-conflicts Allow Roomote to auto-resolve merge conflicts for this PR label May 13, 2026
@roomote
Copy link
Copy Markdown
Contributor Author

roomote Bot commented May 13, 2026

No actionable issues found. See task

  • apps/vscode-e2e/src/suite/subtasks.test.ts is unskipped again on the current head.
  • The spawned-child wait now follows the active task from the end of api.getCurrentTaskStack(), so the replay reaches the delegated cancellation path instead of timing out on the parent task.
  • apps/vscode-e2e/src/suite/subtasks.test.ts: the cancellation probe now stays on the same cancelled child instead of starting anotherTaskId, so the test still exercises the parent-awaiting-child state after cancellation.
  • apps/vscode-e2e/src/fixtures/subtasks.ts: the follow-up fixtures now validate the actual tool result payload and cover the resumed-child replay path before completing with 9.
  • apps/vscode-e2e/src/suite/subtasks.test.ts: the resumed child now asserts clean completion with 9, no emitted error message, and a task stack that still ends on that cancelled child.
  • src/core/webview/ClineProvider.ts: clearing runtime parent references on the rehydrated cancelled child no longer detaches its persisted lineage, so resumed cancelled subtasks keep their back-to-parent affordance and history grouping.
  • codecov/patch is passing on the current head.
  • platform-unit-test (ubuntu-latest) passed on the current head.
  • platform-unit-test (windows-latest) passed on the current head.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@roomote roomote Bot force-pushed the chore-unskip-e2e-use-mcp-tool branch from 9f0ddd1 to c31a59a Compare May 17, 2026 15:11
@roomote
Copy link
Copy Markdown
Contributor Author

roomote Bot commented May 17, 2026

I see some merge conflicts here. Working on them now...

@edelauna edelauna force-pushed the chore-unskip-e2e-use-mcp-tool branch from 879e0e8 to 2a54c07 Compare May 17, 2026 23:02
@roomote
Copy link
Copy Markdown
Contributor Author

roomote Bot commented May 17, 2026

I see some merge conflicts here. Working on them now...

@edelauna edelauna force-pushed the chore-unskip-e2e-use-mcp-tool branch from 77052fc to fa293b2 Compare May 19, 2026 02:19
@roomote
Copy link
Copy Markdown
Contributor Author

roomote Bot commented May 19, 2026

I see some merge conflicts here. Working on them now...

@edelauna edelauna force-pushed the chore-unskip-e2e-use-mcp-tool branch from fa293b2 to c946c38 Compare May 19, 2026 02:36
@roomote
Copy link
Copy Markdown
Contributor Author

roomote Bot commented May 19, 2026

I see some merge conflicts here. Working on them now...

Base automatically changed from chore-unskip-e2e-use-mcp-tool to main May 19, 2026 12:48
@roomote
Copy link
Copy Markdown
Contributor Author

roomote Bot commented May 19, 2026

I see some merge conflicts here. Working on them now...

@roomote roomote Bot force-pushed the chore-unskip-e2e-subtasks branch from 895516b to ca06a86 Compare May 19, 2026 12:57
@roomote roomote Bot closed this May 19, 2026
@roomote roomote Bot force-pushed the chore-unskip-e2e-subtasks branch from ca06a86 to 7de61e6 Compare May 19, 2026 12:58
@roomote roomote Bot reopened this May 19, 2026
@roomote roomote Bot force-pushed the chore-unskip-e2e-subtasks branch from f62a72d to 9aedf31 Compare May 19, 2026 16:21
@roomote
Copy link
Copy Markdown
Contributor Author

roomote Bot commented May 19, 2026

Addressed the three open review threads and pushed the follow-up in d5d5ae3.

The shipped diff now keeps the subtasks probe on the same cancelled child task, captures that resumed child's final completion_result and error messages, and asserts the task stack still ends on the cancelled child instead of spinning up a fresh anotherTaskId. subtasks.ts now validates the actual follow-up answer with toolResultContains(...) and adds a resumed-child replay fixture so mock mode only completes after the resumed follow-up path really answers with 9. ClineProvider.cancelTask() also clears the delegation link before rehydrating a user-cancelled delegated child, with focused unit coverage in ClineProvider.flicker-free-cancel.spec.ts, so finishing that cancelled child no longer reopens the parent it was cancelled from.

Validation on the pushed head is clean: TEST_FILE=subtasks.test pnpm --dir apps/vscode-e2e test:ci:mock, pnpm --dir src test core/webview/__tests__/ClineProvider.flicker-free-cancel.spec.ts, pnpm --dir apps/web-roo-code test, and http://127.0.0.1:3000 all passed. Browser proof was not applicable because this is delegated-task lifecycle and e2e replay coverage work, not a rendered UI change.

Comment thread apps/vscode-e2e/src/suite/subtasks.test.ts Outdated
Comment thread apps/vscode-e2e/src/fixtures/subtasks.ts
Comment thread apps/vscode-e2e/src/suite/subtasks.test.ts Outdated
Comment thread src/core/webview/ClineProvider.ts Outdated
@edelauna edelauna force-pushed the chore-unskip-e2e-subtasks branch from ce66323 to 909d5b8 Compare May 20, 2026 03:33
@edelauna edelauna force-pushed the chore-unskip-e2e-subtasks branch from 909d5b8 to d1d3a2a Compare May 20, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

roomote:auto-resolve-conflicts Allow Roomote to auto-resolve merge conflicts for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants