@@ -54,6 +54,8 @@ const FAMILY_ID = "44444444-4444-4444-8444-444444444443";
const CAREER_ID = "44444444-4444-4444-8444-444444444444" ;
const UNIQUE_MINUTE_COPY = /±5 分钟确定性/ ;
// 本单回退 3847e9c9 把训练门未开的下一问改成家人的断言。见各断言旁三栏。
function collectDecision ( candidates : readonly { time : string ; relativeSupport? : number } [ ] ) {
return decideRectification ( {
engineCeiling : OPEN_ENGINE_CAPABILITY_CEILING ,
@@ -365,7 +367,7 @@ function stubEngine(response: unknown) {
} ;
}
test ( "eight-method routing asks family after dated education, not relocation" , ( ) = > {
test ( "eight-method routing asks relationship after dated education, not relocation" , ( ) = > {
const plan = buildMethodFollowupPlan ( {
evidence : [ {
status : "confirmed" ,
@@ -375,11 +377,11 @@ test("eight-method routing asks family after dated education, not relocation", (
occurredTo : null ,
} ] ,
} ) ;
// 原值: d9_ relationship / relationship
// 新值: relatives / family
// 原因: 训练门未开时主流程走 datedCollectOrder,家人在感情之前;SQL missing 的 relocation 仍不进轮转。
assert . equal ( plan . next_followup ? . method_id , "relatives " ) ;
assert . equal ( plan . next_followup ? . domain , "family " ) ;
// 原值: relatives / family
// 新值: d9_ relationship / relationship
// 原因: dated 分支移到家人之后,前两问恢复感情 / 事业
assert . equal ( plan . next_followup ? . method_id , "d9_ relationship " ) ;
assert . equal ( plan . next_followup ? . domain , "relationship " ) ;
assert . equal ( plan . stop_domain_rotation , true ) ;
assert . deepEqual ( [ . . . plan . not_in_rotation ] , [ "relocation" ] ) ;
assert . equal ( plan . methods . find ( ( item ) = > item . method_id === "appearance" ) ? . status , "skipped_by_policy" ) ;
@@ -390,11 +392,11 @@ test("dasha conflict probe does not jump ahead of method rotation before accepta
evidence : [ datedEvidence ( "education" , "2016" ) ] ,
eventProbes : [ CAREER_CONFLICT_PROBE ] ,
} ) ;
// 原值: method_coverage / d9_ relationship
// 新值: method_coverage / relatives
// 原因: 训练门未开时先补家人采集,冲突探针仍不得抢跑。
// 原值: method_coverage / relatives
// 新值: method_coverage / d9_ relationship
// 原因: dated 分支移到家人之后,前两问恢复感情 / 事业
assert . equal ( plan . next_followup ? . source , "method_coverage" ) ;
assert . equal ( plan . next_followup ? . method_id , "relatives " ) ;
assert . equal ( plan . next_followup ? . method_id , "d9_ relationship " ) ;
assert . equal ( plan . next_followup ? . choice_frame , null ) ;
assert . notEqual ( plan . next_followup ? . source , "event_probe" ) ;
} ) ;
@@ -404,11 +406,11 @@ test("known exam quality does not create a scoring card after one recorded event
evidence : [ datedEvidence ( "education" , "2016" ) ] ,
eventProbes : [ EDUCATION_QUALITY_PROBE , CAREER_CONFLICT_PROBE ] ,
} ) ;
// 原值: method_coverage / d9_ relationship
// 新值: method_coverage / relatives
// 原因: 一条学业记录未开训练门,先问家人而不是质量卡。
// 原值: method_coverage / relatives
// 新值: method_coverage / d9_ relationship
// 原因: dated 分支移到家人之后,前两问恢复感情 / 事业
assert . equal ( plan . next_followup ? . source , "method_coverage" ) ;
assert . equal ( plan . next_followup ? . method_id , "relatives " ) ;
assert . equal ( plan . next_followup ? . method_id , "d9_ relationship " ) ;
assert . equal ( plan . next_followup ? . choice_frame , null ) ;
assert . notEqual ( plan . next_followup ? . choice_kind , "event_quality" ) ;
} ) ;
@@ -421,11 +423,11 @@ test("career known-event quality does not jump the adoption gate", () => {
] ,
eventProbes : [ CAREER_QUALITY_PROBE , CAREER_CONFLICT_PROBE ] ,
} ) ;
// 原值: method_coverage / d9_ relationship
// 新值: method_coverage / relatives
// 原因: 两条事业记录仍不足训练门(领域数不够),先补家人。
// 原值: method_coverage / relatives
// 新值: method_coverage / d9_ relationship
// 原因: dated 分支移到家人之后,前两问恢复感情 / 事业
assert . equal ( plan . next_followup ? . source , "method_coverage" ) ;
assert . equal ( plan . next_followup ? . method_id , "relatives " ) ;
assert . equal ( plan . next_followup ? . method_id , "d9_ relationship " ) ;
assert . equal ( plan . next_followup ? . choice_frame , null ) ;
assert . notEqual ( plan . next_followup ? . source , "event_probe" ) ;
assert . notEqual ( plan . next_followup ? . choice_kind , "event_quality" ) ;
@@ -436,11 +438,11 @@ test("encoded exam quality does not stamp another card and keeps method rotation
evidence : [ datedEvidence ( "education" , "2016" , { summary : "2016年高考发挥异常" } ) ] ,
eventProbes : [ EDUCATION_QUALITY_PROBE , CAREER_CONFLICT_PROBE ] ,
} ) ;
// 原值: method_coverage / d9_ relationship
// 新值: method_coverage / relatives
// 原因: 编码质量探针仍不得在训练门前出卡;下一问是家人采集。
// 原值: method_coverage / relatives
// 新值: method_coverage / d9_ relationship
// 原因: dated 分支移到家人之后,前两问恢复感情 / 事业
assert . equal ( plan . next_followup ? . source , "method_coverage" ) ;
assert . equal ( plan . next_followup ? . method_id , "relatives " ) ;
assert . equal ( plan . next_followup ? . method_id , "d9_ relationship " ) ;
assert . equal ( plan . next_followup ? . choice_frame , null ) ;
} ) ;
@@ -504,11 +506,11 @@ test("three scoreable events in one domain still rotate methods instead of rever
] ,
eventProbes : [ CAREER_CONFLICT_PROBE ] ,
} ) ;
// 原值: method_coverage / d9_ relationship
// 新值: method_coverage / relatives
// 原因: 三件都在学业,领域数不足训练门,先补家人而不是反推。
// 原值: method_coverage / relatives
// 新值: method_coverage / d9_ relationship
// 原因: dated 分支移到家人之后,前两问恢复感情 / 事业
assert . equal ( plan . next_followup ? . source , "method_coverage" ) ;
assert . equal ( plan . next_followup ? . method_id , "relatives " ) ;
assert . equal ( plan . next_followup ? . method_id , "d9_ relationship " ) ;
assert . equal ( plan . next_followup ? . choice_frame , null ) ;
} ) ;
@@ -528,11 +530,11 @@ test("occupation_note does not count toward reverse-inference event quality", ()
] ,
eventProbes : [ CAREER_CONFLICT_PROBE ] ,
} ) ;
// 原值: method_coverage / d9_ relationship
// 新值: method_coverage / relatives
// 原因: occupation_note 不计训练门,下一问仍是家人采集。
// 原值: method_coverage / relatives
// 新值: method_coverage / d9_ relationship
// 原因: dated 分支移到家人之后,前两问恢复感情 / 事业
assert . equal ( plan . next_followup ? . source , "method_coverage" ) ;
assert . equal ( plan . next_followup ? . method_id , "relatives " ) ;
assert . equal ( plan . next_followup ? . method_id , "d9_ relationship " ) ;
assert . equal ( plan . next_followup ? . choice_frame , null ) ;
} ) ;
@@ -558,10 +560,10 @@ test("age-band probe does not jump ahead of uncovered relationship", () => {
role : "reverse_verify" ,
} ] ,
} ) ;
// 原值: d9_ relationship
// 新值: relatives
// 原因: 年龄带探针不得抢跑;训练门未开时先问家人,不是感情。
assert . equal ( plan . next_followup ? . method_id , "relatives " ) ;
// 原值: relatives
// 新值: d9_ relationship
// 原因: dated 分支移到家人之后,前两问恢复感情 / 事业
assert . equal ( plan . next_followup ? . method_id , "d9_ relationship " ) ;
assert . equal ( plan . next_followup ? . source , "method_coverage" ) ;
assert . equal ( plan . next_followup ? . choice_frame , null ) ;
} ) ;
@@ -618,10 +620,10 @@ test("user-stop action offers a range when candidates already exist", () => {
assert . equal ( plan . methods . find ( ( item ) = > item . method_id === "marks" ) ? . status , "skipped_by_policy" ) ;
assert . equal ( plan . methods . find ( ( item ) = > item . method_id === "horary" ) ? . status , "uncovered" ) ;
assert . equal ( plan . methods . find ( ( item ) = > item . method_id === "occupation" ) ? . status , "uncovered" ) ;
// 原值: d9_ relationship
// 新值: relatives
// 原因: 一件学业未开训练门,用户停下时仍在采集家人。
assert . equal ( plan . next_followup ? . method_id , "relatives " ) ;
// 原值: relatives
// 新值: d9_ relationship
// 原因: dated 分支移到家人之后,前两问恢复感情 / 事业
assert . equal ( plan . next_followup ? . method_id , "d9_ relationship " ) ;
assert . match ( plan . next_followup ? . user_prompt_hint ? ? "" , /自然语言/ ) ;
assert . doesNotMatch ( plan . next_followup ? . user_prompt_hint ? ? "" , /A\/B\/C\/D/ ) ;
assert . equal ( plan . next_followup ? . choice_frame , null ) ;
@@ -647,10 +649,10 @@ test("selectionAllowed with remaining method follow-up keeps collecting and offe
nextFollowup : plan.next_followup ,
workingTime : "05:07" ,
} ) ;
// 原值: d9_ relationship
// 新值: relatives
// 原因: 训练门未开时继续采集家人,停下才给区间。
assert . equal ( plan . next_followup ? . method_id , "relatives " ) ;
// 原值: relatives
// 新值: d9_ relationship
// 原因: dated 分支移到家人之后,前两问恢复感情 / 事业
assert . equal ( plan . next_followup ? . method_id , "d9_ relationship " ) ;
assert . equal ( action . id , "ask_method_followup" ) ;
assert . equal ( action . on_user_stop . id , "offer_provisional_range" ) ;
} ) ;
@@ -667,10 +669,10 @@ test("adopt_representative defers method follow-up instead of asking this turn",
sessionOutcome : "adopt_representative" ,
} ) ;
assert . equal ( plan . next_followup , null ) ;
// 原值: d9_ relationship
// 新值: relatives
// 原因: 采用轮仍 stash 下一采集题;训练门未开时那题是家人。
assert . equal ( plan . deferred_followup ? . method_id , "relatives " ) ;
// 原值: relatives
// 新值: d9_ relationship
// 原因: dated 分支移到家人之后,前两问恢复感情 / 事业
assert . equal ( plan . deferred_followup ? . method_id , "d9_ relationship " ) ;
assert . equal ( plan . session_outcome , "adopt_representative" ) ;
} ) ;
@@ -699,11 +701,11 @@ test("declined relationship skips to career and leaves horary uncovered", () =>
} ] ,
declinedTopics : [ { target_domain : "relationship" , status : "declined" } ] ,
} ) ;
// 原值: d10_career / career
// 新值: relatives / family
// 原因: 感情拒答只跳过感情;训练门未开时下一件带年份的是家人,不是 事业。
assert . equal ( plan . next_followup ? . method_id , "relatives " ) ;
assert . equal ( plan . next_followup ? . domain , "family " ) ;
// 原值: relatives / family
// 新值: d10_career / career
// 原因: dated 分支移到家人之后,前两问恢复感情 / 事业
assert . equal ( plan . next_followup ? . method_id , "d10_career " ) ;
assert . equal ( plan . next_followup ? . domain , "career " ) ;
assert . deepEqual ( [ . . . plan . do_not_poll ] , [ ] ) ;
assert . equal ( plan . methods . find ( ( item ) = > item . method_id === "horary" ) ? . status , "uncovered" ) ;
} ) ;
@@ -938,11 +940,11 @@ test("read-case follows method plan and keeps D9/D10 type tables when SQL missin
} > ;
} ) . execute ( { caseId : CASE_ID , projection : "full_diagnostics" } ) ;
assert . deepEqual ( projection . conversation_summary . missing_evidence_categories , [ "relocation" , "health" , "finance" ] ) ;
// 原值: d9_relationship / relationship
// 新值: d2_finance / finance
// 原因: 学业+家人+事业三条里 1 条 holdout,训练门未开;datedCollectOrder 里家人/学业已有记录,下一问是财务。仍不按 SQL missing 先问搬家。
assert . equal ( projection . method_followup_plan . next_followup ? . method_id , "d2_finance " ) ;
assert . equal ( projection . method_followup_plan . next_followup ? . domain , "finance " ) ;
// 原值: d2_finance / finance
// 新值: d9_relationship / relationship
// 原因: dated 分支移到家人之后,前两问恢复感情 / 事业
assert . equal ( projection . method_followup_plan . next_followup ? . method_id , "d9_relationship " ) ;
assert . equal ( projection . method_followup_plan . next_followup ? . domain , "relationship " ) ;
assert . equal ( projection . method_followup_plan . deferred_followup , null ) ;
assert . equal ( projection . method_followup_plan . session_outcome , "collect_evidence" ) ;
assert . equal (
@@ -1626,10 +1628,10 @@ test("precision stage lagna_frame waits for uncovered career before asking anoth
] ,
precisionStage : "lagna_frame" ,
} ) ;
// 原值: d10_career
// 新值: relatives
// 原因: 学业+感情仍不足训练门,lagna_frame 不得先问另一件泛问;先补家人。
assert . equal ( plan . next_followup ? . method_id , "relatives " ) ;
// 原值: relatives
// 新值: d10_career
// 原因: dated 分支移到家人之后,前两问恢复感情 / 事业
assert . equal ( plan . next_followup ? . method_id , "d10_career " ) ;
assert . equal ( plan . next_followup ? . source , "method_coverage" ) ;
assert . equal ( isOfferBlockingFollowup ( plan . next_followup , plan . methods ) , true ) ;
assert . doesNotMatch ( JSON . stringify ( plan ) , UNIQUE_MINUTE_COPY ) ;
@@ -2726,9 +2728,9 @@ test("three dated events with one holdout keep collecting instead of discriminat
precisionStage : "lagna_frame" ,
eventProbes : [ CAREER_CONFLICT_PROBE ] ,
} ) ;
// 原值: method_coverage(方法轮转 )
// 原值: method_coverage / finance( 3847e9c9 新增 domain 锁 )
// 新值: method_coverage / finance
// 原因: 家人已拒答,学业/事业/感情已有记录,holdout 占用 1 条,训练门未开,补 财务而 不是区分 。
// 原因: dated 分支在家人之后;家人已拒答,下一件带年份仍是 财务, 不是轮转抢跑 。
assert . equal ( plan . next_followup ? . source , "method_coverage" ) ;
assert . equal ( plan . next_followup ? . intent , "collect_method_evidence" ) ;
assert . equal ( plan . next_followup ? . domain , "finance" ) ;
@@ -2800,10 +2802,10 @@ test("adjacent education year does not re-ask enrollment after a recorded start"
} ) ;
assert . notEqual ( plan . next_followup ? . domain , "education" ) ;
assert . notEqual ( plan . next_followup ? . source , "event_probe" ) ;
// 原值: d10_career
// 新值: relatives
// 原因: 邻近年不得再问入学;训练门未开时下一问是家人,不是 事业。
assert . equal ( plan . next_followup ? . method_id , "relatives " ) ;
// 原值: relatives
// 新值: d10_career
// 原因: dated 分支移到家人之后,前两问恢复感情 / 事业
assert . equal ( plan . next_followup ? . method_id , "d10_career " ) ;
assert . match ( plan . next_followup ? . user_prompt_hint ? ? "" , /2016 年入学/ ) ;
assert . match ( plan . next_followup ? . user_prompt_hint ? ? "" , /2024 年感情结束/ ) ;
assert . match ( plan . next_followup ? . user_prompt_hint ? ? "" , /不要再问这些事发生在哪一年/ ) ;