feat(confidence-engine): synthesize not relevant findings
This commit is contained in:
@@ -2920,6 +2920,44 @@ The synthesis route now supplies the configured `OLLAMA_MODEL` and the domain re
|
||||
- Current Understanding visibly replaced (reconstruction incorporates corrected Finding)
|
||||
- Same Finding remains at same position, disposition returns to normal state
|
||||
|
||||
### THIRD synthesis trigger integrated (v0.50.3 — Not Relevant disposition)
|
||||
|
||||
- `components/scenario-form.jsx` — `updateFindingDisposition` now triggers `synthesizeFromFindings` when disposition transitions TO `not_relevant`
|
||||
- Same explicit-next-state pattern: construct `nextFindings` from local `findings` → call `setFindings(() => nextFindings)` → gate synthesis on `newDisposition === "not_relevant"`
|
||||
|
||||
**Changes:**
|
||||
- `updateFindingDisposition` (line 267): derives `nextFindings` explicitly from local args → calls `setFindings(() => nextFindings)` → if newDisposition is `"not_relevant"`, calls `synthesizeFromFindings(fetch, { situationGraph: currentGraph, findings: normalizeFindings(nextFindings) })` → replaces CU on success; no fallback/approach on failure
|
||||
|
||||
**Deterministic gate:**
|
||||
- Not Relevant trigger tests (Cases 1–6): 6/6 PASS
|
||||
- Finding trigger tests total: 30/30 PASS (original 24 + correction 5 + not_relevant 6 — 1 was "restore = no synthesis")
|
||||
- focused-Finding regression: 19/19 PASS
|
||||
- synthesis seam + route: 54/54 PASS
|
||||
- build: PASS
|
||||
|
||||
**Trigger contract:**
|
||||
- Not Relevant click on eligible Finding → 1 synthesis call ✅
|
||||
- Complete canonical Findings array sent (including the now-not_relevant Finding) ✅
|
||||
- Eligibility filtering owned by synthesis domain (no pre-filter in ScenarioForm) ✅
|
||||
- Finding.id preserved ✅
|
||||
- proposition preserved ✅
|
||||
- sourceObservation preserved ✅
|
||||
- contributionId preserved ✅
|
||||
- Other Findings unchanged in payload ✅
|
||||
- Previous CU NOT sent as synthesis input ✅
|
||||
- not_relevant state preserved on synthesis failure ✅
|
||||
- Previous CU preserved on synthesis failure ✅
|
||||
- No automatic retry ✅
|
||||
- No legacy append fallback ✅
|
||||
- Restore (not_relevant → null) → 0 synthesis calls for this increment ✅
|
||||
|
||||
**Live runtime (classification RUN-C):**
|
||||
- One eligible Finding → clicked "not relevant"
|
||||
- Exactly 1 `/api/cases/synthesis` → HTTP 200
|
||||
- Finding visibly became Not Relevant (button toggled from "not relevant" to "restore")
|
||||
- Current Understanding visibly replaced with new reconstruction text
|
||||
- Same Finding remains at same position, disposition shows as "Not Relevant"
|
||||
|
||||
### NEXT BOUNDED ISSUE (for future reference)
|
||||
|
||||
#### Name
|
||||
|
||||
Reference in New Issue
Block a user