fix(report): period connections use route, not path, in the reading facts (BUG-2126 follow-up)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
This commit is contained in:
2026-11-21 19:20:27 +08:00
co-authored by Claude Opus 5.5
parent 450150c975
commit d151b02cb0
5 changed files with 8 additions and 5 deletions
+4 -2
View File
@@ -1310,8 +1310,10 @@ def _period_connections(working: dict) -> dict[str, Any] | None:
levels = hit_lords.setdefault(hit["lord"], [])
levels.extend(level for level in hit.get("levels") or [] if level not in levels)
matched.append({
"path": name,
"path_zh": _CONNECTION_PATH_ZH.get(name, name),
# BUG-2126 follow-up: "route", not "path" — the facts never carry a "path" key
# (test_reading_facts_are_packet_leaves keeps internal leaf paths out of the model input).
"route": name,
"route_zh": _CONNECTION_PATH_ZH.get(name, name),
"lords": [{"lord": lord, "levels": levels} for lord, levels in hit_lords.items()],
"text_zh": path_cell(path, "zh"),
})