fix(qa): wait for config restart wake (#126368)

This commit is contained in:
Vincent Koc
2026-08-20 05:00:23 +08:00
committed by GitHub
parent 0135046830
commit 42a4db5f42
2 changed files with 27 additions and 0 deletions
@@ -0,0 +1,17 @@
// Qa Lab tests cover config-restart scenario ordering.
import { describe, expect, it } from "vitest";
import { readQaScenarioById } from "./scenario-catalog.js";
describe("QA config-restart scenario catalog", () => {
it("waits for the restart wake before using restored capabilities", () => {
const flow = JSON.stringify(readQaScenarioById("config-restart-capability-flip"));
const restartPatchIndex = flow.indexOf('"note":{"ref":"wakeMarker"}');
const wakeWaitIndex = flow.indexOf("candidate.text.includes(wakeMarker)");
const capabilityPollIndex = flow.indexOf('"saveAs":"afterTools"');
expect(restartPatchIndex).toBeGreaterThanOrEqual(0);
expect(wakeWaitIndex).toBeGreaterThan(restartPatchIndex);
expect(capabilityPollIndex).toBeGreaterThan(wakeWaitIndex);
expect(flow.indexOf('"call":"runAgentPrompt"')).toBeGreaterThan(capabilityPollIndex);
});
});
@@ -111,6 +111,9 @@ flow:
ref: originalImageGenerationModelPrimary
sessionKey:
ref: sessionKey
deliveryContext:
channel: qa-channel
to: dm:qa-operator
note:
ref: wakeMarker
replacePaths:
@@ -123,6 +126,13 @@ flow:
args:
- ref: env
- 60000
- call: waitForOutboundMessage
args:
- ref: state
- lambda:
params: [candidate]
expr: "candidate.conversation.id === 'qa-operator' && candidate.text.includes(wakeMarker)"
- expr: liveTurnTimeoutMs(env, config.imageTurnTimeoutMs)
- call: waitForCondition
saveAs: afterTools
args: