From 357be25de55f0bb3232a52683ccd180703dd3231 Mon Sep 17 00:00:00 2001 From: robbond Date: Sat, 15 Aug 2026 11:35:02 +0100 Subject: [PATCH] docs: record confirmation-gated closure enforcement --- docs/experiment-60b80.md | 72 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 docs/experiment-60b80.md diff --git a/docs/experiment-60b80.md b/docs/experiment-60b80.md new file mode 100644 index 0000000..b37a04d --- /dev/null +++ b/docs/experiment-60b80.md @@ -0,0 +1,72 @@ +# Experiment 60B.80 — Confirmation-Gated Model Closure Ownership (IMPLEMENTED) + +**Date:** 2026-08-15 +**Branch:** `feature/decision-closure-ownership-v0.47` +**Preceded by:** Experiment 60B.79 (closure enforcement boundary design) +**Type:** Bounded implementation — production + tests + +## Objective + +Implement the deterministic decision-closure ownership gate: a parent decision can become terminal only when the user's raw answer contains explicit confirmation that no other material uncertainty remains. The normaliser strips the model's attempted closure while preserving all other proposal work. + +## What Was Built + +### Production (lib/graph/apply-proposal.js) + +`reconcileDecisionClosureOwnership(graph, proposal, answer)` — new function: +- **Boundary B:** Called between reconciliation and compatibility validation (after line 3679) +- Receives raw `answer` for confirmation detection via `isUserConfirmationOfNoRemainingUncertainty()` +- Builds `parentNodeIds` set from unknown nodes with incoming `contained_in` edges (decision-context mechanism from 60B.75) +- **Phase A:** Strips terminal status → "unknown", newValue → null on parent entries in updatedNodes +- **Phase B:** Strips parent from resolvedUnknownNodeIds; reverts reconciler-forced "resolved" → "unknown"; creates minimal no-op update when reconciler synthesized one + +### Prompt (lib/graph/prompt-builder.js) + +Rule #143 rewritten: +``` +OLD: If evidence sufficient, resolve decision context. +NEW: May not resolve unless user explicitly confirms no other material uncertainty remains. Direct model to use possibleInference for directional conclusions instead. +``` + +### Tests (60B.80 — 15 new tests) + +- T1–T3: Three closure-strip scenarios (resolved/null, known/directional, resolved/directional) +- T4: Explicit confirmation allows closure through deterministic gate +- T5: Child non-parent resolution unaffected by stripping +- T6: Customer resolution preserved alongside stripped decision +- T7: answerMeaning survives normalisation (structuralActionRequired required per validator) +- T8: Resolved bookkeeping consistency post-strip +- T9: State B becomes reachable (activeUnknownNodeId = decision after strip) +- T10: Ordinary decision_threshold behavior unchanged for non-parent scenarios +- 5× prompt-builder tests confirming Rule #143 text + +### Regression Preservation + +| Original | Treatment | Result | +|----------|-----------|--------| +| 60B.43 lifecycle invariant | Added `answer: "no remaining material uncertainty"` + confirmation phrase to fixture answers | ✅ PASS — terminal closure confirmed | +| 60B.49 reconciliation auto-add | Same addition; structural reconciliation verified under confirmed flow | ✅ PASS | + +## Why This Design + +Per 60B.79 analysis (Model E choice): +1. Deterministic stripping prevents premature closure — no retry loop risk +2. All non-parent proposal work preserved independently +3. State B questioning fires naturally when parent stays "unknown" +4. Direction preserved in `answerMeaning` fields as the canonical non-terminal channel +5. No hybrid unknown+value states created (semantically safe) +6. No schema changes required + +## What Is Now Guaranteed + +- Model cannot close parent decision without explicit user confirmation +- Customer and non-parent updates always preserved regardless of confirmation state +- Parent removed from resolved bookkeeping when stripped; no inconsistent states +- State B reachable deterministically after no-confirmation stripping +- Explicit user confirmation still authorizes closure through deterministic gate +- Prompt rule requires confirmation rather than evidence-only sufficiency + +## Verification + +Focused test run: 64 tests passed (including all new + regression preservation) +Full suite: 265 passed, 16 failed — all 16 pre-existing baseline failures (zero new regressions)