fix(report): bind v2 chart cap to CHART_IDS.length

Five-theme personal_full assembled nine charts after health vargas landed, but the document schema still capped at six. Bind the count to the enum, align JSON/Python contracts, and log final-parse paths without values.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-09-04 21:33:27 +08:00
parent d2955c6280
commit 6119469069
13 changed files with 279 additions and 21 deletions
+8 -2
View File
@@ -43,7 +43,7 @@ TECHNIQUE_STATUSES = ("verified", "partial", "blocked")
CONFLICT_STATUSES = ("unresolved", "partial", "resolved")
REPORT_ACTION_PRIORITIES = ("now", "next", "watch")
V1_CHART_IDS = ("D1", "D9", "D10")
CHART_IDS = ("D1", "D2", "D9", "D10", "D11", "D24")
CHART_IDS = ("D1", "D2", "D6", "D8", "D9", "D10", "D11", "D24", "D30")
HOUSE_NUMBERS = tuple(range(1, 13))
FAILURE_CODES = (
@@ -797,7 +797,13 @@ def validate_report_document(document: Any) -> ValidationResult:
_validate_current_phase(result, document.get("currentPhase"))
_validate_action_notes(result, document.get("actionNotes"))
charts = _check_array(result, "charts", document.get("charts"), 3 if version == V1_SCHEMA_VERSION else 6, 1)
charts = _check_array(
result,
"charts",
document.get("charts"),
3 if version == V1_SCHEMA_VERSION else len(CHART_IDS),
1,
)
if charts is not None:
for index, chart in enumerate(charts):
_validate_chart(result, f"charts[{index}]", chart, version)