mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 21:07:01 -06:00
fix(qa): wait for config restart wake (#126368)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user