fix(reasoning): reconcile evidence and preserve deterministic continuation

This commit is contained in:
2026-08-17 08:06:08 +01:00
parent f2f495d5c7
commit ade445e453
6 changed files with 1373 additions and 8 deletions
+9
View File
@@ -1098,6 +1098,13 @@ function isPrioritisationPatternCandidate(node, graph, relatedNodes = []) {
);
}
function isStructuralDecisionNode(node, graph) {
if (!node || node.kind !== "unknown") return false;
return (graph?.edges || []).some(
(edge) => edge.relationship === "contained_in" && edge.toNodeId === node.id,
);
}
export function selectReasoningPattern({ node, graph, context = {} }) {
const relatedNodes = collectRelatedNodes(node, graph);
const patternContext = {
@@ -2007,6 +2014,8 @@ export function formulateQuestion({ node, graph, context = {} }) {
// Detected transiently from existing state; no persisted field required.
if (
reasoningPatternSelection.pattern === "decision" &&
context.suppressDecisionSufficiencyConfirmation !== true &&
isStructuralDecisionNode(node, graph) &&
node.status !== "known" &&
node.status !== "resolved" &&
node.status !== "contradicted" &&