Files
hermes-agent/tests/agent/test_memory_agent_context.py
teknium1 80455093bf test: drop the bundled supermemory provider's tests
The provider's own suite and the supermemory cases in the shared memory
suites (BOM-tolerant config reads, PM SDK admission, multiplex identity
scope, provider threads inheriting the profile, plugin-family secret scope,
cron agent_context) imported plugins.memory.supermemory, which is gone.
The other providers' cases in those suites are unchanged; the SDK-admission
test keeps its mem0 case.
2026-10-02 05:10:06 -07:00

27 lines
1.0 KiB
Python

"""Regression for #80646: the ``agent_context`` handed to memory providers follows the platform
(``cron`` / ``subagent`` skip writes per the ``MemoryProvider.initialize`` contract) instead of a
hardcoded ``"primary"`` that let cron turns land in stores configured to skip them.
"""
from types import SimpleNamespace
import pytest
from agent.agent_init import _GATEWAY_IDENTITY_PARAMS, _memory_provider_init_kwargs
def _fake_agent():
"""The attribute surface ``_memory_provider_init_kwargs`` reads."""
return SimpleNamespace(
session_id="sess-80646", _session_db=None, _emit_warning=None, _emit_status=None,
session_cwd=None, **{f"_{name}": None for name in _GATEWAY_IDENTITY_PARAMS},
)
@pytest.mark.parametrize(
("platform", "expected"),
[("cron", "cron"), ("subagent", "subagent"), ("telegram", "primary"), (None, "primary")],
)
def test_agent_context_follows_the_platform(platform, expected):
assert _memory_provider_init_kwargs(_fake_agent(), platform)["agent_context"] == expected