fix(confidence-engine): await focused deconstruction provider

This commit is contained in:
2026-10-06 18:18:10 +01:00
parent 814360e368
commit d6dbc17bdf
3 changed files with 47 additions and 45 deletions
@@ -331,7 +331,7 @@ async function composeDeepInvestigationCheckpoint({ situationGraph, previousQues
const centralStatement = situationGraph.centralStatement ?? "";
// Call production-focused deconstruct — exactly one provider generation
const focused = focusedDeconstruct({
const focused = await focusedDeconstruct({
provider,
modelName: model,
targetNodeId,
@@ -342,6 +342,8 @@ async function composeDeepInvestigationCheckpoint({ situationGraph, previousQues
answer,
});
providerGenerateCalls++; // focusedDeconstruct now uses the same provider (1 call)
if (!focused.success) {
throw new Error(`focusedDeconstruct failed for episode ${contribSeq}: ${JSON.stringify(focused.errors)}`);
}