fix: step3 _normalize_rule 将 table source 的 null row 转为 0 - Closes #73
CI / test (pull_request) Successful in 8s

LLM 输出 table source 时 row 字段可能为 null,导致 Layer A schema 失败。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-02 18:05:28 +08:00
parent 6b1424b1c4
commit 93bbfe6029
2 changed files with 18 additions and 1 deletions
@@ -206,7 +206,12 @@ def _normalize_rule(rule: dict) -> dict:
if stype and stype not in valid_types:
src["type"] = "text"
stype = "text"
if stype in ("table", "text"):
if stype == "table":
if not src.get("section"):
src["section"] = default_section
if src.get("row") is None:
src["row"] = 0
elif stype == "text":
if not src.get("section"):
src["section"] = default_section
else: