experiment(confidence-engine): expose reconstruction provider seam

This commit is contained in:
2026-09-06 08:01:29 +01:00
parent 860ee6fc5b
commit 1daf2bb6ce
7 changed files with 115 additions and 13 deletions
+18
View File
@@ -356,6 +356,24 @@ describe("lib/graph/orchestrator startCase", () => {
);
});
it("forwards an injected reconstruction provider to analyseScenario", async () => {
mockAnalyseScenario.mockResolvedValue(makeAnalysisResult());
const reconstructionProvider = { generateReconstruction: vi.fn() };
const { startCase } = await import("@/lib/graph/orchestrator.js");
const result = await startCase(
{ scenario: "Scenario text" },
{ reconstructionProvider, reconstructionModelName: "experiment-model" },
);
expect(result.success).toBe(true);
expect(mockAnalyseScenario).toHaveBeenCalledWith("Scenario text", {
promptVersion: undefined,
reconstructionProvider,
reconstructionModelName: "experiment-model",
});
});
it("rejects invalid request input without throwing", async () => {
const { startCase } = await import("@/lib/graph/orchestrator.js");