[product] _normalize_rule 增加 screen_type 默认值防御 + step2 test 降级 warn #86
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
test_step2_precondition_fields断言失败:4 个 FU-ENS-019-DOMESTIC 规则的 precondition 缺少 screen_type 字段。LLM 不总是生成 screen_type,导致 step2 输出不完整。根因
step2 LLM prompt 未强制要求生成 screen_type,LLM 输出不稳定。当前
_normalize_rule(step3)防御层未覆盖 precondition 字段缺失。修复
_normalize_rule: 当 precondition.screen_type 缺失时默认 "any"(遵循现有防御层模式)test_step2_precondition_fields: 降级为 warn(类似 test_step2_sources_have_refs),因为取决于 LLM 输出质量修复类型
[da-0603-1426]
问题
_step2_precondition_fields 断言失败:4 个规则缺少 screen_type,LLM 输出不稳定。
根因
LLM 不总是生成 precondition.screen_type。_normalize_rule 防御层(step3)未覆盖 precondition 字段缺失。
修复
_normalize_rule 新增 precondition 防御:screen_type 缺失→'any',geo 缺失→'global',precondition=None→{}。step2 测试降级为 warn。
验证
[da-0603-1426]