Files
Jyotisha/PROGRESS-rectification-convergence-20260830.md
T
Jesse_Chen e8bd3a5208
Independent Staging Quality Gate / validate (push) Successful in 16m46s
Independent Staging Quality Gate / publish (push) Successful in 19m37s
feat(rectification): expose candidate result reports
2026-08-31 05:52:38 +08:00

71 lines
4.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 生时校正收敛重构进度(2026-08-30)
## 基线与范围
- Git 根目录:`/Users/jesse/Downloads/Copse/astrology/yinduzhanxing`
- 隔离 worktree`/Users/jesse/Downloads/Copse/astrology/.worktrees/rectification-convergence-impl-20260830`
- 分支:`codex/rectification-convergence-impl-20260830`
- 基线:`origin/staging` @ `db6716e76c7a44adb568701dc811de52d8d29a96`
- staging 同步范围:`7db2dd2d..db6716e7 staging -> staging`
- 当前状态:已提交,未 push 或 deploy。
## 任务 0:上游资料与真实会话
当前无法完成,原因已记录在 `BLOCKED.md`:外部 `~/.workbuddy/skills/jyotish-birth-time-rectification/` 不存在,仓库没有受控的真实本地校正会话完整记录,也没有可验证的上游资料来源。因此以下三项不能被事实化回答:总轮数、最终交付区间宽度、`confidence` / `can_apply`
基于 v2 任务书与当前仓库/上游代码比较,可以确认本轮落点不是更换评分器,而是恢复两个缺失的生产契约:
1. 服务端持久化预算必须被生产判定消费,超预算仍交付候选区间并结束;
2. 第 0 轮起就要有可读的候选结果/校正报告,停下来时要说明下一步与局限。
尚不能确认或声称上游机制等于“问完固定题数后给出候选区间并停止”。
## 任务 1:预算与终止机制
已实现:
- 接入服务端持久化的 `inferenceRounds``effectiveAnswerCount``plateauRounds`
- 复用既有预算常量:`DEFAULT_MAX_DISCRIMINATION_ROUNDS = 8``RECTIFICATION_POLICY.maxPlateauRounds``EFFECTIVE_ANSWER_SAFETY_CAP = 10`
- `!separation.sufficient` 分支在继续 `discriminate` 前进行预算检查;超预算统一走既有 `completeWithRange(..., "exhausted")`
- 未修改 `convergence-evaluator.ts`、confirmation gate blocker 或 sealed holdout 阈值。
- 新增 `frontend/tests/rectification-convergence-budget.test.ts`,覆盖可终止、连续拒答终止、超预算交付区间、区间宽度单调性。
## 任务 2:提问权与问题槽
已完成并审核:
- live path 不再 import/call `spoken-answer.ts`;该旧解析/拼接模块已删除。
- 模型只输出确认/承接正文;`current_question` / `choice_card` 由服务端结构化返回。
- UI 使用统一问题槽展示选择题和自由输入提示;缺失问题时显示可监控状态。
- 旧历史回放保留原始 assistant 正文,不再重新解析或拼接问题。
## 任务 3:候选结果交代契约
已实现:
- 恢复 `build_candidate_result_summary()`
- `score_candidates()` / `diagnostics()` 返回 `candidate_summary``next_step_codes``stability.label``rectification_report`
- 报告包含当前候选区间、代表分钟及“代表性候选,不是唯一解”标记、置信度、逐条事件证据状态、technique layers、被排除候选、confirmation gate blocker 文案与局限声明。
- `events=[]` 时第 0 轮区间回退到用户声明的出生窗口;跨午夜窗口已验证可用;不生成唯一分钟结论。
- 新增回归覆盖零证据、跨午夜窗口、事件方法、排除候选、报告一致性与 `stability.label`
## 已通过验证
- `python3 scripts/pre_work_check.py --remote-timeout 8 --command-timeout 45`pass。
- `python3.12 -m pytest -q tests/test_active_rectification_events.py tests/test_rectification_v5_services.py`:通过(当前修改对应测试)。
- 前端聚焦测试:79/79 通过:
`rectification-decision-authority.test.ts``rectification-decide-next-action.test.ts``rectification-inference-machine.test.ts``rectification-range-offer-deadend.test.ts``rectification-collect-stall.test.ts``rectification-convergence-budget.test.ts`
- `git diff --check`:通过。
- 任务 2 聚焦测试:98/98 通过;相关补充测试(含问题槽 CSS 合同):38/38 通过。
- `./node_modules/.bin/tsc --noEmit`:通过。
- `npm run lint`0 errors25 个既有 warnings。
- `npm run build`:通过;仅有既有 Turbopack filesystem tracing warnings。
- `npm run test:db`34/34 通过,fail=0。
- 前端全量测试:2338/2338 通过,fail=0;使用 `PYTHON=/opt/anaconda3/bin/python3.12`,避免默认解释器缺少 PyYAML 的环境性失败。
## 交付状态
- 任务 1、任务 2、任务 3 已分别精确提交。
- 任务 4(标定数据入口)与任务 5(清理/同步机制)按任务书明确留待后续,不在本轮实现。
- 未 push、未 deploy;等待用户明确要求。