Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
4.0 KiB
4.0 KiB
#184 验收退回(第 2 次):真实“只缺小运”路径仍是 not_reducible(2026-11-09,Claude)
本文件补充 TASK-rect-layer-alias-20261109.md、FIX-rect-layer-alias-1.md、FIX-rect-layer-alias-2.md,冲突时以本文件为准。验收的是 446420d7。
已核对通过(保留,不要改)
- 引擎行
contributions:七个字段齐全,非空points之和等于score,layer_points与contributions一一对应;只追加字段。 missing_mandatory_layers: [{candidate_time, layer, event_ids}]:排序、[]永不null、旧形状行event_ids: null+event_ids_source;reasons条件正确。top_candidate_count/top_segment_count/unique_time;层名对照只在整件缺失时套用,并记layer_aliases_applied。can_apply/confidence/top_score/winning_segment在既有用例上不变;52 条测试通过。
问题:FIX-2 第 2 条没有生效
FIX-2 第 2 条要求:拆不开的 (e, dasha_varga_core) 对所有候选一起拿掉,再按剩下的共同覆盖比较。现在代码确实把单元拿掉了,但 assess_leader_comparability 之后仍把该候选 missing_layers 里的 Narayana_AD 算作 unexplained,于是直接走 not_reducible 分支;这个分支还不输出 excluded_contributions。
Claude 实测(真实形状行:两个候选都有 e1–e5 的 layer_points 与 contributions,12:01 的 e5 dasha_varga_core 为 decomposable: false、missing_reason: "Narayana_AD_unresolved"、missing_layers: ["Narayana_AD"]):
| 字段 | 现在 | 应该 |
|---|---|---|
coverage_comparison.comparison |
not_reducible |
common_coverage |
unreducible_layers |
["Narayana_AD"] |
不出现 |
excluded_contributions |
不出现 | [{"event_id": "e5", "layer": "dasha_varga_core", "reason": "md_ad_not_decomposable"}] |
comparable_leader |
null |
按剩余共同覆盖算出(可以是 comparable_tied) |
也就是说她要的“真实部分缺失路径给出可比结果,或带理由的明确排除”,现在两样都没有。
要做的
- 在
assess_leader_comparability里:某个差异层L,如果每个带L的候选,其contributions中所有missing_reason == f"{L}_unresolved"的项都已被excluded_contributions覆盖(同一event_id的dasha_varga_core),并且该候选没有别的未解释缺失,则L视为已由排除解释,不进unexplained。没有contributions的旧形状行不适用,仍按原逻辑(旧行仍not_reducible)。 excluded_contributions在not_reducible分支里也要输出(只要非空)。- 测试(写进
tests/test_rectification_layer_alias_bug1827.py,不弱化已有断言;若已有断言“产品 Narayana_AD 仍 not_reducible”与本条冲突,只对带 contributions 的真实形状行改期望,并写三栏注释,原因占星师第七轮 P1:拆不开的 MD/AD 合分对所有候选一致排除后按共同覆盖比较(BUG-1827,FIX-3)):- 上表的真实形状例:
common_coverage、excluded_contributions如上、common_scores不含 e5 的dasha_varga_core; - 同一例里 e5 另有一层也缺失且不可拆分 → 仍
not_reducible,且输出excluded_contributions; - 旧形状行(无
contributions、missing_layers: ["Narayana_AD"]、事件都在)→ 仍not_reducible,不出现excluded_contributions; - 带负分贡献的真实形状例(FIX-1 反例清单):排除后共同覆盖得分按剩余单元计算,负分照计;
can_apply、confidence在上述各例与改前相同(用测试锁住)。
- 上表的真实形状例:
- PROGRESS 补“第 2 次打回”一节;BUG-1827 补一行“验收退回:排除后未按共同覆盖比较”(只改这一条)。
不要碰
前三份任务书的“不要碰”清单继续有效;active_rectification_event_engine.py 本轮不再改。不得自行写“产品决定/裁定”;任务书没写到的取舍一律选需拍板。