[Fix] Flaky mocked e2e subtasks test when parent resume is served the child fixture#1002
Draft
zoomote[bot] wants to merge 1 commit into
Draft
[Fix] Flaky mocked e2e subtasks test when parent resume is served the child fixture#1002zoomote[bot] wants to merge 1 commit into
zoomote[bot] wants to merge 1 commit into
Conversation
…nt-resume fixtures (#1001) The fast-child and SUBTASK_CHILD fixtures matched a bare marker that the parent prompt embeds verbatim, so parent-resume turns could be served the child fixture (mirrors #561, which fixed the same class for cross-profile fixtures only). Parent-resume fixtures also guarded on the literal new_task tool-call id, which validateAndFixToolResultIds can rewrite on resume. - Add parent-marker exclusion (with aimock's last-user-message scoping) to the fast-child and SUBTASK_CHILD fixtures - Guard parent-resume fixtures on the injected subtask result content instead of the fragile tool-call id
Contributor
Author
|
2 issues outstanding. See task
Reviewed dcae4b7 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related GitHub Issue
Closes: #1001
Description
The mocked e2e test
Roo Code Subtasks > child completing on its first response returns to parentflaked in CI (run 30098606515, merge queue for the unrelated PR #996; a re-run of the same SHA passed): the parent completed as "Fast child completed" instead of "Fast parent resumed" because aimock served the child fixture for the parent's resume request.Two compounding fixture weaknesses in
apps/vscode-e2e/src/fixtures/subtasks.ts, both fixed here:SUBTASK_CHILDfixtures matched a bare marker that the corresponding parent prompt embeds verbatim. When the parent's tool result is serialized as arole: "tool"message, the original parent prompt (marker included) becomes the last user message and the child fixture — registered earlier — wins. Both fixtures are now predicates that keep aimock's last-user-message scoping but exclude requests containing the parent marker, mirroring the [Flaky Test] e2e-mock: subtasks cross-profile fixture collision + task identity prompt timeout #561 fix for the cross-profile fixtures.new_tasktool-call id, whichvalidateAndFixToolResultIdscan rewrite whenreopenParentFromDelegationrebuilds the parent's history. The regular, fast, and interrupt parent-resume fixtures now match on the injected subtask-result content (Subtask <id> completed.\n\nResult:\n<summary>/ the child result text) instead of the fragile id.What reviewers should pay attention to: the new
lastUserMessageContainshelper deliberately replicates aimock'suserMessagelast-message scoping inside a predicate, so multi-turn child flows (ask_followup → completion) behave exactly as before.Test Procedure
TEST_FILE=subtasks.test xvfb-run -a pnpm --filter @roo-code/vscode-e2e test:ci:mock— 9/9 subtask e2e tests pass, including the previously failing one.pnpm test(full unit suite) — 6851 passed.pnpm --filter @roo-code/vscode-e2e check-typesandlint— clean.Pre-Submission Checklist
Screenshots / Videos
N/A — test-infrastructure-only change, no UI surface.
Documentation Updates
Additional Notes
Test-fixture-only change; no product behavior is affected.
Get in Touch
edelauna