feat(confidence-engine): synthesize restored findings

This commit is contained in:
2026-08-31 08:18:44 +01:00
parent addec52461
commit 989b88a4a1
3 changed files with 223 additions and 11 deletions
+10 -2
View File
@@ -272,8 +272,16 @@ export default function ScenarioForm() {
setFindings(() => nextFindings);
// ── Synthesis trigger: eligible Finding → not_relevant → one reconstruction ──
if (newDisposition !== "not_relevant") return;
// ── Synthesis trigger: completed canonical eligibility transition ──
const prevFinding = (findings ?? []).find((f) => f.id === findingId);
const previousDisposition = prevFinding?.userDisposition;
const notRelevantTransition =
previousDisposition !== "not_relevant" && newDisposition === "not_relevant";
const restoreTransition =
previousDisposition === "not_relevant" && newDisposition === null;
if (!notRelevantTransition && !restoreTransition) return;
const currentGraph = result?.situationGraph;
if (!currentGraph) return;