test(matrix): force block-streaming marker separation

This commit is contained in:
Peter Steinberger
2026-05-27 13:58:38 -04:00
parent 97eba607b5
commit b01c6d4eaa
2 changed files with 6 additions and 2 deletions

View File

@@ -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");
}

View File

@@ -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",