fix: separate workbench message and trace authorities

This commit is contained in:
lyon
2026-06-20 10:09:47 +08:00
parent 57ba729fca
commit 4290a280d9
6 changed files with 218 additions and 104 deletions
@@ -59,3 +59,22 @@ test.describe("sealed final response diagnostics separation", () => {
await saveScreenshot(page, testInfo, "sealed-final-response-diagnostic-separate");
});
});
test.describe("trace detail final response separation", () => {
test.use({ scenarioId: "trace-final-response-not-message-authority" });
test("keeps trace finalResponse out of the main message projection", async ({ page }, testInfo) => {
await gotoWorkbench(page, "/workbench/sessions/ses_trace_final_conflict");
const card = page.locator(`${selectors.messageCard}[data-role="agent"][data-status="completed"]`).last();
const messageText = card.locator(".message-markdown.message-text");
await expect(messageText).toContainText("messageProjection 的 sealed final response 才是主消息正文。");
const traceResponse = await page.request.get("/v1/workbench/traces/trc_trace_final_conflict/events?limit=20");
expect(traceResponse.status()).toBe(200);
const tracePayload = await traceResponse.json();
expect(tracePayload.finalResponse.text).toBe("TRACE_DETAIL_CONFLICT_SHOULD_NOT_REPLACE_MESSAGE");
await page.waitForTimeout(500);
await expect(messageText).toContainText("messageProjection 的 sealed final response 才是主消息正文。");
await expect(messageText).not.toContainText("TRACE_DETAIL_CONFLICT_SHOULD_NOT_REPLACE_MESSAGE");
await saveScreenshot(page, testInfo, "trace-final-response-not-message-authority");
});
});