feat(confidence-engine): synthesize understanding from focused findings

This commit is contained in:
2026-08-30 19:27:30 +01:00
parent ff1119b4d5
commit 75f7c6bafd
3 changed files with 210 additions and 4 deletions
+14 -3
View File
@@ -2797,7 +2797,18 @@ Implementation of canonical Current Understanding reconstruction belongs to v0.5
- **Build result:** clean production build
- **No ScenarioForm trigger integration yet** — wire-in in a future increment.
- **No ScenarioForm trigger integration yet.**
### First synthesis trigger integrated (v0.50.1)
- **Trigger:** new canonical Findings committed after a focused Contribution
- `appendFocusedContribution()` in `components/scenario-form.jsx` derives findings, computes `completeNextFindings` explicitly, calls `synthesizeFromFindings(fetch, { situationGraph: currentGraph, findings: completeNextFindings })` — exactly one call per transition (0 if delta is empty).
- **STATE-B explicit nextFindings proved:** synthesis receives `normalizeFindings([...prevFindings, ...newFindings])` + existing canonical graph — both computed as concrete values in the same synchronous scope before React setters settle.
- **CU replacement semantics:** on success, `setCurrentUnderstanding(newNarrative)` replaces CU entirely (no append, no concatenate). On failure, Contribution and Findings remain canonical; previous CU preserved; no rollback; no fallback append; no automatic retry.
- **Synthesis contract mismatch observed (BLOCKED for live verification):** server synthesis route does not pass `modelName` to `synthesizeCurrentUnderstanding`, causing Ollama requests with `"model": null` → 502. Client code correct; server seam needs `modelName: process.env.OLLAMA_MODEL`.
### Eligibility contract verification (all PASS)
@@ -2825,7 +2836,7 @@ Implementation of canonical Current Understanding reconstruction belongs to v0.5
#### Name
Canonical Current Understanding reconstruction from `SituationGraph + eligible Findings`
Fix synthesis route to pass `modelName: process.env.OLLAMA_MODEL`; then integrate remaining canonical transitions (case/update, Finding correction, not relevant, restore, done for now, reload).
#### Next branch
@@ -2833,4 +2844,4 @@ Canonical Current Understanding reconstruction from `SituationGraph + eligible F
#### Exact first trace question
What minimal synthesis API/helper boundary should own the dedicated `SituationGraph + eligible Findings → Current Understanding` LLM operation?
What is the minimal server-side fix to the synthesis route so it passes `modelName` to `synthesizeCurrentUnderstanding`, enabling live CU reconstruction verification?