fix(memory): retry failed config schema loads instead of caching None

A syntax error in a provider's config_schema.py was cached as 'no schema'
until process restart, rendering a silent empty panel even after the file
was fixed. Cache only successful loads and genuine file-absence.
This commit is contained in:
Erosika 2026-07-02 18:42:31 -04:00
parent 0e09cc5cd4
commit 41e59f6126
2 changed files with 30 additions and 0 deletions

View file

@ -132,7 +132,10 @@ def get_provider_config_schema(name: str) -> ProviderConfigSchema | None:
spec.loader.exec_module(module)
schema = getattr(module, "CONFIG_SCHEMA", None)
except Exception:
# A broken schema file must not cache: it would render as a silent
# empty panel until process restart even after the file is fixed.
_log.exception("failed to load config schema for memory provider %r", name)
return None
_SCHEMA_CACHE[name] = schema
return schema