hermes - 💡(How to fix) Fix [Bug] platforms.<name>.enabled: "false" (quoted) doesn't disable platform [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

config.yaml: platforms: api_server: enabled: "false"

assert config.platforms[Platform.API_SERVER].enabled is False E AssertionError: assert True is False E + where True = PlatformConfig(enabled=True, ...).enabled

Root Cause

Likely root cause

Fix Action

Fixed

Code Example

config.yaml:
  platforms:
    api_server:
      enabled: "false"

assert config.platforms[Platform.API_SERVER].enabled is False
E   AssertionError: assert True is False
E    +  where True = PlatformConfig(enabled=True, ...).enabled

---

if enabled_was_explicit:
    plat_data["enabled"] = platform_cfg["enabled"]

---

plat_data["enabled"] = _coerce_bool(platform_cfg["enabled"], False)
RAW_BUFFERClick to expand / collapse

Symptom

Quoting enabled: "false" (YAML string) under any platforms.<name> entry in config.yaml leaves the platform enabled instead of disabling it. Bare enabled: false (YAML bool) works correctly.

Reproduction

tests/gateway/test_config.py::TestLoadGatewayConfig::test_bridges_quoted_false_platform_enabled_from_config_yaml fails on the current main branch:

config.yaml:
  platforms:
    api_server:
      enabled: "false"

assert config.platforms[Platform.API_SERVER].enabled is False
E   AssertionError: assert True is False
E    +  where True = PlatformConfig(enabled=True, ...).enabled

Likely root cause

gateway/config.py:857 does a raw passthrough:

if enabled_was_explicit:
    plat_data["enabled"] = platform_cfg["enabled"]

Whatever YAML loads — "false" (str), False (bool), or 0 (int) — is forwarded unchanged. Downstream, the non-empty string "false" is truthy, so the platform stays enabled.

Other call sites that build enabled (e.g. lines 326, 388) correctly route through _coerce_bool(). This passthrough path doesn't.

Suggested fix

Apply _coerce_bool() at line 857 (or in PlatformConfig.__post_init__ for defence in depth):

plat_data["enabled"] = _coerce_bool(platform_cfg["enabled"], False)

Impact

P2 — silent footgun for anyone editing config.yaml by hand and quoting booleans (e.g., users coming from Docker/K8s envs where everything is a string). Disabled-on-paper platforms silently start receiving traffic.

Environment

  • Discovered against current ~/.hermes/hermes-agent checkout, Python 3.11.15
  • Pytest 23076 tests passed / 2 failed / 59 skipped — this is one of the two failures

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix [Bug] platforms.<name>.enabled: "false" (quoted) doesn't disable platform [1 pull requests]