docs(confidence-engine): checkpoint empty done and reopen

This commit is contained in:
2026-09-02 13:51:05 +01:00
parent f2c9e4c0b2
commit 194a742772
+19 -3
View File
@@ -326,10 +326,26 @@ A fresh unanswered Question B displayed stale focused-investigation content from
- The clarified-question Re-open button (line ~1982) now calls `setDoneForNowIds(prev => prev.filter(id => id !== node.id))` after installing the reopened graph
- The node visibly returns to Open Questions because both filtering sets (`resolvedNodeIds` and `doneForNowIds`) no longer contain the target ID
**Verification:**
- Targeted Vitest (`tests/empty-done-orchestration.test.jsx`) — 23 tests pass (original 14 gate tests + 9 new coherence/reopen/history tests)
**Deterministic verification:**
- Targeted Vitest (`tests/empty-done-orchestration.test.jsx`) — 23/23 PASS (original 14 gate tests + 9 new coherence/reopen/history tests)
- `npm run build` — compiles successfully
- Playwright live verification: NOT RUN (no existing investigation with parked questions available on the persisted dev server state at http://localhost:3000)
**Clean-run manual verification (authoritative for v0.53):**
- Rob performed a clean investigation on the current implementation
- Open Questions surfaced correctly
- Questions parked with "Done for now" required no answer/content
- No visible `no_episodic_content` 400 on empty Done
- Parked questions appeared under "Questions we have clarified"
- Re-open successfully returned a question to Open Questions
- Rob repeated and confirmed the clean-run Re-open behaviour
**Legacy development persistence:**
- An older restored development investigation could not successfully Re-open a parked question
- This investigation predates the current coherent Done/Re-open state model and may contain stale persisted development state (e.g. `resolvedNodeIds` contains node while `node.status` remains `"unknown"`)
- **Do NOT record this as evidence that current v0.53 Re-open is broken** — it reflects legacy development persistence, not a current product failure
- During the current development phase, persisted investigations created under older experimental state shapes may be discarded after state-shape changes
- No migration, hydration normalisation, compatibility repair, or legacy-state detection is required solely for these development cases
- A genuine future product migration requirement should be treated as a separate explicitly-designed compatibility increment
**Preservation guarantees:**
- Empty Done still skips completed-episode API call when active target has no episode content (active-target guard in scenario-form.jsx unchanged)