Skip to content

Commit 62d3226

Browse files
committed
fix(e2e): address orchestrator review feedback
1 parent a9f7e0b commit 62d3226

9 files changed

Lines changed: 230 additions & 291 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ jobs:
3434
- name: Setup Node.js and pnpm
3535
if: github.event_name != 'pull_request' || steps.e2e-marker.outputs.cache-hit != 'true'
3636
uses: ./.github/actions/setup-node-pnpm
37+
- name: Run vscode-e2e unit tests
38+
if: github.event_name != 'pull_request' || steps.e2e-marker.outputs.cache-hit != 'true'
39+
run: pnpm --filter @roo-code/vscode-e2e test:unit
40+
3741
- name: Install xvfb
3842
if: github.event_name != 'pull_request' || steps.e2e-marker.outputs.cache-hit != 'true'
3943
run: sudo apt-get install -y xvfb
@@ -144,10 +148,6 @@ jobs:
144148
apps/vscode-e2e/.vscode-test/
145149
key: vscode-test-${{ runner.os }}-${{ steps.vscode-ver.outputs.version }}-v1
146150

147-
- name: Run vscode-e2e unit tests
148-
if: github.event_name != 'pull_request' || steps.e2e-marker.outputs.cache-hit != 'true'
149-
run: pnpm --filter @roo-code/vscode-e2e test:unit
150-
151151
- name: Run mocked E2E tests
152152
id: run-e2e
153153
# merge_group and workflow_dispatch always run; cache skip is pull_request only

apps/vscode-e2e/src/fixtures/orchestrator-plan.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
ORCHESTRATOR_CANCELLATION_RECOVERY_CHILD_STEP,
77
ORCHESTRATOR_CANCELLATION_RECOVERY_FINAL_RESULT,
88
ORCHESTRATOR_CANCELLATION_RECOVERY_FOLLOWUP_ANSWER,
9+
ORCHESTRATOR_CANCELLATION_RECOVERY_FOLLOWUP_TOOL_CALL_ID,
910
ORCHESTRATOR_CANCELLATION_RECOVERY_MARKER,
1011
ORCHESTRATOR_CANCELLATION_RECOVERY_PARENT_PROMPT,
1112
ORCHESTRATOR_FAN_OUT_PARENT_PROMPT,
@@ -34,7 +35,7 @@ import {
3435
shouldMatchOrchestratorResumeRequest,
3536
} from "./orchestrator-plan"
3637

37-
describe("orchestrator fan-out delegation plan", () => {
38+
describe("orchestrator delegation plans", () => {
3839
it("defines the first commit single-round ask/architect/code child sequence", () => {
3940
expect(ORCHESTRATOR_FAN_OUT_PARENT_PROMPT).toContain("ORCHESTRATOR_SINGLE_ROUND_FAN_OUT")
4041
expect(ORCHESTRATOR_FAN_OUT_CHILD_STEPS).toEqual([
@@ -320,7 +321,7 @@ describe("orchestrator fan-out delegation plan", () => {
320321
it("matches cancellation child completion only after the recovery answer", () => {
321322
expect(
322323
shouldMatchOrchestratorCancellationChildCompletionRequest(
323-
`${ORCHESTRATOR_CANCELLATION_RECOVERY_CHILD_STEP.marker} call_orchestrator_cancellation_child_followup_001 ${ORCHESTRATOR_CANCELLATION_RECOVERY_FOLLOWUP_ANSWER}`,
324+
`${ORCHESTRATOR_CANCELLATION_RECOVERY_CHILD_STEP.marker} ${ORCHESTRATOR_CANCELLATION_RECOVERY_FOLLOWUP_TOOL_CALL_ID} ${ORCHESTRATOR_CANCELLATION_RECOVERY_FOLLOWUP_ANSWER}`,
324325
),
325326
).toBe(true)
326327
expect(

apps/vscode-e2e/src/fixtures/orchestrator-plan.ts

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export const ORCHESTRATOR_REPEATED_DELEGATION_CHILD_STEPS: readonly Orchestrator
126126

127127
export const ORCHESTRATOR_REPEATED_DELEGATION_PARENT_PROMPT = `${ORCHESTRATOR_REPEATED_DELEGATION_MARKER}: Run exactly three rounds. In each round, delegate exactly three children in order: ask-mode requirements, architect-mode design, then code-mode implementation. Use these exact child messages in order: ${ORCHESTRATOR_REPEATED_DELEGATION_CHILD_STEPS.map(({ prompt }) => `"${prompt}"`).join("; ")}. After each child returns, resume the parent before creating the next child. After all nine children return, complete with a final summary containing every round and child summary.`
128128

129-
export const ORCHESTRATOR_REPEATED_DELEGATION_FINAL_RESULT = `Orchestrator repeated delegation complete:\n${ORCHESTRATOR_REPEATED_DELEGATION_CHILD_STEPS.map(({ round, role, summary }) => `- Round ${round} ${role}: ${summary}`).join("\\n")}`
129+
export const ORCHESTRATOR_REPEATED_DELEGATION_FINAL_RESULT = `Orchestrator repeated delegation complete:\n${ORCHESTRATOR_REPEATED_DELEGATION_CHILD_STEPS.map(({ round, role, summary }) => `- Round ${round} ${role}: ${summary}`).join("\n")}`
130130

131131
export const ORCHESTRATOR_NESTED_DELEGATION_GRANDCHILD_STEPS: readonly OrchestratorNestedDelegationStep[] = [
132132
{
@@ -166,6 +166,8 @@ export const ORCHESTRATOR_NESTED_DELEGATION_PARENT_PROMPT = `${ORCHESTRATOR_NEST
166166
export const ORCHESTRATOR_NESTED_DELEGATION_FINAL_RESULT = `Nested top-level orchestrator complete:\n- B: ${ORCHESTRATOR_NESTED_DELEGATION_CHILD_FINAL_RESULT}`
167167

168168
export const ORCHESTRATOR_CANCELLATION_RECOVERY_FOLLOWUP_ANSWER = "resume recovered cancellation child"
169+
export const ORCHESTRATOR_CANCELLATION_RECOVERY_FOLLOWUP_TOOL_CALL_ID =
170+
"call_orchestrator_cancellation_child_followup_001"
169171

170172
export const ORCHESTRATOR_CANCELLATION_RECOVERY_CHILD_STEP: OrchestratorCancellationRecoveryStep = {
171173
role: "cancellation-child",
@@ -232,23 +234,16 @@ function shouldMatchOrchestratorCancellationChildBase(rawRequest: string): boole
232234
}
233235

234236
export function shouldMatchOrchestratorCancellationChildRequest(rawRequest: string): boolean {
235-
const followupToolCallId = ORCHESTRATOR_CANCELLATION_RECOVERY_CHILD_STEP.completionToolCallId.replace(
236-
"completion_002",
237-
"followup_001",
237+
return (
238+
shouldMatchOrchestratorCancellationChildBase(rawRequest) &&
239+
!rawRequest.includes(ORCHESTRATOR_CANCELLATION_RECOVERY_FOLLOWUP_TOOL_CALL_ID)
238240
)
239-
240-
return shouldMatchOrchestratorCancellationChildBase(rawRequest) && !rawRequest.includes(followupToolCallId)
241241
}
242242

243243
export function shouldMatchOrchestratorCancellationChildCompletionRequest(rawRequest: string): boolean {
244-
const followupToolCallId = ORCHESTRATOR_CANCELLATION_RECOVERY_CHILD_STEP.completionToolCallId.replace(
245-
"completion_002",
246-
"followup_001",
247-
)
248-
249244
return (
250245
shouldMatchOrchestratorCancellationChildBase(rawRequest) &&
251-
((rawRequest.includes(followupToolCallId) &&
246+
((rawRequest.includes(ORCHESTRATOR_CANCELLATION_RECOVERY_FOLLOWUP_TOOL_CALL_ID) &&
252247
rawRequest.includes(ORCHESTRATOR_CANCELLATION_RECOVERY_FOLLOWUP_ANSWER)) ||
253248
rawRequest.includes(
254249
`<user_message>\\n${ORCHESTRATOR_CANCELLATION_RECOVERY_FOLLOWUP_ANSWER}\\n</user_message>`,

0 commit comments

Comments
 (0)