Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(config): reject explicit null memory block

Max0c0147fac708
diff --git a/config/v2_config.py b/config/v2_config.py
index a71c9c8aa..f2a558d11 100644
--- a/config/v2_config.py
+++ b/config/v2_config.py
@@ -1344,9 +1344,10 @@ class V2Config:
avault=avault,
)
- memory_payload = payload.get("memory")
- if memory_payload is None:
- memory_payload = {}
+ # Default only when the block is absent. An explicitly supplied
+ # ``"memory": null`` is a malformed config file, not an omission, and
+ # must not silently start with a disabled default Memory config.
+ memory_payload = payload.get("memory", {})
if not isinstance(memory_payload, dict):
raise ValueError("Config 'memory' must be an object")
memory_processing_payload = memory_payload.get("processing")
diff --git a/tests/test_memory_config.py b/tests/test_memory_config.py
index 64f0ec799..d85f1de52 100644
--- a/tests/test_memory_config.py
+++ b/tests/test_memory_config.py
@@ -167,6 +167,20 @@ def test_memory_config_rejects_invalid_diagnostics(diagnostics: object) -> None:
)
+def test_memory_config_defaults_when_block_is_absent() -> None:
+ payload = _payload({})
+ payload.pop("memory")
+
+ config = V2Config.from_payload(payload)
+
+ assert config.memory == MemoryConfig()
+
+
+def test_memory_config_rejects_explicit_null_block() -> None:
+ with pytest.raises(ValueError, match="Config 'memory' must be an object"):
+ V2Config.from_payload(_payload(None)) # type: ignore[arg-type]
+
+
def test_generic_config_save_preserves_memory_keys(monkeypatch, tmp_path) -> None:
monkeypatch.setenv("AVIBE_HOME", str(tmp_path))
original = V2Config.from_payload(