@@ -111,6 +111,23 @@ flow:
111111 expr : " config.expectedReplyGroups.every((group) => group.some((needle) => normalizeLowercaseStringOrEmpty(text).includes(needle)))"
112112 - expr : " 30000"
113113 - expr : " env.providerMode === 'mock-openai' ? 100 : 250"
114+ - if :
115+ # The parent reply can arrive before child transcript writes finish.
116+ # Wait before opening the store so its integrity check sees settled FTS state.
117+ expr : " Boolean(env.mock) && env.gateway.runtimeEnv.OPENCLAW_QA_FORCE_RUNTIME !== 'codex'"
118+ then :
119+ - forEach :
120+ items :
121+ expr : " config.expectedChildCompletionMarkers"
122+ item : childCompletionMarker
123+ actions :
124+ - call : waitForOutboundMessage
125+ args :
126+ - ref : state
127+ - lambda :
128+ params : [candidate]
129+ expr : " String(candidate.text ?? '').trim() === childCompletionMarker"
130+ - 30000
114131 - if :
115132 expr : " Boolean(env.mock)"
116133 then :
@@ -163,6 +180,21 @@ flow:
163180 - if :
164181 expr : " /timed out after/i.test(formatErrorMessage(attemptError))"
165182 then :
183+ - if :
184+ expr : " Boolean(env.mock) && env.gateway.runtimeEnv.OPENCLAW_QA_FORCE_RUNTIME !== 'codex'"
185+ then :
186+ - forEach :
187+ items :
188+ expr : " config.expectedChildCompletionMarkers"
189+ item : childCompletionMarker
190+ actions :
191+ - call : waitForOutboundMessage
192+ args :
193+ - ref : state
194+ - lambda :
195+ params : [candidate]
196+ expr : " String(candidate.text ?? '').trim() === childCompletionMarker"
197+ - 30000
166198 - call : readRawQaSessionStore
167199 saveAs : timeoutStore
168200 args :
@@ -240,23 +272,4 @@ flow:
240272 expr : " lastError === '__done__'"
241273 message :
242274 expr : " lastError instanceof Error ? formatErrorMessage(lastError) : String(lastError ?? 'fanout retry exhausted')"
243- - if :
244- # Codex completes child sessions through its app-server path but
245- # does not relay the child marker back onto the parent QA channel.
246- # The shared assertions above already prove both child tool calls
247- # and child session rows; keep this transport-only proof OpenClaw-specific.
248- expr : " Boolean(env.mock) && env.gateway.runtimeEnv.OPENCLAW_QA_FORCE_RUNTIME !== 'codex'"
249- then :
250- - forEach :
251- items :
252- expr : " config.expectedChildCompletionMarkers"
253- item : childCompletionMarker
254- actions :
255- - call : waitForOutboundMessage
256- args :
257- - ref : state
258- - lambda :
259- params : [candidate]
260- expr : " String(candidate.text ?? '').trim() === childCompletionMarker"
261- - 30000
262275 detailsExpr : " details"
0 commit comments