Files
Jyotisha/docs/tasks/PROGRESS-rectification-capability-fix-20260907.md
T
Jesse_Chen 517df002b5 fix(rectification): narrate the credible range and stop scoring periods by length (BUG-569–570)
Choice copy was comparing the search window, so every answer said the range had not changed. Block-scan summed raw scores, so longer afternoon windows won before any evidence difference.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-07 10:03:28 +08:00

43 lines
2.7 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.
# PROGRESS · 校正能力补齐修复单(2026-09-07)
工作树:`.worktrees/rectification-capability-fix-20260907`
分支:`codex/rectification-capability-fix-20260907`(跟踪 `origin/staging`
基线:`origin/staging` @ `d6ee8cbb`(含 `814c924e` BUG-565568
未改 `SKILL.md`(仍 10.0.14)、未改采用门 / 确认门 / `MIN_SEPARATION_LEAD` / 分钟级 `_relative_support`、未改 `minute_step=1` 路径、未改 `page.tsx`。未把 `.venv` 加入提交。
本单状态:**待验收**。BUG-569 / BUG-570 已实现;P2 文案与 P3 BLOCKED 同提交。
| 任务 | 状态 | BUG |
| --- | --- | --- |
| 4.1 旁白比 credible_range | 完成 | BUG-569 |
| 4.2 时段支持度按段内均值 | 完成 | BUG-570 |
| 4.3 TRACK_LABEL + BLOCKED 归位 | 完成 | P2 / P3 |
| 4.4 记录 | 完成 | BUG_HISTORY / CHANGELOG / 本文件 / testing 第 2 条 |
## 实现要点
- `composeChoiceNarration` 入参改为 `credibleBefore/credibleAfter``applyRectificationChoice` 传入 `previous.credible_range``applied.state.credible_range`。搜索窗口 `range_start/range_end` 不再进旁白。
- `block_scan``raw_support = max(mean(score in block) min(all scores), 0)`,全零时五段各 20%。`candidate_count` 保留。
- `probe-explain.ts` 的大运标签改走 `publicRectificationMethodLabel``rectification-varga-sentence.ts`),不再维护第二份 TRACK_LABEL。
- `docs/BLOCKED.md` 的 BLK-001 搬回根目录 `BLOCKED.md` 并删除前者。
### 既有断言改动
| 文件 | 原值 | 新值 | 原因 |
| --- | --- | --- | --- |
| `rectification-answer-choice` 纯函数旁白 | `rangeBefore/rangeAfter` 直喂 | 入参改名 `credibleBefore/credibleAfter`,仍测拼句;新增 `applyRectificationChoice` 端到端 | 直喂拦不住把搜索窗口当可信区间 |
| `rectification-choice-card` why_user | 只锁「分成两组」 | 并锁 Vimshottari / Narayana,禁止音译 | P2 |
## 测试
| 命令 | 结果 |
| --- | --- |
| 非 DB `rectification-*` + `consultation-*` + `report-*` + `personal-report-*` + `agent-voice-copy-contract` | **1521 pass / 0 fail**(≥ 1518 |
| `.venv/bin/python -m pytest tests/test_rectification_v5_services.py -k 'not seven_events'` | **31 pass / 0 fail**(含 BUG-570 等分网格与清晨抬高) |
| `test_block_scan_seven_events_finishes_within_fifteen_seconds` 单独跑 | 通过。整文件连跑时偶发 16.0s / 24s / 34.8s,与本次均值公式无关;机器有负载时 15s 预算偏紧 |
| `npx tsc --noEmit` | 0 错 |
| `./node_modules/.bin/eslint --quiet src tests` | 0 error |
排除 `rectification-*-database.test.ts`。ERR-011:验收命令用 `.venv/bin/python -m pytest`。未改 `page.tsx`。未改 `minute_step=1` 指纹。