refactor(a2a): tools._load_config reads config through load_config_readonly

The 6-line try/except copy of "load_config() or {}" (also in doctor_live and
kanban_decompose, hermes_cli lane) took a full deepcopy per tool call for a
dict that is only read. load_config_readonly already degrades to the
last-known-good / defaults on a broken file, so the outer except was
defense-in-depth around a path that does not raise. Behavior change: none.
Tests already patch tools._load_config by name and continue to pass.
This commit is contained in:
teknium1
2026-09-12 20:33:32 -07:00
committed by Teknium
parent e7d9e07dbc
commit 3bee76a272
+3 -5
View File
@@ -24,11 +24,9 @@ _ORCHESTRATE_MAX_WORKERS = 6 # max parallel peers for fan-out
def _load_config() -> dict:
try:
from hermes_cli.config import load_config
return load_config() or {}
except Exception:
return {}
"""Read-only view of config.yaml; peers are only read, never mutated (cache-safe)."""
from hermes_cli.config import load_config_readonly
return load_config_readonly() or {}
def _configured_peers() -> dict: