fix: coerce show_reasoning and guard_agent_created config bools

Widens #16528 to two sibling sites that had the same quoted-boolean
bug: a YAML string "false" (or "0", "no", "off") silently evaluated
truthy under bool() / if-check.

- gateway/run.py _load_show_reasoning: is_truthy_value wrap
- tools/skill_manager_tool.py _guard_agent_created_enabled: is_truthy_value wrap
- regression tests for both
This commit is contained in:
Teknium 2026-04-30 20:39:29 -07:00
parent bb706c3f38
commit 27ec74c68a
4 changed files with 70 additions and 3 deletions

View file

@ -1742,7 +1742,10 @@ class GatewayRunner:
if cfg_path.exists():
with open(cfg_path, encoding="utf-8") as _f:
cfg = _y.safe_load(_f) or {}
return bool(cfg_get(cfg, "display", "show_reasoning", default=False))
return is_truthy_value(
cfg_get(cfg, "display", "show_reasoning"),
default=False,
)
except Exception:
pass
return False