mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-10-20 05:15:31 +00:00
The terminal config->env-var bridge was hand-maintained as three parallel dict literals (cli.py env_mappings, gateway/run.py _terminal_env_map, hermes_cli/config.py TERMINAL_CONFIG_ENV_MAP). They drifted: docker_extra_args and modal_mode were in the shared map but missing from BOTH cli.py and gateway — so 'hermes config set terminal.docker_extra_args' bridged via set_config_value but those keys never reached the running process through CLI or gateway startup. Silent config-does-nothing, the exact bug class the drift test guards against. Fix the class by construction: cli.py and gateway/run.py now derive their bridge from TERMINAL_CONFIG_ENV_MAP (the single source of truth) instead of duplicating it. cli keeps two documented deltas (legacy env_type alias for backend; sudo_password credential); gateway maps 1:1. The drift test (tests/tools/test_terminal_config_env_sync.py) is rewritten off fragile AST source-parsing — which broke when set_config_value was refactored to drop its inline _config_to_env_sync literal (8 failures) — onto live imported state: assert the shared map covers critical keys, every mapped TERMINAL_* var is consumed by terminal_tool, and all three paths derive from the shared map. Refactor-proof. E2E: with the shared-map derivation, 'terminal.docker_extra_args' and 'terminal.modal_mode' now bridge through load_cli_config() (verified they did NOT before). |
||
|---|---|---|
| .. | ||
| assets | ||
| builtin_hooks | ||
| platforms | ||
| __init__.py | ||
| authz_mixin.py | ||
| channel_directory.py | ||
| config.py | ||
| delivery.py | ||
| display_config.py | ||
| hooks.py | ||
| kanban_watchers.py | ||
| memory_monitor.py | ||
| mirror.py | ||
| pairing.py | ||
| platform_registry.py | ||
| restart.py | ||
| run.py | ||
| runtime_footer.py | ||
| session.py | ||
| session_context.py | ||
| shutdown_forensics.py | ||
| slash_access.py | ||
| slash_commands.py | ||
| status.py | ||
| sticker_cache.py | ||
| stream_consumer.py | ||
| stream_dispatch.py | ||
| stream_events.py | ||
| whatsapp_identity.py | ||