mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
test(matrix): force block-streaming marker separation
This commit is contained in:
@@ -137,8 +137,10 @@ export function buildMatrixBlockStreamingPrompt(
|
||||
return [
|
||||
`${sutUserId} Block streaming QA check: complete this whole sequence in one turn.`,
|
||||
`Step 1: send an assistant text block containing only this exact marker: \`${firstText}\`.`,
|
||||
"Step 2: do not stop after that marker. Use the read tool exactly once on `QA_KICKOFF_TASK.md`.",
|
||||
"That first marker block must be emitted before any tool call.",
|
||||
"Step 2: after the first marker block, use the read tool exactly once on `QA_KICKOFF_TASK.md`.",
|
||||
`Step 3: after that read completes, send a final assistant text block containing only this exact marker: \`${secondText}\`.`,
|
||||
"Never put both markers in the same assistant text block.",
|
||||
].join("\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -4164,12 +4164,14 @@ describe("matrix live qa scenarios", () => {
|
||||
expect(body).toMatch(
|
||||
/Step 1: send an assistant text block containing only this exact marker: `MATRIX_QA_BLOCK_ONE_[A-F0-9]{8}`/,
|
||||
);
|
||||
expect(body).toContain("That first marker block must be emitted before any tool call.");
|
||||
expect(body).toContain(
|
||||
"Step 2: do not stop after that marker. Use the read tool exactly once on `QA_KICKOFF_TASK.md`.",
|
||||
"Step 2: after the first marker block, use the read tool exactly once on `QA_KICKOFF_TASK.md`.",
|
||||
);
|
||||
expect(body).toMatch(
|
||||
/Step 3: after that read completes, send a final assistant text block containing only this exact marker: `MATRIX_QA_BLOCK_TWO_[A-F0-9]{8}`/,
|
||||
);
|
||||
expect(body).toContain("Never put both markers in the same assistant text block.");
|
||||
expect(scenario.configOverrides?.toolProfile).toBe("coding");
|
||||
expect(mockObjectArg(waitForRoomEvent, "waitForRoomEvent", 1).since).toBe(
|
||||
"driver-sync-block-one",
|
||||
|
||||
Reference in New Issue
Block a user