GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||
GeezerVison is showing github.com — fix(config): null web/backend and known_plugin_toolsets values no longer crash (#61142, #53196 salvage) by teknium1 · Pull Request #61835 · NousResearch/hermes-agent Conversation
Collaborator
SummaryFinal two live members of the YAML-null config bug class: a null Salvages @HumphreySun98's #61142 and @17324393074's #53196 (authorship preserved), with one sibling-site follow-up. Changes
Validation
Both premises reproduced live on current main before salvage. Infographic
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
`_load_web_config()` is typed `-> dict` but returned `load_config().get("web",
{})`, which is `None` when the config has a present-but-null `web:` section
(YAML `web:` with no body). Every caller then does
`_load_web_config().get(...)` and raises `AttributeError: 'NoneType' object
has no attribute 'get'` — this hits `_get_backend`, `check_web_api_key`, and
the extract-char-limit reader.
Separately, `check_web_api_key()` read the backend as
`.get("backend", "").lower()`; a null `web.backend` value yields `None` (the
`""` default only applies when the key is absent), so `None.lower()` raised.
`check_web_api_key` is the `check_fn` gate for `web_search`/`web_extract`, so
this surfaced as an exception during tool-availability checking.
- Make `_load_web_config()` honor its `-> dict` contract (`... or {}`), fixing
the null-`web:`-section crash at every call site.
- Guard the backend value in `check_web_api_key` with `or ""`, mirroring the
existing guard in `_get_backend`.
Adds regression tests for both the null-backend-value and null-web-section
cases.
When config.yaml has known_plugin_toolsets set to null (or any value mapped to None by the YAML loader), config.get returns None (dict.get only falls back to the default when the key is absent, not when its value is None). The subsequent set(known_map.get(platform, [])) then crashes with TypeError: NoneType object is not iterable and the gateway fails to start, even though no plugin toolsets are configured. Add or-empty-dict and or-empty-list guards so a null/None value is treated as empty instead of crashing the platform-tools resolver. Sibling of the salvaged #53196 read-path fix: setdefault() does not replace a present-but-null key, so saving platform tools with known_plugin_toolsets: null in config.yaml crashed on indexing None.
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page.
This was referenced
|
There was an error while loading. Please reload this page.
|
Thanks for salvaging and merging this, @teknium1 — glad the null web/backend config fix landed. Happy to follow up on the tools_config sibling paths if useful. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.