























@@ -3124,7 +3124,8 @@ describe("matrix live qa scenarios", () => {
31243124expect(artifacts.previewEventId).toBe("$tool-progress-preview");
31253125expect(artifacts.reply?.eventId).toBe("$tool-progress-final");
31263126const prompt = mockMessageBody(sendTextMessage, "sendTextMessage");
3127-expect(prompt).toContain("use the read tool exactly once on `QA_KICKOFF_TASK.md`");
3127+expect(prompt).toContain("call the read tool exactly once on `QA_KICKOFF_TASK.md`");
3128+expect(prompt).toContain("answering from memory or sending the marker before the tool result fails");
31283129expect(prompt).toContain("Do not read `HEARTBEAT.md`");
31293130expect(prompt).toContain("reply with only this exact marker and no other text");
31303131});
@@ -3229,6 +3230,32 @@ describe("matrix live qa scenarios", () => {
32293230);
32303231});
323132323233+it("reports final-only Matrix message candidates when the initial preview wait times out", async () => {
3234+const finalCandidate = matrixQaMessageEvent({
3235+kind: "message",
3236+eventId: "$tool-progress-final-only-candidate",
3237+body: "MATRIX_QA_TOOL_PROGRESS_FINAL_ONLY",
3238+});
3239+const context = matrixQaScenarioContext();
3240+const primeRoom = vi.fn().mockResolvedValue("driver-sync-start");
3241+const sendTextMessage = vi.fn().mockResolvedValue("$tool-progress-final-only-trigger");
3242+const waitForRoomEvent = vi.fn().mockImplementationOnce(async () => {
3243+context.observedEvents.push(finalCandidate);
3244+throw new Error("timed out after 8000ms waiting for Matrix room event");
3245+});
3246+createMatrixQaClient.mockReturnValue({
3247+ primeRoom,
3248+ sendTextMessage,
3249+ waitForRoomEvent,
3250+});
3251+3252+const scenario = requireMatrixQaScenario("matrix-room-tool-progress-preview");
3253+3254+await expect(runMatrixQaScenario(scenario, context)).rejects.toThrow(
3255+/observed message candidates:[\s\S]*\$tool-progress-final-only-candidate/,
3256+);
3257+});
3258+32323259it("reports Matrix tool progress final candidates when finalization misses the token", async () => {
32333260const previewEvent = matrixQaMessageEvent({
32343261kind: "notice",
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。