Skip to content

Commit b01c6d4

Browse files
committed
test(matrix): force block-streaming marker separation
1 parent 97eba60 commit b01c6d4

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

extensions/qa-matrix/src/runners/contract/scenario-runtime-shared.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,10 @@ export function buildMatrixBlockStreamingPrompt(
137137
return [
138138
`${sutUserId} Block streaming QA check: complete this whole sequence in one turn.`,
139139
`Step 1: send an assistant text block containing only this exact marker: \`${firstText}\`.`,
140-
"Step 2: do not stop after that marker. Use the read tool exactly once on `QA_KICKOFF_TASK.md`.",
140+
"That first marker block must be emitted before any tool call.",
141+
"Step 2: after the first marker block, use the read tool exactly once on `QA_KICKOFF_TASK.md`.",
141142
`Step 3: after that read completes, send a final assistant text block containing only this exact marker: \`${secondText}\`.`,
143+
"Never put both markers in the same assistant text block.",
142144
].join("\n");
143145
}
144146

extensions/qa-matrix/src/runners/contract/scenarios.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4164,12 +4164,14 @@ describe("matrix live qa scenarios", () => {
41644164
expect(body).toMatch(
41654165
/Step 1: send an assistant text block containing only this exact marker: `MATRIX_QA_BLOCK_ONE_[A-F0-9]{8}`/,
41664166
);
4167+
expect(body).toContain("That first marker block must be emitted before any tool call.");
41674168
expect(body).toContain(
4168-
"Step 2: do not stop after that marker. Use the read tool exactly once on `QA_KICKOFF_TASK.md`.",
4169+
"Step 2: after the first marker block, use the read tool exactly once on `QA_KICKOFF_TASK.md`.",
41694170
);
41704171
expect(body).toMatch(
41714172
/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}`/,
41724173
);
4174+
expect(body).toContain("Never put both markers in the same assistant text block.");
41734175
expect(scenario.configOverrides?.toolProfile).toBe("coding");
41744176
expect(mockObjectArg(waitForRoomEvent, "waitForRoomEvent", 1).since).toBe(
41754177
"driver-sync-block-one",

0 commit comments

Comments
 (0)