fix(focused-investigation): suppress incompatible question strategies
This commit is contained in:
@@ -65,6 +65,40 @@ describe("formulateQuestionForTarget — explicit node selection", () => {
|
||||
expect(JSON.stringify(graph)).toBe(snapshot);
|
||||
});
|
||||
|
||||
it("forwards an ephemeral incompatible compatibility verdict without changing the selected target or graph", () => {
|
||||
const unknown = makeNode({
|
||||
id: "historical-target",
|
||||
label: "Earlier comparable state",
|
||||
description: "Whether the prior staffing level was sufficient for expansion",
|
||||
kind: "unknown",
|
||||
status: "unknown",
|
||||
});
|
||||
const graph = makeGraph({
|
||||
centralStatement:
|
||||
"Compare the prior staffing baseline with the level needed before the expansion.",
|
||||
currentSummary: "initial summary",
|
||||
nodes: [unknown],
|
||||
edges: [],
|
||||
activeUnknownNodeId: unknown.id,
|
||||
resolvedNodeIds: [],
|
||||
});
|
||||
const snapshot = JSON.stringify(graph);
|
||||
|
||||
const result = formulateQuestionForTarget({
|
||||
situationGraph: graph,
|
||||
targetNodeId: unknown.id,
|
||||
strategyCompatibilityVerdict: {
|
||||
strategyKey: "baseline_reconstruction",
|
||||
relevance: "incompatible",
|
||||
},
|
||||
});
|
||||
|
||||
expect(result.success).toBe(true);
|
||||
expect(result.targetNodeId).toBe(unknown.id);
|
||||
expect(result.strategy).toBeNull();
|
||||
expect(JSON.stringify(graph)).toBe(snapshot);
|
||||
});
|
||||
|
||||
it("does not invoke global selection (selectActiveUnknownCandidate / determineGraphBackedQuestion)", () => {
|
||||
const graph = makeTestGraph();
|
||||
const result = formulateQuestionForTarget({ situationGraph: graph, targetNodeId: "a" });
|
||||
|
||||
Reference in New Issue
Block a user