fix(rectification): keep candidate state coherent
Independent Staging Quality Gate / validate (push) Failing after 15m32s
Independent Staging Quality Gate / publish (push) Has been skipped

This commit is contained in:
Jesse_Chen
2026-08-27 13:59:38 +08:00
parent 518119acbd
commit 5f855c610c
30 changed files with 2109 additions and 167 deletions
@@ -1,6 +1,7 @@
import assert from "node:assert/strict";
import test from "node:test";
import { buildInferenceState } from "../src/lib/rectification-agentic/core/build-state.ts";
import { persistServerOwnedFocus, shouldSkipDiscriminatorFollowup, stableFollowupQuestionId } from "../src/lib/rectification-agentic/v9/server-focus.ts";
import { buildChoiceFrame, serverOwnedChoiceCopy } from "../src/lib/rectification-agentic/v9/choice-card.ts";
import type { MethodFollowup } from "../src/lib/rectification-agentic/v9/method-followup.ts";
@@ -202,12 +203,14 @@ test("contrast probe is not replaced by an already-answered education quality pr
caseId: CASE_ID,
activeFocus: null,
decisionReceipt: {
inference_state: {
answered_probes: [{
probe_id: "probe:education.2016",
semantic_key: "education.2016",
answer_class: "yes",
}],
inference_state: buildInferenceState({
range_start: "05:00",
range_end: "05:20",
candidates: [
{ id: "05:00", time: "05:00", relative_support: 10 },
{ id: "05:20", time: "05:20", relative_support: 10 },
],
events: [],
probes: [{
id: "probe:education.2016",
semantic_key: "education.2016",
@@ -234,7 +237,7 @@ test("contrast probe is not replaced by an already-answered education quality pr
information_gain: 0.16,
source: "varga_contrast",
}],
},
}),
},
followup,
});