From 0e71ae5df4e536c5ca6a7130cfefda636f59564c Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Wed, 24 Jun 2026 08:16:50 +0800 Subject: [PATCH] fix(qa): enforce fanout completion drain --- .../agents/subagent-fanout-synthesis.yaml | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/qa/scenarios/agents/subagent-fanout-synthesis.yaml b/qa/scenarios/agents/subagent-fanout-synthesis.yaml index 1ac81005300b..1d37c19c575c 100644 --- a/qa/scenarios/agents/subagent-fanout-synthesis.yaml +++ b/qa/scenarios/agents/subagent-fanout-synthesis.yaml @@ -152,18 +152,6 @@ flow: expr: "fanoutSpawnRequests.length >= 2" message: expr: "`expected at least two sessions_spawn tool calls during subagent fanout scenario, saw ${fanoutSpawnRequests.length}`" - - forEach: - items: - expr: "config.expectedChildCompletionMarkers" - item: childCompletionMarker - actions: - - call: waitForOutboundMessage - args: - - ref: state - - lambda: - params: [candidate] - expr: "String(candidate.text ?? '').trim() === childCompletionMarker" - - 10000 - set: details value: expr: "outbound.text" @@ -251,4 +239,19 @@ flow: expr: "lastError === '__done__'" message: expr: "lastError instanceof Error ? formatErrorMessage(lastError) : String(lastError ?? 'fanout retry exhausted')" + - if: + expr: "Boolean(env.mock)" + then: + - forEach: + items: + expr: "config.expectedChildCompletionMarkers" + item: childCompletionMarker + actions: + - call: waitForOutboundMessage + args: + - ref: state + - lambda: + params: [candidate] + expr: "String(candidate.text ?? '').trim() === childCompletionMarker" + - 10000 detailsExpr: "details"