Files
Jyotisha/docs/tasks/TASK-rectification-yearless-probe-downgrade-20260909.md
T

72 lines
7.3 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.
# TASK · 无年月的性格题降级为平局裁决:带年月题问完且候选仍分不开时才问,分值减半,永不参与淘汰,报告标「参考」;并加一条离线测量(2026-09-09)
- 基线:`origin/staging` @ `4eea9c10`
- 分支:`codex/rectification-yearless-probe-downgrade-20260909`,基于 `origin/staging`;与 BUG-626~628 无文件重叠(本单不碰 `holdoutFollowupFor` / 别名归并)
- 执行方:coding agent;验收:Claude
- 涉及文件:`frontend/src/lib/rectification-agentic/core/types.ts``SCORE_DELTA``STRONG_CONFLICT_ELIMINATION_COUNT` 不改,新增 `PROBE_WEIGHT`)、`core/apply-probe-outcome.ts`L70 `varga_style` 识别、`directionFor`)、`core/build-state.ts`(淘汰计数)、`v9/method-followup.ts`(L1142 的 ×0.8、无年份题在计划里的位置)、`v9/decision-from-dossier.ts``nakshatraProbeIfFollowupCanAsk``discriminatorProbeIfFollowupCanAsk`)、`v9/skill-verification-report.ts`(技法审计表)、`v9/divergence-panel.ts`(三列卡不动)、`scripts/rectification/varga_style_calibration_report.py`(新,离线测量)、`skills/jyotish-birth-time-rectification/SKILL.md` §5(一句口径)
- BUG 编号起点:**BUG-629**`docs/BUG_HISTORY.md` 当前最大 BUG-628
- 优先级:**P1**(产品 2026-09-09 拍板:无年月性格题的分辨力从未验证,不能与带年月题同权,也不能单独淘汰分钟)
## 1. 现状
| 题型 | 来源 | 现在的地位 |
| --- | --- | --- |
| 婚恋风格(D9 上升星座 → 相处方式三选一) | `varga_style`,需有带年月感情事件锚点(BUG-559),排序分 ×0.8 | 与带年月题同样 ±2,冲突计入淘汰(3 次淘汰) |
| 做事风格(D10) | 同上,需事业事件锚点 | 同上 |
| 月宿边界两组性格 | `nakshatra_boundary` | 同上(只偏置窗口,但分值机制相同) |
| 其他分盘的无年份对照(D24/D12/D11/D7/D2/D4/D5 | `yearless_ungrounded_contrast` | 已丢弃,不问 |
分盘星座是确定计算;"星座 ↔ 性格"与"用户自评 ↔ 类型"两层从未在任何数据上验证。20 例公开集只测带年月事件的打分。真实用户案例里头两道题就是性格题,参与了把真实分钟排除的过程。
## 2. 决策记录(产品同意 2026-09-09
1. **只做平局裁决。** 计划层:`varga_style``nakshatra_boundary` 题只在「可问的带年月区分题(`dasha_boundary / dasha_activation / known_event_quality`)为空」**且**「active 候选 ≥ 2 且未分开」时才成为 `next_followup`;否则记 `dropped_probes(reason="yearless_deferred")`。锚点要求(BUG-559)保留。
2. **分值减半,不淘汰。** 新增 `PROBE_WEIGHT: { dated: 1, yearless: 0.5 }``applyProbeOutcome``varga_style` / `nakshatra_boundary` 的 delta 乘 0.5(±1),且**不递增 `strong_conflict_count`**`STRONG_CONFLICT_ELIMINATION_COUNT = 3` 不变,只有带年月题的 conflict 计数)。`rounds.kind` 对这类题记 `tie_break`
3. **报告与旁白标「参考」。** 技法审计表里 `D9 / D10 类型对照``月宿边界` 的 status 写 `reference`,note"性格自评,只作排序参考,不参与淘汰";点选后旁白维持"已记录,范围…"。Skill §5 加一句:"性格类点选题只在带年月题问完仍分不开时出现,分值减半、不淘汰。"(bump 10.0.21,一句)。
4. **三列对比卡的性格描述不动**:那是"若是这一分钟你会怎样"的展示,不是证据;边界句已在。
5. **离线测量。** 新脚本 `scripts/rectification/varga_style_calibration_report.py`:输入一份由管理员从数据库导出的匿名 JSON(字段:`case_id` 哈希、`birth_time_source`、记录分钟、每道 `varga_style` / `nakshatra` 答案的 `answer_class` 与该题各选项对应星座),只对 `birth_time_source = hospital_record``uncertainty ≤ 2 分钟` 的 Case,计算"用户所选选项的星座 == 记录分钟的分盘星座"的命中率,按 D9 / D10 / 月宿分组,输出 n 与命中率,**不输出任何单人行**。导出 SQL 写在 `docs/operations/varga-style-calibration-export.md`,由产品负责人在有数据库权限的环境跑。命中率 ≈ 1/3(三选一)即随机,届时按产品决定删题。
6. 不动 `SCORE_DELTA` 数值、四选项合同(BUG-390)、采用/确认门、`MIN_SEPARATION_LEAD``_relative_support`
## 3. 任务分解
- 3.1 决策 1:计划层排序与守卫;用例——存在可问的 2023.05 事业题时 D9 题不出;带年月题问完、剩 2 候选 → D9 题出;剩 1 候选 → 不出且 `yearless_deferred` 记录。
- 3.2 决策 2:核心层权重;用例——D9 答 B:命中候选 +1、冲突候选 −1、`strong_conflict_count` 不变;三道性格题全冲突也不淘汰;带年月题行为与今天逐字节相同(`rectification-probe-replay-loss-20260908.test.ts` 不改断言)。三栏:原值"±2、计淘汰"→ 新值"±1、不计"→ 决策 2。
- 3.3 决策 3:报告行 + Skill 10.0.21(快照、registry、`skill-registry.test.ts`)。
- 3.4 决策 5:脚本 + 单元测试(合成 JSON:命中率 0.33 与 0.9 两组)+ 导出 SQL 文档。
- 3.5 记录:BUG-629(关联 BUG-559 锚点、BUG-560 校准、BUG-623 真实用户案例);`CHANGELOG.md``PROGRESS-…``docs/testing/rectification-scenarios-20260907.md` 加"性格题只在带年月题问完后出现;报告里标参考"。
## 4. 让步顺序
3.2 最先(一处改动即止损);3.1 必做;3.3 必做;3.4 可后置为 P2 但导出 SQL 文档不可省;3.5 不可省。
## 5. 开工前置命令
```bash
git fetch origin --prune
git worktree add -b codex/rectification-yearless-probe-downgrade-20260909 .worktrees/rectification-yearless-probe-downgrade-20260909 origin/staging
cd .worktrees/rectification-yearless-probe-downgrade-20260909
ln -s /workspace/Jyotisha/frontend/node_modules frontend/node_modules
ln -s /workspace/Jyotisha/.venv .venv
cd frontend && ./node_modules/.bin/tsc --noEmit; npm run lint 2>&1 | tail -1
ls tests/rectification-*.test.ts tests/skill-registry.test.ts | grep -v database | xargs npx tsx --test 2>&1 | grep -E "^# (tests|pass|fail)"
```
## 验收(Claude2026-09-09`origin/staging` @ `fef54b6e`staging 已部署同 SHA
| 门 | 结果 |
| --- | --- |
| tsc | 0 错 |
| lint | 0 error / 108 warning |
| 前端 rectification + consultation + session + home-bootstrap + public-thinking + voice + skill-registry(非 DB | 1400 / 0 |
| Python v5_services + event_probes + growth contract | 76 passed |
| 项 | 结论 |
| --- | --- |
| 3.2 权重 | 通过。`PROBE_WEIGHT.yearless = 0.5`,性格题不递增 `strong_conflict_count``kind = tie_break``asInferenceState` 接受 `tie_break`DB 触发器对非 informative/low_information 的 kind 不写 `round_kind`,不撞 CHECK(已核 `20260826010000` L60 |
| 3.1 计划层 | 通过。带年月题可问时 `yearless_deferred`;≥2 候选未分开才问;锚点保留 |
| 3.3 报告 / Skill 10.0.21 | 通过。审计表 `reference` 行;快照与 registry 一致 |
| 3.4 离线测量 | 通过。脚本 + 单测 + 导出 SQL 文档;命中率数字待你在有库环境跑 |
| 带年月题不变 | 通过。`rectification-probe-replay-loss-20260908.test.ts` 未改断言 |
结论:通过(实现 `fef54b6e`)。