mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-28 23:52:09 -04:00
CI test fixes for dev sync
This commit is contained in:
@@ -29,24 +29,24 @@ class _FakeMM:
|
||||
|
||||
def test_omitted_memory_survives_only_explicit_drop(monkeypatch):
|
||||
import src.memory
|
||||
import src.endpoint_resolver
|
||||
import src.llm_core
|
||||
import src.task_endpoint
|
||||
|
||||
_FakeMM.saved = None
|
||||
monkeypatch.setattr(src.memory, "MemoryManager", _FakeMM)
|
||||
monkeypatch.setattr(
|
||||
src.endpoint_resolver, "resolve_endpoint",
|
||||
lambda kind, owner=None: ("http://x/v1", "model", {}),
|
||||
src.task_endpoint, "resolve_task_candidates",
|
||||
lambda owner=None: [("http://x/v1", "model", {})],
|
||||
)
|
||||
|
||||
async def fake_llm(**kwargs):
|
||||
async def fake_llm(_candidates, **kwargs):
|
||||
# Model keeps 'a', drops 'b', and OMITS 'c' entirely.
|
||||
return json.dumps({
|
||||
"keep": [{"id": "a", "text": "Likes dark roast coffee", "category": "preference"}],
|
||||
"drop": [{"id": "b", "reason": "duplicate of a"}],
|
||||
})
|
||||
|
||||
monkeypatch.setattr(src.llm_core, "llm_call_async", fake_llm)
|
||||
monkeypatch.setattr(src.llm_core, "llm_call_async_with_fallback", fake_llm)
|
||||
|
||||
msg, ok = asyncio.run(ba.action_consolidate_memory("alice"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user