Files
Jyotisha/docs/tasks/TASK-synastry-staging-fix-fix-20261022.md
T
Jesse_ChenandClaude Opus 5.5 7fbdcab113 docs(tasks): synastry T7-T11 fix brief (agent loop, issue #85 round 1)
The new /synastry/[reportId] route is missing from the capability audit's
app_routes list (quick gate red), the changelog still promises reuse of a
ready report, and the sidebar highlight test asserts a constant.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LutgzyJqNhPpZy1nFsJtN3
2026-10-22 00:48:08 +08:00

3.5 KiB
Raw Blame History

修复单:婚恋合盘 T7~T11 验收遗留(issue #85,第 1 次打回,2026-10-22)

  • 被验提交:57ee79cc5(分支 codex/synastry-staging-fix-20261021)
  • 原任务书:TASK-synastry-staging-fix-20261021.md(T7~T11)
  • 执行方:Grok。同一分支继续,开工前 git merge origin/staging(不 rebase),只推这个分支。
  • BUG 编号:本分支已用 1404~1408,保持不变(其他分支撞号由 Claude 合入时重编)。

验收结论(Claude,Linux / Node 22)

项 结论
tsc / lint 0 错;0 error
前端全量 npm test 5101 条,失败 25,名单与 staging 9812f3173 基线逐名一致
逐行审阅 T7~T11 通过:范围干净;新迁移只删一个唯一索引,对已部署代码向后兼容,真库测试覆盖「两份 ready 并存」「生成中复用不扣点」「ready 后再建扣点」;改动的断言都有三栏;双击不会重复扣点(busy + 每人一份生成中的索引,输方 409 并释放预留);新地址的归属校验仍在服务端
全量 pytest 多 1 条失败,见 G1
Python 快速门 pytest 一步失败(同 G1)。进度记录写了「没有跑快速门」,正是这条漏掉的原因
build 本机内存不足被系统杀掉,Claude 另行重跑,不算本单问题

G1 · 新页面没登记进路由清单(必修)

tests/test_api_server_security.py::test_capability_audit_scans_registry_and_local_sources 失败:

At index 34 diff: 'synastry/[reportId]' != 'terms'

该用例断言 audit['surfaces']['app_routes'] 等于一张写死的前端路由表。T7 新增了 app/(app)/synastry/[reportId]/page.tsx,表里没加。按 AGENTS §7.8 同轮改:在表中按字母序加入 'synastry/[reportId]',旁边写三栏(原值:synastry 后面直接是 terms / 新值:加入 synastry/[reportId] / 原因:issue #85 T7 合盘报告独立地址)。

G2 · 文档与 T11 矛盾(必修,纯文字)

CHANGELOG.md BUG-1407 那条(「合盘两人顺序跟选人页一致」)和 PROGRESS-synastry-staging-fix-20261021.md T10 节都写着「同一对已经有报告时,仍打开原来那份」。T11 之后这句只对正在生成的报告成立。改成「同一对正在生成时,仍打开那份」。

G3 · 侧栏点亮的测试是空断言(必修,小)

frontend/tests/synastry-report-surface.test.ts「the synastry route reuses the reader and the sidebar stays on 婚恋合盘」里 assert.equal("/synastry/abc".startsWith("/synastry/"), true) 永远成立,测的不是页面。任务书要求的是:渲染侧栏(pathname = "/synastry/<id>"),断言当前项(aria-current="page" 或现有的选中类)是「婚恋合盘」、不是「我的报告」。照现有侧栏渲染测试的写法补一条,删掉这句空断言(三栏)。

交回前必跑

  • PATH 用工作树 .venv:python scripts/run_quality_gate.py --profile quick,回报里写退出码与 pytest 通过 / 失败数(Windows 已知失败按名单列出)。
  • tsc --noEmit、npm run lint、synastry-report-surface.test.ts。
  • 全量 npm test、build 由 Claude 复验。

不用改的(记录在案)

stripLeadingSectionTitle 在保存路径上基本走不到(质检已拦)、质检不认「标题:」紧跟标点的写法、synastry_order 行出现在进度列表里、后续对话的人物 id 仍按排序后的顺序——都不影响用户,本轮不动。