fix(web): restore rectification discriminator cards and stop-offer path
Coverage-complete ties never persisted A/B/C/D because contrast probes were stamped with an answered education quality probe, remaining minutes were asked as window D10 signs, and 「没有了」 missed the stop pattern. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -109,3 +109,64 @@ test("duplicate focus conflict does not throw", async () => {
|
||||
});
|
||||
assert.equal(result.status, "duplicate_focus");
|
||||
});
|
||||
|
||||
test("contrast probe is not replaced by an already-answered education quality probe", async () => {
|
||||
const followup = discriminatorFollowup({
|
||||
domain: "education",
|
||||
ask_theme: "education_style",
|
||||
information_gain: 0.16,
|
||||
semantic_key: "varga.d24.05:00/05:06|05:07",
|
||||
candidate_split_hash: "varga.d24.05:00/05:06|05:07",
|
||||
probe_year: undefined,
|
||||
});
|
||||
const accounting = fakeAccounting({
|
||||
set_agentic_rectification_conversation_focus: (_fn, args) => ({
|
||||
id: FOCUS_ID,
|
||||
case_id: CASE_ID,
|
||||
question_id: args.p_question_id,
|
||||
intent: args.p_intent,
|
||||
target_evidence_id: null,
|
||||
target_domain: args.p_target_domain,
|
||||
target_kind: args.p_target_kind,
|
||||
expected_answer_schema: args.p_expected_answer_schema,
|
||||
status: "active",
|
||||
asked_at: "2026-08-25T00:00:00.000Z",
|
||||
resolved_at: null,
|
||||
idempotent: false,
|
||||
}),
|
||||
});
|
||||
const result = await persistServerOwnedFocus({
|
||||
accounting: accounting.client,
|
||||
userId: USER_ID,
|
||||
caseId: CASE_ID,
|
||||
activeFocus: null,
|
||||
decisionReceipt: {
|
||||
inference_state: {
|
||||
answered_probes: [{
|
||||
probe_id: "probe:education.2016",
|
||||
semantic_key: "education.2016",
|
||||
answer_class: "yes",
|
||||
}],
|
||||
probes: [{
|
||||
id: "probe:education.2016",
|
||||
semantic_key: "education.2016",
|
||||
candidate_split_hash: "education:2016",
|
||||
domain: "education",
|
||||
year: 2016,
|
||||
question: "发挥失常",
|
||||
candidate_ids: [],
|
||||
expected_outcomes: [],
|
||||
information_gain: 0,
|
||||
source: "known_event_quality",
|
||||
}],
|
||||
},
|
||||
},
|
||||
followup,
|
||||
});
|
||||
assert.equal(result.status, "created");
|
||||
assert.ok(result.focus);
|
||||
const schema = result.focus.expectedAnswerSchema;
|
||||
assert.equal(schema.semantic_key, "varga.d24.05:00/05:06|05:07");
|
||||
assert.notEqual(schema.probe_id, "probe:education.2016");
|
||||
assert.match(String(schema.probe_id), /varga\.d24/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user