Files
Jyotisha/docs/tasks/PROGRESS-rectification-history-open-20260909.md
T
Jesse_ChenandCursor a31a5e2426
Independent Staging Quality Gate / validate (push) Successful in 9m46s
Independent Staging Quality Gate / publish (push) Successful in 32m4s
fix(rectification): open history cases with their bound skill identity (BUG-621)
Session open was sending the live registry version into v2, so every Skill
bump rejected older cases with an unmapped 500 and no error on the clicked row.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 19:35:23 +08:00

4.0 KiB
Raw Blame History

PROGRESS · 历史生时校正打开时用绑定 Skill 身份(BUG-6212026-09-09

工作树:.worktrees/rectification-history-open-20260909 分支:codex/rectification-history-open-20260909 任务书:docs/tasks/TASK-rectification-history-open-20260909.md 基线:任务书写 origin/staging @ af70ae77;本 worktree 从任务书提交 e8d46f12 切出,开工后快进合并 c41afe26BUG-622,对齐过期合同测试)。

本单状态:待验收。未 push,未合入 staging/main。合入时更新落点 SHA。

预检:本机 python3 scripts/pre_work_check.py 失败(系统 Python 3.14 无 pytest、无 swissephERR-078)。不把预检失败写成门禁已过。前端用 worktree 里指向其他 worktree 的 frontend/node_modules 符号链接。

未改:数据库迁移、adopt-skill 路由、采用门 / 确认门、只读终态、homepage / new 仍用当前注册版本、Skill 版本号。

做了什么

  • 决策 1 openRectificationCaseintent === "session" 时:open_agentic_rectification_casev1)按会话取 Case → get_agentic_rectification_skill_identity 读绑定身份 → resolveExactSkillPackage 核验快照与 sha → 把绑定身份作为 p_skill_* 调 v2。绑定版本不在注册表 → skill_identity_missing。legacy sha 为空仍走既有 skill_identity_unverifiable
  • 决策 2 KNOWN_RPC_ERROR_CODES 增加 agentic_rectification_skill_identity_mismatch → 409,文案「该校正绑定的规则版本与当前不一致,请刷新后重试」。
  • 决策 3 历史打开失败把 rectificationErrorSessionId 绑到被点会话;侧栏行下 .session-open-error 一行;StarterHome 收到空字符串,起始卡不重复。成功或另选会话则清除。
  • 记录 docs/BUG_HISTORY.md BUG-621CHANGELOG.mddocs/testing/rectification-history-open-20260909.md

三栏

用例 原值 新值 理由
历史会话绑定 10.0.17(快照仍在) v2 收到当前 10.0.19 → mismatch → 500 v2 收到 10.0.17,打开成功 决策 1:按绑定版本打开
绑定版本不在注册表 同上,落到 500 skill_identity_missing,不调 v2 决策 1:核验失败走既有 missing
homepage / new 当前注册版本 仍是当前注册版本 只有 session 改绑定身份
skill_identity_mismatch 未映射 → 500「校正服务暂时不可用」 409,请刷新后重试 决策 2
历史列表点开失败 错误在首页起始卡下;会话不切 错误在被点那一行下;起始卡不重复 决策 3;BUG-599 让点击不再先切会话

测试

  • frontend ./node_modules/.bin/tsc --noEmitexit 0
  • 本单改动文件 eslint0 errorpage.tsx / app-sidebar.tsx 等既有 hooks warning 未新增)
  • 全仓 npm run lint4 error / 108 warning。4 error 全在 rectification-agentic-chat.tsx 的既有 react-hooks/refs(约 L1461),本单未改该文件
  • 针对性 tsx --testcase-service / history-open / agentic-entry / skill-registry / sidebar-contract / surface-contract / home-bootstrap-reveal):147 passed / 0 failed
  • 任务书切片 ls tests/rectification-*.test.ts tests/skill-registry*.test.ts tests/home-bootstrap*.test.ts | grep -v database | xargs tsx --test1093 passed / 0 failed
  • Docker DB / test:db:本机无 Docker,记环境缺口;本轮无新迁移,不触发该硬要求
  • 浏览器真人走查:无登录态,未见真实历史 Case。走查清单见 docs/testing/rectification-history-open-20260909.md

偏离

  1. 任务书基线 af70ae77;执行分支从已推任务书的 e8d46f12 切出,并快进 c41afe26BUG-622)。
  2. 侧栏错误用 .session-open-erroroverline + danger),不再引入已删除的 composer-notice 类名。
  3. 未跑 Docker 中的打开 RPC 真库套件。

环境缺口

  • 本机系统 Python 3.14 无 pytest / swisseph,预检失败(ERR-078)。
  • 无 Docker,不能跑 test:db
  • 无 staging 登录态,不能真人点历史校正。