feat(confidence-engine): present canonical uncertainty description as initial display

Changed the facilitator-view-adapter to prefer node.description over
node.openQuestion for unresolved unknown items. This is a reversible
presentation change only — graph identity, reasoning-state ownership,
openQuestion generation, and resolved-unknown presentation are unchanged.

Owning test assertions updated to reflect new display contract:
- open-question-presentation.test.js: assertion target shifts from
  question text to description text
- facilitator-view-adapter.test.js: deduplication tests use distinct
  descriptions so nodes remain distinguishable after the change

Documentation: hypothesis experiment record and handoff return note.
This commit is contained in:
2026-10-09 11:37:43 +01:00
parent b71e3a8267
commit d0f357877d
5 changed files with 22 additions and 9 deletions
+6 -2
View File
@@ -155,16 +155,20 @@ describe("Deduplication", () => {
const vm = buildFacilitatorViewModel({
nodes: [
mkN("u1", "Whether supplier capacity is sufficient for launch", {
description: "Supplier capacity determines viability",
openQuestion: sharedQuestion,
}),
mkN("u2", "Whether customer demand is sufficient for launch", {
description: "Customer demand determines viability",
openQuestion: sharedQuestion,
}),
],
resolvedIds: new Set(),
});
expect(vm.investigating.items.filter((item) => item === sharedQuestion)).toHaveLength(2);
// Two distinct nodes with different descriptions should both appear, despite sharing openQuestion.
expect(vm.investigating.items).toContain("Supplier capacity determines viability");
expect(vm.investigating.items).toContain("Customer demand determines viability");
});
it("continues to merge genuine canonical duplicates despite different presentation questions", () => {
@@ -181,7 +185,7 @@ describe("Deduplication", () => {
});
expect(vm.investigating.items).toEqual([
"Can the supplier support the launch volume?",
"Whether supplier capacity is sufficient for launch",
]);
});
});
@@ -90,11 +90,10 @@ describe("Open Question presentation", () => {
expect(unknown.label).toBe(description);
expect(unknown.description).toBe(description);
expect(unknown.openQuestion).toBe(question);
expect(viewModel.investigating.items).toContain(question);
// Canonical description is now the initial display text for unresolved unknowns.
expect(viewModel.investigating.items).toContain(description);
// openQuestion remains present on the node but is no longer the displayed text.
expect(question).toMatch(/\?$/);
expect(question).not.toMatch(/^whether\b/i);
expect(question).not.toMatch(/^before whether\b/i);
for (const term of terms) expect(question.toLowerCase()).toContain(term.toLowerCase());
});
it("leaves canonical identity, explicit target selection, and focused formulation unchanged", () => {