fix: harden Pi management readiness

This commit is contained in:
2026-08-05 06:20:25 +02:00
parent 7a8bcacbfe
commit 7df21b5f21
24 changed files with 577 additions and 274 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ test("Pi management client calls only the sanctioned sanitized endpoints", async
server.use(
http.get("/api/pi-management/status", ({ request }) => {
calls.push({ method: request.method, path: new URL(request.url).pathname });
return HttpResponse.json({ ready: true, version: "0.80.3", config: {}, checkedAt: "2026-08-05T10:00:00.000Z" });
return HttpResponse.json({ ready: true, version: "0.80.3", credentials: "present", config: {}, checkedAt: "2026-08-05T10:00:00.000Z" });
}),
http.get("/api/pi-management/options", ({ request }) => {
calls.push({ method: request.method, path: new URL(request.url).pathname });
@@ -34,7 +34,7 @@ test("Pi management client calls only the sanctioned sanitized endpoints", async
}),
);
await expect(getPiManagementStatus()).resolves.toMatchObject({ version: "0.80.3", ready: true });
await expect(getPiManagementStatus()).resolves.toMatchObject({ version: "0.80.3", ready: true, credentials: "present" });
await expect(getPiManagementOptions()).resolves.toMatchObject({ providers: ["zai"] });
await expect(savePiManagementConfig({ provider: "zai", model: "glm-5.2", reasoning: "high" })).resolves.toMatchObject({ reasoning: "high" });
await expect(runPiManagementTest()).resolves.toMatchObject({ ready: true });