_is_plugin_enabled() reads config from wrong path (HERMES_HOME mismatch) #2

Closed
opened 2026-06-10 10:28:27 +00:00 by glow · 0 comments
Owner

Problem

_is_plugin_enabled() in __init__.py reads the config file from HERMES_HOME / "config.yaml":

hermes_home = os.environ.get("HERMES_HOME", "~/.hermes")
config_path = Path(hermes_home).expanduser() / "config.yaml"

When the plugin runs inside the gateway process, HERMES_HOME=/root/.hermes, so it reads /root/.hermes/config.yaml. But the agenda: config key (e.g. agenda.state_key: agenda) is only in /root/.hermes/profiles/canal1/config.yaml.

Since the config has no agenda: section at /root/.hermes/config.yaml, the function always falls through to the return True fail-open. This is a silent correctness issue — if someone explicitly disabled the plugin via profile config, it would be ignored.

## Problem `_is_plugin_enabled()` in `__init__.py` reads the config file from `HERMES_HOME / "config.yaml"`: ```python hermes_home = os.environ.get("HERMES_HOME", "~/.hermes") config_path = Path(hermes_home).expanduser() / "config.yaml" ``` When the plugin runs inside the gateway process, `HERMES_HOME=/root/.hermes`, so it reads `/root/.hermes/config.yaml`. But the `agenda:` config key (e.g. `agenda.state_key: agenda`) is only in `/root/.hermes/profiles/canal1/config.yaml`. Since the config has no `agenda:` section at `/root/.hermes/config.yaml`, the function always falls through to the `return True` fail-open. This is a silent correctness issue — if someone explicitly disabled the plugin via profile config, it would be ignored.
glow closed this issue 2026-06-10 10:31:06 +00:00
Sign in to join this conversation.
No labels
bug
feature
improvement
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
glow-all/agenda-plugin#2
No description provided.