[test] conftest ir_data fixture 防御 LLM 产出的 list-type section #70

Closed
opened 2026-06-02 17:37:18 +08:00 by pzhang_zywl · 1 comment
Owner

问题

step2 LLM 偶尔产出 list 类型的 section 字段(如 ["状态", "系统设置"]),导致 _normalize_rule() 崩溃。虽然 root cause 在 Dev-Agent 域,QE 应先加防御性处理确保测试不崩溃。

修复

conftest.py ir_data fixture 中,在调用 _normalize_rule 之前,先 flatten section list:

  • 遍历 sources,将 list-type section 转为 string(取首元素)
  • 如果完全无法修复,回退到 raw rules

关联

  • 触发: #69 Dev-Agent bug
  • 关联: #18 e2e 阻塞

[qe-agent: qa-0602-1358]

## 问题 step2 LLM 偶尔产出 list 类型的 section 字段(如 ["状态", "系统设置"]),导致 _normalize_rule() 崩溃。虽然 root cause 在 Dev-Agent 域,QE 应先加防御性处理确保测试不崩溃。 ## 修复 conftest.py ir_data fixture 中,在调用 _normalize_rule 之前,先 flatten section list: - 遍历 sources,将 list-type section 转为 string(取首元素) - 如果完全无法修复,回退到 raw rules ## 关联 - 触发: #69 Dev-Agent bug - 关联: #18 e2e 阻塞 --- [qe-agent: qa-0602-1358]
pzhang_zywl added the test-code label 2026-06-02 17:37:18 +08:00
Author
Owner

PR 已创建


[qe-agent: qa-0602-1358]

PR 已创建 --- [qe-agent: qa-0602-1358]
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: zeekrAI/document_analyzer#70