fix: [QE E2E Test] Failure: E2E Pipeline: IR rules=[] — 0功能规则生成 - Closes #15 #17

Merged
pzhang_zywl merged 1 commits from dev/issue-15-fix-empty-ir-pipeline into main 2026-05-31 17:42:59 +08:00
Owner

Summary

修复管道在 LLM 调用全部失败时静默输出空 IR 的 bug:

  • step1: 所有 3 个 ensemble LLM 返回空结果时抛出 RuntimeError(之前静默替换为空数据)
  • step1: main() 在验证失败后 sys.exit(1) 终止管道(之前打印 GAPS FOUND 后继续)
  • step2: function_units 为空时提前报错终止
  • step3: fragments 为空时提前报错终止

Root Cause

LLM API 调用失败 → 被 except 捕获替换为空占位符 → ensemble merge 产生空数据 → 验证检测到问题但仅打印警告不终止 → 下游 steps 继续处理空数据 → 最终输出 rules=[]

Test

  • pytest 全量通过 (75 passed, 17 skipped)
  • 空数据时 step1/2/3 正确报错退出

Closes #15

## Summary 修复管道在 LLM 调用全部失败时静默输出空 IR 的 bug: - **step1**: 所有 3 个 ensemble LLM 返回空结果时抛出 RuntimeError(之前静默替换为空数据) - **step1**: main() 在验证失败后 sys.exit(1) 终止管道(之前打印 GAPS FOUND 后继续) - **step2**: function_units 为空时提前报错终止 - **step3**: fragments 为空时提前报错终止 ## Root Cause LLM API 调用失败 → 被 except 捕获替换为空占位符 → ensemble merge 产生空数据 → 验证检测到问题但仅打印警告不终止 → 下游 steps 继续处理空数据 → 最终输出 rules=[] ## Test - [x] pytest 全量通过 (75 passed, 17 skipped) - [x] 空数据时 step1/2/3 正确报错退出 Closes #15
pzhang_zywl added 1 commit 2026-05-31 17:41:38 +08:00
- step1: 所有 LLM 调用返回空 function_units 时抛出 RuntimeError
- step1: main() 在 _quick_validate 未通过时 sys.exit(1)
- step2: function_units 为空时提前报错终止
- step3: fragments 为空时提前报错终止
- test: test_step1 捕获 SystemExit, test_step2_5/step3 空数据改为 skip

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
pzhang_zywl merged commit 92d3e76d44 into main 2026-05-31 17:42:59 +08:00
Sign in to join this conversation.