fix: update mock agent signature to accept task_id after PR #419

The _Codex401ThenSuccessAgent mock overrides run_conversation() but was
missing the task_id parameter, causing a TypeError in the gateway test.
This commit is contained in:
teknium1 2026-03-05 01:41:50 -08:00
parent 50ea8adf46
commit 11a7c6b112

View file

@ -80,7 +80,7 @@ class _Codex401ThenSuccessAgent(run_agent.AIAgent):
type(self).refresh_attempts += 1
return True
def run_conversation(self, user_message: str, conversation_history=None):
def run_conversation(self, user_message: str, conversation_history=None, task_id=None):
calls = {"api": 0}
def _fake_api_call(api_kwargs):
@ -90,7 +90,7 @@ class _Codex401ThenSuccessAgent(run_agent.AIAgent):
return _codex_message_response("Recovered via refresh")
self._interruptible_api_call = _fake_api_call
return super().run_conversation(user_message, conversation_history=conversation_history)
return super().run_conversation(user_message, conversation_history=conversation_history, task_id=task_id)
def test_cron_run_job_codex_path_handles_internal_401_refresh(monkeypatch):