From 9e5dbe794d73291d43d4e9361ba87c85734dbc73 Mon Sep 17 00:00:00 2001 From: NehaGitHubAcc Date: Tue, 5 May 2026 16:05:16 +0530 Subject: [PATCH] fix: implement semantic string-to-bool normalization in cli.py (#1466) --- skills/azure-architecture-autopilot/scripts/cli.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/skills/azure-architecture-autopilot/scripts/cli.py b/skills/azure-architecture-autopilot/scripts/cli.py index 982f2d7f9..bf3fc8c08 100644 --- a/skills/azure-architecture-autopilot/scripts/cli.py +++ b/skills/azure-architecture-autopilot/scripts/cli.py @@ -137,7 +137,15 @@ def _normalize_services(services): if isinstance(svc.get("details"), str): svc["details"] = [svc["details"]] if isinstance(svc.get("private"), str): - svc["private"] = bool(svc["private"]) + val = svc["private"].lower() + if val in ("true", "1", "yes", "on"): + svc["private"] = True + elif val in ("false", "0", "no", "off"): + svc["private"] = False + else: + # Log warning for invalid values + print(f"WARNING: Invalid boolean value '{svc['private']}' for 'private' field. Defaulting to False.", file=sys.stderr) + svc["private"] = False return services