diff --git a/docs/BUG_HISTORY.md b/docs/BUG_HISTORY.md index 7ebfbd4b..fe6211cf 100644 --- a/docs/BUG_HISTORY.md +++ b/docs/BUG_HISTORY.md @@ -3314,7 +3314,7 @@ - 触发条件:Profile 同时存在 `reported_birth_time`、历史 `active_birth_time` 和 uncertainty,或只有 period/unknown 声明时创建 fresh Case。 - 根因:fresh Case 的范围推导优先使用 `active_birth_time`,再直接读取 Profile uncertainty;初始化模型把用户声明误差和引擎搜索窗口混为同一字段,并允许用 period 或全天范围代替具体初始时间。 - 修复:初始化 UI 只采集一个具体 `reported_birth_time`,不再提供误差分钟、大致时段、范围线索或跳过入口;新填报的准确时间保存为 `reported + 0/0`,不自动宣称引擎 confirmed。`homepage/new` 只查询和使用 `reported_birth_time`,忽略历史 active minute、uncertainty 与 period;没有合法 reported time 时在调用创建 RPC 前以 `profile_incomplete` fail closed。Case 扫描所需的可移动窗口改为独立的服务器执行策略,目前以填报时间为中心使用前后 15 分钟,不再伪装成用户声明;`intent=session` 继续恢复历史 Case 自身冻结的 baseline/range。 -- 验证:回归覆盖新初始化只展示单一时间输入、`0/0` 持久化但不确认、旧 uncertainty 不影响 fresh range、旧 active minute 不进入 baseline、period/unknown/无具体时间 legacy profile 不得新建、失败前不调用 RPC,以及 session 恢复不读取当前 Profile;与 Focus、receipt 和 migration 回归合并运行 203 passed、0 failed。 +- 验证:回归覆盖新初始化只展示单一时间输入、`0/0` 持久化但不确认、旧 uncertainty 不影响 fresh range、旧 active minute 不进入 baseline、period/unknown/无具体时间 legacy profile 不得新建、失败前不调用 RPC,以及 session 恢复不读取当前 Profile;与 Focus、receipt 和 migration 回归合并运行 203 passed、0 failed。正式 staging 质量门禁另暴露两个旧测试合同,现已改为锁定“初始化仅填写一个具体时间”和 receipt tools 按真实 terminal receipt 时间排序,不再要求旧的不确定时间入口或字母排序。 - 防复发:`reported_birth_time` 是 fresh Case 唯一用户时间基线;`active_birth_time` 只表示已采用的当前排盘时间,不能反向改写新校正起点;用户声明字段、服务器搜索策略与最终 confirmed truth 必须保持分层。 - 相关记录:BUG-127、BUG-177、BUG-187 - 修复版本:本次功能分支提交(精确 SHA 以提交、远程分支与 staging 发布结果为准) diff --git a/frontend/tests/birth-time-consultation-consent.test.ts b/frontend/tests/birth-time-consultation-consent.test.ts index 14a591b9..a265d372 100644 --- a/frontend/tests/birth-time-consultation-consent.test.ts +++ b/frontend/tests/birth-time-consultation-consent.test.ts @@ -206,16 +206,18 @@ test("unverified birth time no longer emits a modal or toast gate", () => { assert.doesNotMatch(page, /role="alertdialog"[\s\S]{0,300}出生时间还没有完成校正/); }); -test("birth time intake starts with two simple choices and keeps rectification optional", () => { +test("birth time intake only accepts one concrete initialization time", () => { const intake = readFileSync(new URL("../src/components/birth-time-intake.tsx", import.meta.url), "utf8"); const model = readFileSync(new URL("../src/lib/birth-time-intake-model.ts", import.meta.url), "utf8"); assert.match(model, /我知道准确出生时间/); - assert.match(model, /我不确定准确时间/); + assert.match(intake, /请填写你初始化提供的具体出生时间/); + assert.match(intake, /aria-label="选择出生时间"/); + assert.doesNotMatch(model, /我不确定准确时间/); assert.doesNotMatch(intake, /source === "family_exact" \|\| source === "approximate"/); - assert.match(intake, /请选择最接近的时间范围/); - assert.match(intake, /完全不清楚,跳过出生时间/); - assert.match(intake, /生时校正以后需要时再做/); + assert.doesNotMatch(intake, /请选择最接近的时间范围/); + assert.doesNotMatch(intake, /完全不清楚,跳过出生时间/); + assert.doesNotMatch(intake, /生时校正以后需要时再做/); }); test("homepage and profile result copy use the source-aware consultation options", () => { diff --git a/frontend/tests/rectification-v9-database.test.ts b/frontend/tests/rectification-v9-database.test.ts index 578d85aa..c0f82d90 100644 --- a/frontend/tests/rectification-v9-database.test.ts +++ b/frontend/tests/rectification-v9-database.test.ts @@ -1023,8 +1023,8 @@ test("v9 agent api migration applies, seeds the runtime flag and guards consent" assert.equal(receiptRow.skill_version, "9.0.0"); assert.equal(receiptRow.engine_version, "fixture-engine"); assert.deepEqual(receiptRow.tools, [ - "rectification-compare-candidates", "rectification-read-case", + "rectification-compare-candidates", ]); assert.deepEqual(receiptRow.methods, [ "d1-rashi",