fix(confidence-engine): expose reconstruction failure evidence
This commit is contained in:
@@ -82,6 +82,7 @@ describe("app/api/cases/start route", () => {
|
||||
error: "Provider unavailable",
|
||||
diagnostics: { modelName: "llama3" },
|
||||
statusCode: 502,
|
||||
rawResponse: '{"reconstruction":{"summary":""}}',
|
||||
});
|
||||
|
||||
const { POST } = await import("@/app/api/cases/start/route.js");
|
||||
@@ -94,7 +95,9 @@ describe("app/api/cases/start route", () => {
|
||||
);
|
||||
|
||||
expect(response.status).toBe(502);
|
||||
await expect(response.json()).resolves.not.toHaveProperty("stack");
|
||||
const body = await response.json();
|
||||
expect(body).toHaveProperty("rawResponse");
|
||||
expect(body.rawResponse).toBe('{"reconstruction":{"summary":""}}');
|
||||
});
|
||||
|
||||
it("returns structured 500 on malformed JSON", async () => {
|
||||
|
||||
@@ -531,6 +531,7 @@ describe("lib/graph/orchestrator startCase", () => {
|
||||
analysisErrors: ["socket hang up"],
|
||||
statusCode: 502,
|
||||
});
|
||||
expect(result).toHaveProperty("rawResponse");
|
||||
});
|
||||
|
||||
it("returns null selectedQuestion when neither analysis nor graph path yields a question", async () => {
|
||||
|
||||
Reference in New Issue
Block a user