Files
Jyotisha/docs/tasks/FIX-explicit-profile-1.md
T

2.7 KiB
Raw Blame History

#185 验收退回:两条既有测试失败,两条必写测试缺失(2026-11-09,Claude)

本文件补充 TASK-explicit-profile-20261109.md,冲突时以本文件为准。验收的是 ad6ffbad。

已核对通过(不要改)

  • 默认值 mean / apparent,常量只从 ondemand_calc/contract.py 取,前端 calculation-modes.ts 同值。
  • cache_schema_version = 9,缓存键记录 node_mode 与 position_mode;回执 calculationProfile 在 .strict() 下可选。
  • 没有改 consultation-tools.ts。
  • 数值不变:Claude 用 staging 与本分支分别算黄金盘(北京 1990)和 3 张公开盘(Jobs、Einstein、Gandhi),省略口径与显式 mean / apparent 时 result_hash、九曜、上升完全相同。唯一差别是缓存键(v9),以及分支基线较旧带来的 R2-D 字段。
  • 你说明过的两个任务书外文件(personal-report-route-core.ts、personal-report-worker.ts),以及 declaredWindowFromProfile 里加的两个字段:都是 ServerChartToolInput / ConsultationInput 改成必填后编译需要的,行为不变,接受,不用回退。

问题

  1. 两条既有测试失败:frontend/tests/consultation-route-service.test.ts 里的

    • 「route service loads complete server truth before billing and uses only reported time when unverified」
    • 「global normalized places use their exact coordinates and historical offset」

    它们对 toolInput 做 deepStrictEqual,现在多出 node_mode / position_mode。staging 上 17/17 通过,本分支 15/17。PROGRESS 列出的测试里没有这个文件,前端全量也没跑。

  2. 任务书验收第 3、4 条没有写进测试:数值不变,以及 execute_consultation_workflow 返回 calculation_profile。Claude 已把这两条写好,放在本分支的 tests/test_explicit_calculation_modes_acceptance_bug1828.py(本地通过)。保留它,不要改弱。

要做的

  1. 两条失败测试的期望值补上 node_mode: "mean"、position_mode: "apparent",写“原值 / 新值 / 原因”三栏注释,原因写 BUG-1828:绑定盘显式带交点 / 位置口径。不删断言。
  2. 跑前端全量(npm test)。除了本机已知的环境失败(database-*、staging-backend-workflows、health-deployment、model-configuration-security 等需要 Postgres 或部署环境的用例)之外,不能有新的失败。把失败名单与 staging 对比后写进 PROGRESS。
  3. 跑 tests/test_explicit_calculation_modes_acceptance_bug1828.py。

不要碰

原任务书的“不要碰”清单继续有效。不得自行写“产品决定/裁定”。

BUG-1828(在原条目补一行“验收退回:route-service 两条测试”,只改这一条)。