From 11f518bf35d588bf073dfdf9fe8a6c97b0e779cc Mon Sep 17 00:00:00 2001 From: jesse-ux Date: Tue, 17 Nov 2026 14:13:57 +0800 Subject: [PATCH] test: guard account confirmation and clarify scenario comparison --- docs/tasks/PROGRESS-rect-self-choice-scenario-20261117.md | 4 ++-- frontend/src/lib/chart-choice-both-versions.ts | 2 +- frontend/tests/account-api.test.ts | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/tasks/PROGRESS-rect-self-choice-scenario-20261117.md b/docs/tasks/PROGRESS-rect-self-choice-scenario-20261117.md index e3c753398..522726fd8 100644 --- a/docs/tasks/PROGRESS-rect-self-choice-scenario-20261117.md +++ b/docs/tasks/PROGRESS-rect-self-choice-scenario-20261117.md @@ -1,6 +1,6 @@ # #312 生时纠正用户自选情景 -基线 `0ee6b7c7c`。执行者 Codex。任务书 [自选情景](TASK-rect-self-choice-scenario-20261117.md)。 +开工基线 `0ee6b7c7c`,交付前合入 `f8e0db21f` 并复跑受影响入口。执行者 Codex。任务书 [自选情景](TASK-rect-self-choice-scenario-20261117.md)。 ## 交付 @@ -13,7 +13,7 @@ | 位置 | 处理与验证 | | --- | --- | | `home-profile`、`people-archive-view`、`chart-subject-write` | 旧/新自选在档案显示「用户自选情景」,不会显示「已校正」徽标。自选仍用已保存的时刻算盘。第三方档案输出布尔标识。定向检查覆盖读取、标签和徽标;既有来源仍走原判断。 | -| `api/account` | `hasConfirmedBirthTime` 排除自选,`hasUsableBirthTime` 仍认可可算盘的采纳。 | +| `api/account` | `hasConfirmedBirthTime` 排除自选,`hasUsableBirthTime` 仍认可可算盘的采纳。账户源码合同核对确认条件。 | | `consultation-route-service`、`api/consult`、`consultation-workflow`、`consultation-tools` | 接受已选的出生时刻,工具接收 `minute` 精度及自选来源、实际计算的备选,准确保留存储秒数。非自选提示不附自选说明;测试首答、普通追问、问生时、多情景与异常数据。 | | `personal-report-longform-birth`、`personal-report-route-core`,长报告、合盘的共享输入 | 已选时间仍参与计算,`reading_minute_confirmed` 不升级为真,报告精度保持 `provisional`。即使候选范围只有一点也按该规则。断言覆盖长报告、报告精度与合盘输入。 | | `chart-birth-truth`、`effective-birth-date`、`consultation-subject-resolver`、`birth-time-consultation-consent`、`lagna-precheck`、`rectification-links`、`onboarding-journey`、`home-bootstrap-run` | 这些判断决定有无可用出生时刻、是否重复提醒及计算路由。保持可用性,并由接收输入的调用方表达是否核实。 | diff --git a/frontend/src/lib/chart-choice-both-versions.ts b/frontend/src/lib/chart-choice-both-versions.ts index d924751fb..6f2ee2ea5 100644 --- a/frontend/src/lib/chart-choice-both-versions.ts +++ b/frontend/src/lib/chart-choice-both-versions.ts @@ -85,7 +85,7 @@ export function compareChartChoiceScenarios(input: ChartChoiceScenariosInput) { other_scenarios: input.alternatives.map(evidence), ...(input.comparison ? { opposite_side: evidence(input.comparison) } : {}), scenarios_omitted: input.omitted, - notice: "使用主情景。若已经计算的换座使两边结论相反,或改变对父母手足等客观事实的判断,分开说明两边;用户选定了一侧时也要点出另一侧。" + notice: "使用主情景。若已计算的换座使这个问题的结论不同,按情景分开说明。若两边结论相反,或改变对父母手足等客观事实的判断,即使用户已选定一侧也要点出另一侧。" + (input.omitted ? `另有 ${input.omitted} 种情景没有算。不能编写其结论。` : ""), }; } diff --git a/frontend/tests/account-api.test.ts b/frontend/tests/account-api.test.ts index 20536f16d..929c74053 100644 --- a/frontend/tests/account-api.test.ts +++ b/frontend/tests/account-api.test.ts @@ -30,6 +30,7 @@ test("account API reads and returns the server-configured rectification price", test("account API separates engine confirmation from an accepted usable chart time", () => { assert.match(source, /hasConfirmedBirthTime:\s*profile\.birth_time_status === "confirmed"/); + assert.match(source, /hasConfirmedBirthTime:\s*profile\.birth_time_status === "confirmed"\s*&& !isSelfSelectedScenario\(profile\.active_birth_provenance\)/); assert.match(source, /hasUsableBirthTime:\s*\(profile\.birth_time_status === "accepted" \|\| profile\.birth_time_status === "confirmed"\)/); });