feat: decompose composite unknowns before questioning

This commit is contained in:
2026-08-03 06:32:12 +01:00
parent 0723c2f49a
commit d52690cf2b
8 changed files with 874 additions and 131 deletions
+4 -3
View File
@@ -1148,7 +1148,8 @@ describe("applyValidatedProposal", () => {
expect(result.selectedQuestion?.nodeId).toBe(result.newActiveUnknownNodeId);
expect(result.selectedQuestion).toMatchObject({
nodeId: result.newActiveUnknownNodeId,
question: "What evidence would clarify timing or measurement basis?",
question:
"What evidence would clarify how the two observations were measured?",
});
expect(result.selectedQuestion?.question.toLowerCase()).not.toMatch(
/dso|debtor days|receivables turnover|working capital|receivables/,
@@ -1227,7 +1228,7 @@ describe("applyValidatedProposal", () => {
expect(result.newActiveUnknownNodeId).not.toBe("n-existing-explanation");
expect(result.selectedQuestion?.nodeId).not.toBe("n-existing-explanation");
expect(result.selectedQuestion?.question).toBe(
"What evidence would clarify timing or measurement basis?",
"What evidence would clarify how the two observations were measured?",
);
expect(
result.updatedSituationGraph.nodes.filter(
@@ -1253,7 +1254,7 @@ describe("applyValidatedProposal", () => {
expect(result.decompositionPerformed).toBe(true);
expect(result.childUnknownCount).toBe(5);
expect(result.childNodeIds).toHaveLength(5);
expect(result.atomicityReason).toContain("Decomposed");
expect(result.atomicityReason).toBeTruthy();
expect(result.selectedQuestion?.nodeId).toBe(result.newActiveUnknownNodeId);
expect(result.selectedQuestion?.nodeId).not.toBe(
result.emergentReasoningNodeId,