fix(confidence-engine): scope contribution filtering to targetNodeId in composeDeepInvestigationCheckpoint
Historical contributions for a different Open Question node no longer suppress fresh focused deconstruction of the current target. Only contributions whose targetNodeId matches the current target are counted towards suppressing redundant deconstruction.
This commit is contained in:
@@ -316,9 +316,18 @@ async function composeDeepInvestigationCheckpoint({ situationGraph, previousQues
|
||||
|
||||
/* ── Canonical deconstruction: use focusedDeconstruct for Contribution derivation ─── */
|
||||
const effectiveContributions = contributions.length > 0 ? [...contributions] : [];
|
||||
|
||||
/* ── Target-scoped filtering: only contributions belonging to the current target suppress fresh deconstruction ─── */
|
||||
let effectiveContributionsForTarget = effectiveContributions;
|
||||
if (targetNodeId && effectiveContributions.length > 0) {
|
||||
effectiveContributionsForTarget = effectiveContributions.filter(
|
||||
(c) => c?.targetNodeId === targetNodeId,
|
||||
);
|
||||
}
|
||||
|
||||
let newFindingsFromContributions = [];
|
||||
|
||||
if (effectiveContributions.length === 0 && answer && targetNodeId) {
|
||||
if (effectiveContributionsForTarget.length === 0 && answer && targetNodeId) {
|
||||
const contribSeq = effectiveContributions.length + 1;
|
||||
|
||||
/* ── Load production deconstruction seam (dynamic import to resolve ESM path aliases) ─── */
|
||||
|
||||
Reference in New Issue
Block a user