fix(rectification): skip covered-domain existence probes, then pick max gain
Independent Staging Quality Gate / validate (push) Successful in 9m42s
Independent Staging Quality Gate / publish (push) Failing after 8m9s

Dated evidence in a domain no longer yields another existence question
in that domain. Remaining varga discriminators all stay in the pool so
the next card is whichever unused split scores highest.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-28 09:59:45 +08:00
co-authored by Cursor
parent ca6252ecb6
commit 4767b34ff0
8 changed files with 205 additions and 33 deletions
+109 -18
View File
@@ -1057,19 +1057,19 @@ test("evidence batch returns the persisted choice prompt as open_question", asyn
discriminating_event_probes: [{
year: 2023,
year_label: "2023 年前后",
domain: "career",
event_family: "入职、升职或职责明显加重",
domain: "relocation",
event_family: "搬家、离乡或长期异地",
source: "dasha_activation",
tracks: ["vimshottari", "narayana"],
tracks_agree: false,
unique_minute_claim: false,
user_meaning: "年份锁定 2023 年前后。事件家族:入职、升职或职责明显加重。",
user_meaning: "年份锁定 2023 年前后。事件家族:搬家、离乡或长期异地。",
role: "distinguish",
phase: "candidate_discriminator",
information_gain: 1.09,
semantic_key: "career.2023.dasha_activation",
semantic_key: "relocation.2023.dasha_activation",
candidate_set_version: "set-test",
candidate_split_hash: "set-test:career:2023",
candidate_split_hash: "set-test:relocation:2023",
candidate_ids: ["04:50", "05:20"],
expected_outcomes: [
{ answer_class: "yes", supports: ["04:50"], conflicts: ["05:20"] },
@@ -1158,7 +1158,7 @@ test("evidence batch returns the persisted choice prompt as open_question", asyn
const schema = setFocus?.args.p_expected_answer_schema as { choice?: { prompt?: string } } | undefined;
assert.match(schema?.choice?.prompt ?? "", /2023 年前后/);
assert.match(result.open_question?.prompt ?? "", /2023 年前后/);
assert.match(result.open_question?.prompt ?? "", /入职、升职或职责明显加重/);
assert.match(result.open_question?.prompt ?? "", /搬家、离乡或长期异地/);
assert.doesNotMatch(result.open_question?.prompt ?? "", /高考/);
} finally {
restore();
@@ -1548,6 +1548,30 @@ test("confirmed relationship evidence skips generic D9 followups unless a real p
const probed = buildMethodFollowupPlan({
evidence,
precisionStage: "d9_refine",
contrastPacket: {
candidateSetVersion: "05:00-05:14",
vargaDifferences: [],
probes: [{
probeId: "contrast:varga.d9.05:00|05:14",
candidateSetVersion: "05:00-05:14",
question: "当前几个候选在关系盘上还分得开。",
expectedOutcomes: [
{ outcomeId: "yes", supportsCandidateIds: ["05:00"], conflictsCandidateIds: ["05:14"] },
{ outcomeId: "weak_yes", supportsCandidateIds: ["05:14"], conflictsCandidateIds: ["05:00"] },
],
candidateSplitHash: "varga.d9.05:00|05:14",
informationGain: 1.4,
sourceFeatures: [{ technique: "D9", calculationResultId: RESULT_ID }],
domain: "relationship",
year: null,
semanticKey: "varga.d9.05:00|05:14",
choiceKind: "varga_style",
styleOptions: [
{ label: "相处更主动热情", answerClass: "yes", sign: "白羊座" },
{ label: "相处更深刻占有", answerClass: "weak_yes", sign: "天蝎座" },
],
}],
},
eventProbes: [{
...CAREER_CONFLICT_PROBE,
year: 2021,
@@ -1560,7 +1584,8 @@ test("confirmed relationship evidence skips generic D9 followups unless a real p
});
assert.equal(probed.next_followup?.domain, "relationship");
assert.equal(probed.next_followup?.source, "event_probe");
assert.equal(probed.next_followup?.semantic_key, "relationship.2021.dasha_activation");
assert.equal(probed.next_followup?.semantic_key, "varga.d9.05:00|05:14");
assert.doesNotMatch(probed.next_followup?.semantic_key ?? "", /relationship\.2021/);
});
test("d9_refine after relationship still asks uncovered career first", () => {
@@ -2065,22 +2090,88 @@ test("structured paused state ends evidence collection without parsing user copy
});
test("same domain different year still asks a conflict probe", () => {
const plan = buildMethodFollowupPlan({
evidence: [
datedEvidence("education", "2016"),
datedEvidence("relationship", "2018"),
datedEvidence("career", "2015"),
datedEvidence("family", "2023"),
],
test("covered-domain existence probes are skipped; the highest remaining discriminator wins", () => {
const evidence = [
datedEvidence("education", "2016"),
datedEvidence("relationship", "2018"),
datedEvidence("career", "2015"),
datedEvidence("family", "2023"),
];
const skipped = buildMethodFollowupPlan({
evidence,
eventProbes: [{
...CAREER_CONFLICT_PROBE,
information_gain: 0.21,
information_gain: 0.56,
semantic_key: "career.2018.dasha_activation",
}],
});
assert.equal(plan.next_followup?.source, "event_probe");
assert.equal(plan.next_followup?.domain, "career");
assert.notEqual(skipped.next_followup?.domain, "career");
assert.notEqual(skipped.next_followup?.source, "event_probe");
const d24 = {
probeId: "contrast:varga.d24.05:00|05:07|05:14",
candidateSetVersion: "05:00-05:14",
question: "当前几个候选在学业盘上还分得开。",
expectedOutcomes: [
{ outcomeId: "yes", supportsCandidateIds: ["05:00"], conflictsCandidateIds: ["05:07", "05:14"] },
{ outcomeId: "no", supportsCandidateIds: ["05:07", "05:14"], conflictsCandidateIds: ["05:00"] },
],
candidateSplitHash: "varga.d24.05:00|05:07|05:14",
informationGain: 2.5,
sourceFeatures: [{ technique: "D24", calculationResultId: RESULT_ID }],
domain: "education",
year: null,
semanticKey: "varga.d24.05:00|05:07|05:14",
choiceKind: "event_quality" as const,
};
const d10 = {
probeId: "contrast:varga.d10.05:00|05:07|05:14",
candidateSetVersion: "05:00-05:14",
question: "当前几个候选在事业盘上还分得开。",
expectedOutcomes: [
{ outcomeId: "yes", supportsCandidateIds: ["05:00"], conflictsCandidateIds: ["05:07", "05:14"] },
{ outcomeId: "weak_yes", supportsCandidateIds: ["05:07"], conflictsCandidateIds: ["05:00", "05:14"] },
{ outcomeId: "no", supportsCandidateIds: ["05:14"], conflictsCandidateIds: ["05:00", "05:07"] },
],
candidateSplitHash: "varga.d10.05:00|05:07|05:14",
informationGain: 3.1,
sourceFeatures: [{ technique: "D10", calculationResultId: RESULT_ID }],
domain: "career",
year: null,
semanticKey: "varga.d10.05:00|05:07|05:14",
choiceKind: "varga_style" as const,
styleOptions: [
{ label: "做事偏领导推进", answerClass: "yes" as const, sign: "白羊座" },
{ label: "做事偏研究转化", answerClass: "weak_yes" as const, sign: "天蝎座" },
],
};
const highest = buildMethodFollowupPlan({
evidence,
eventProbes: [{
...CAREER_CONFLICT_PROBE,
information_gain: 0.56,
semantic_key: "career.2018.dasha_activation",
}],
contrastPacket: {
candidateSetVersion: "05:00-05:14",
vargaDifferences: [],
probes: [d24, d10],
},
candidatesSeparated: false,
});
assert.equal(highest.next_followup?.semantic_key, d10.semanticKey);
assert.doesNotMatch(highest.next_followup?.semantic_key ?? "", /career\.2018/);
const d24Wins = buildMethodFollowupPlan({
evidence,
contrastPacket: {
candidateSetVersion: "05:00-05:14",
vargaDifferences: [],
probes: [d24, { ...d10, informationGain: 1.1 }],
},
candidatesSeparated: false,
});
assert.equal(d24Wins.next_followup?.semantic_key, d24.semanticKey);
});
test("three dated events with one holdout keep collecting instead of discriminating", () => {