Skip to content

The agent that grows with you

test: fixtures follow the round-3 contracts (adopt_agent on the stub authority; chat -q reads its settled receipt)

Tekniumc0ee02a5a22c
diff --git a/tests/agent/test_kanban_turn_recovery.py b/tests/agent/test_kanban_turn_recovery.py
index 31fc9cc20ff..06ee9e5dcf2 100644
--- a/tests/agent/test_kanban_turn_recovery.py
+++ b/tests/agent/test_kanban_turn_recovery.py
@@ -644,7 +644,8 @@ async def test_non_worker_one_shot_prints_its_exit_summary(capsys):
view = GatewayChatView(_Owner(), {"stored_session_id": "stored"}, quiet=True)
assert await asyncio.wait_for(view.run("hello", oneshot=True), 2) == 1
out, err = capsys.readouterr()
- assert submitted == ["prompt.submit"]
+ # One admission, never a resubmit; the settled-result read (prompt.receipt) is read-only.
+ assert submitted.count("prompt.submit") == 1 and set(submitted) <= {"prompt.submit", "prompt.receipt"}
assert "API call failed" in out and "session_id: stored" in err
diff --git a/tests/gateway/test_managed_turn_shutdown_drain.py b/tests/gateway/test_managed_turn_shutdown_drain.py
index 5ddc38db6b4..c3d6f017de9 100644
--- a/tests/gateway/test_managed_turn_shutdown_drain.py
+++ b/tests/gateway/test_managed_turn_shutdown_drain.py
@@ -51,7 +51,8 @@ def test_settlement_stops_a_silent_managed_worker_instead_of_waiting_unbounded(m
ref = SessionRef('profile', 's')
live = SimpleNamespace(task=None)
authority = SimpleNamespace(profile_id='profile', pending_results={}, waiters={}, sessions={'s': live},
- check_approval_generation=lambda *a: None)
+ check_approval_generation=lambda *a: None,
+ adopt_agent=lambda session_id, generation, worker: None)
runner = SimpleNamespace(session_authority=authority)
row = {'admission_id': 'adm', 'principal_id': 'owner', 'generation': 3, 'payload': {'text': 'go'}}