2.7 KiB
Experiment 60B.55 — Closure-normalization consolidation
Date: 2026-08-14
Branch: feature/closure-selection-reconciliation-v0.41
Purpose
Consolidate and commit the already-proven closure-normalization fix after focused regression verification.
Implementation state consolidated
The committed fix consists of four bounded changes only:
-
reverse resolution reconciliation
updatedNodes.newStatus = "resolved"-> resolvedUnknownNodeIdsautomatically includes that existing unknown node
-
stale same-turn selectedQuestion clearing
- if
selectedQuestion.nodeIdis resolved by the same proposal -> selectedQuestion = nullbefore strict validation
- if
-
prompt clarification
selectedQuestionmust remain unresolved after applying the proposal- if all consequential unknowns resolve,
selectedQuestionmust be null
-
repaired deterministic 60B.47 negative-closure regression structure
Focused verification result
Command run:
npx vitest run \
tests/graph/apply-proposal.test.js \
tests/graph/prompt-builder.test.js \
-t "60B.49|60B.52|60B.54|60B.43|60B.11|replaces downstream pricing|selectedQuestion|resolution"
Result:
- PASS —
38 passed | 151 skipped
Verified behaviours
Exact negative closure regression
The exact 60B.47-shaped deterministic regression now passes through applyValidatedProposal(...) with:
- customer factor resolved
- decision resolved
resolvedUnknownNodeIds/ resultingresolvedNodeIdscontaining both IDsactiveUnknownNodeId = nullselectedQuestion = null
Reconciliation invariants
Verified preserved:
- forward reconciliation
- already-consistent proposal unchanged
- no duplicate resolved IDs
- non-unknown nodes are not auto-added
- non-resolved statuses are not auto-added
Fallback preservation
Verified preserved:
- stale same-turn resolved selectedQuestion clears cleanly
- another genuine unresolved candidate still becomes the fallback target
Existing behavioural regressions preserved
Verified preserved:
- 60B.43 terminal post-mutation closure regression
- 60B.11 preferred-target behaviour
- pricing prerequisite-first regression
- prompt-builder selectedQuestion rule regression
What is now guaranteed
The deterministic engine now normalizes same-turn closure structure coherently before strict validation:
- resolved existing unknowns are represented in both status and
resolvedUnknownNodeIds - a same-turn resolved
selectedQuestioncannot survive as stale structure - strict validator semantics remain intact
What remains unproven
The exact live negative-outcome closure still needs one bounded rerun after this deterministic fix to confirm the same end state through the live model-driven path.