fix: [bug] IR 覆盖率回归:Layer B 从 92.6% 降至 63% + Layer A 新 schema 错误 - 来自 #18 - Closes #57 #59

Merged
pzhang_zywl merged 1 commits from dev/issue-57-fix-coverage-regression into main 2026-06-02 16:17:55 +08:00
Owner

Summary

  • step3 _normalize_rule: 非法 source type(如 function_unit_description)→ text
  • step1 重试质量门控: 仅纳入实际降低 coverage_warnings/missing_rows 的 retry 结果
    • 避免低质量 LLM 输出稀释 ensemble 导致覆盖率回归 (92.6%→63%)
  • 新增 UT: test_normalize_source_invalid_type

Root Cause

  1. LLM 在 step2 中 hallucinate 了 function_unit_description 等非法 source type,导致 Layer A schema 失败
  2. step1 无条件纳入所有 retry 结果,低质量输出稀释 ensemble,可能引发覆盖率回归

Test

  • pytest: 108 passed, 15 skipped

Closes #57


[da-0602-1321]

## Summary - **step3 `_normalize_rule`**: 非法 source type(如 `function_unit_description`)→ `text` - **step1 重试质量门控**: 仅纳入实际降低 coverage_warnings/missing_rows 的 retry 结果 - 避免低质量 LLM 输出稀释 ensemble 导致覆盖率回归 (92.6%→63%) - 新增 UT: `test_normalize_source_invalid_type` ## Root Cause 1. LLM 在 step2 中 hallucinate 了 `function_unit_description` 等非法 source type,导致 Layer A schema 失败 2. step1 无条件纳入所有 retry 结果,低质量输出稀释 ensemble,可能引发覆盖率回归 ## Test - [x] pytest: 108 passed, 15 skipped Closes #57 --- [da-0602-1321]
pzhang_zywl added 1 commit 2026-06-02 16:17:06 +08:00
- step3 _normalize_rule: 将 function_unit_description 等非法 source type 标准化为 text
- step1 覆盖反馈重试: 仅纳入实际提升覆盖率的 retry 结果,避免低质量输出稀释 ensemble
- 新增 UT: test_normalize_source_invalid_type

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
pzhang_zywl merged commit 9f0872c36a into main 2026-06-02 16:17:55 +08:00
Sign in to join this conversation.