From 33202cb3344287f9521e4fccc76e502d97304946 Mon Sep 17 00:00:00 2001 From: Hongming Wang Date: Thu, 16 Apr 2026 04:52:45 -0700 Subject: [PATCH] fix: skip non-dict entries from !include in org validator --- scripts/validate-org-template.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/validate-org-template.py b/scripts/validate-org-template.py index da7cf14..75484a5 100644 --- a/scripts/validate-org-template.py +++ b/scripts/validate-org-template.py @@ -33,6 +33,9 @@ if not org.get("workspaces") and not org.get("defaults"): errors.append("org.yaml must have at least 'workspaces' or 'defaults'") def validate_workspace(ws, path=""): + # !include tags resolve to strings at parse time; skip non-dicts + if not isinstance(ws, dict): + return [] ws_errors = [] name = ws.get("name", "") full = f"{path}/{name}" if path else name @@ -56,6 +59,8 @@ if errors: def count_ws(nodes): c = 0 for n in nodes: + if not isinstance(n, dict): + continue c += 1 c += count_ws(n.get("children", [])) return c