fix: route None/degraded diagnoses to lapse; abort on high degrade rate

This commit is contained in:
2026-07-16 06:24:11 -04:00
parent 65126feada
commit efbdeb1647
4 changed files with 91 additions and 4 deletions
+7 -4
View File
@@ -1489,12 +1489,15 @@ def _build_skill_case_packs(
if qm.correct:
continue
attr = attribution_map.get(qm.question_id)
if attr is not None and attr.cause_category == "lapse":
if attr.lapse_note and attr.lapse_note.strip():
# 仅明确 defect 且非 degraded 才进正文进化路径;
# lapse / cause_category=None(判别失败)/ degradedjudge 解析失败)一律保守走 lapse,
# 不以降级或未判定信号驱动错误进化。
is_defect = attr is not None and attr.cause_category == "defect" and not qm.degraded
if not is_defect:
if attr is not None and attr.lapse_note and attr.lapse_note.strip():
lapse_notes.append(attr.lapse_note)
continue
et = attr.error_type if attr else "mixed"
wrong_by_error[et].append(qm)
wrong_by_error[attr.error_type].append(qm)
# 单条 fallback
n_body_failures = sum(len(group) for group in wrong_by_error.values())