feat: post-turn state-update pass per present entity

This commit is contained in:
Joseph Doherty
2026-04-26 13:17:07 -04:00
parent 9b45710cb1
commit e8d24a0875
5 changed files with 523 additions and 6 deletions
+15 -1
View File
@@ -36,11 +36,25 @@ def client(tmp_path, monkeypatch):
{"segments": [{"kind": "dialogue", "text": "hello"}]}
)
canned_response = "Hi there."
# Two state-update classifier calls fire after the assistant_turn
# (one per directed edge: bot->you, you->bot). We feed them benign
# zero-delta JSON so the existing assertions about ``user_turn`` /
# ``assistant_turn`` are unaffected.
canned_state_update = json.dumps(
{"affinity_delta": 0, "trust_delta": 0, "knowledge_facts": []}
)
# Import here so env vars are visible to the dependency lookup.
from chat.web.kickoff import get_llm_client
mock = MockLLMClient(canned=[canned_parse, canned_response])
mock = MockLLMClient(
canned=[
canned_parse,
canned_response,
canned_state_update,
canned_state_update,
]
)
app.dependency_overrides[get_llm_client] = lambda: mock
with TestClient(app) as c: