fix: accept native Workbench performance telemetry

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
root
2026-07-18 06:42:59 +02:00
parent 9dc1562486
commit 02b6be75f0
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -20,6 +20,7 @@ export function createWorkbenchHttpApp(options: { dispatch: (command: WorkbenchC
if (url.pathname === "/v1/caserun/cases") return json(200, { ok: true, status: "unavailable", cases: [], count: 0, mode: options.mode ?? "native-test" });
if (url.pathname === "/v1/hwpod/specs") return json(200, { ok: true, status: "unavailable", specs: [], mode: options.mode ?? "native-test" });
if (url.pathname === "/v1/hwpod-node-ops") return json(200, { ok: true, status: "unavailable", events: [], groups: [], mode: options.mode ?? "native-test" });
if (url.pathname === "/v1/web-performance" && request.method === "POST") return json(202, { ok: true, status: "accepted", persisted: false, mode: options.mode ?? "native-test" });
if (url.pathname === "/v1/workbench/events" && request.method === "GET") return nativeEventStream(options, url);
if (url.pathname === "/v1/workbench/sessions" && request.method === "GET") return nativeSessionList(options, url);
const sessionMatch = /^\/v1\/workbench\/sessions\/([^/]+)(?:\/(messages))?$/u.exec(url.pathname);
+3
View File
@@ -88,6 +88,9 @@ describe("Workbench native HTTP adapter", () => {
expect(response.status).toBe(200);
expect(await response.json()).toMatchObject({ ok: true, status: "unavailable", mode: "native-test" });
}
const performance = await app.fetch(new Request("http://native.test/v1/web-performance", { method: "POST", body: "{}" }));
expect(performance.status).toBe(202);
expect(await performance.json()).toMatchObject({ ok: true, status: "accepted", persisted: false, mode: "native-test" });
});
test("L0 CLI observes AgentRun-derived events only through the Kafka SSE route", async () => {