From 2c146261a29c3553e22acfeaed238286f4313ab3 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Wed, 10 Jun 2026 17:48:33 +0900 Subject: [PATCH] fix(qa): accept completed mock image turns --- .../config/config-restart-capability-flip.md | 33 ++++++++++++++----- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/qa/scenarios/config/config-restart-capability-flip.md b/qa/scenarios/config/config-restart-capability-flip.md index 38c9f144ae53..0fe9994a9c69 100644 --- a/qa/scenarios/config/config-restart-capability-flip.md +++ b/qa/scenarios/config/config-restart-capability-flip.md @@ -138,15 +138,28 @@ steps: value: "" - set: imageReplyText value: "" - - call: runAgentPrompt - args: - - ref: env - - sessionKey: - ref: sessionKey - message: - expr: config.imagePrompt - timeoutMs: - expr: liveTurnTimeoutMs(env, config.imageTurnTimeoutMs) + - set: imageReplyStartIndex + value: + expr: "state.getSnapshot().messages.filter((message) => message.direction === 'outbound').length" + - try: + actions: + - call: runAgentPrompt + args: + - ref: env + - sessionKey: + ref: sessionKey + message: + expr: config.imagePrompt + timeoutMs: + expr: liveTurnTimeoutMs(env, config.imageTurnTimeoutMs) + catchAs: imageRunError + catch: + - if: + expr: "!env.mock || !/agent run aborted/i.test(formatErrorMessage(imageRunError))" + then: + - throw: + message: + expr: "formatErrorMessage(imageRunError)" - try: actions: - call: resolveGeneratedImagePath @@ -174,6 +187,8 @@ steps: params: [candidate] expr: "candidate.conversation.id === 'qa-operator' && (String(candidate.text ?? '').includes('MEDIA:') || /media failed|image generation failed/i.test(String(candidate.text ?? '')))" - expr: liveTurnTimeoutMs(env, config.imageTurnTimeoutMs) + - sinceIndex: + ref: imageReplyStartIndex - set: imageReplyText value: expr: "String(imageReply.text ?? '')"