fix(tests): accept name= kwarg in _ImmediateThread mocks

_persist_session_git_meta passes name="git-meta" to threading.Thread.
The test mocks for _ImmediateThread/_FakeThread didn't accept **kw, so
the new turn-complete and session-resume call sites broke 10 tests.
Add **kw to all 10 mock __init__ signatures.
This commit is contained in:
ethernet 2026-07-15 21:59:57 -04:00
parent db5cbff884
commit 7713482102

View file

@ -4211,7 +4211,7 @@ def test_prompt_submit_sets_approval_session_key(monkeypatch):
}
class _ImmediateThread:
def __init__(self, target=None, daemon=None):
def __init__(self, target=None, daemon=None, **kw):
self._target = target
def start(self):
@ -4253,7 +4253,7 @@ def test_prompt_submit_expands_context_refs(monkeypatch):
}
class _ImmediateThread:
def __init__(self, target=None, daemon=None):
def __init__(self, target=None, daemon=None, **kw):
self._target = target
def start(self):
@ -5048,7 +5048,7 @@ def test_prompt_submit_history_version_mismatch_surfaces_warning(monkeypatch):
}
class _ImmediateThread:
def __init__(self, target=None, daemon=None):
def __init__(self, target=None, daemon=None, **kw):
self._target = target
def start(self):
@ -5151,7 +5151,7 @@ def test_prompt_submit_history_version_match_persists_normally(monkeypatch):
}
class _ImmediateThread:
def __init__(self, target=None, daemon=None):
def __init__(self, target=None, daemon=None, **kw):
self._target = target
def start(self):
@ -5210,7 +5210,7 @@ def test_prompt_submit_can_truncate_before_user_ordinal(monkeypatch):
}
class _ImmediateThread:
def __init__(self, target=None, daemon=None):
def __init__(self, target=None, daemon=None, **kw):
self._target = target
def start(self):
@ -5364,7 +5364,7 @@ def test_run_prompt_submit_registers_turn_thread_for_interrupt(monkeypatch):
calls = {"interrupted": False, "started": False}
class _FakeThread:
def __init__(self, target=None, daemon=None):
def __init__(self, target=None, daemon=None, **kw):
self.target = target
def start(self):
@ -5433,7 +5433,7 @@ def test_interrupt_before_agent_ready_prevents_late_turn_start(monkeypatch):
calls = {"run_prompt": 0}
class _FakeThread:
def __init__(self, target=None, daemon=None):
def __init__(self, target=None, daemon=None, **kw):
self.target = target
threads.append(self)
@ -6317,7 +6317,7 @@ def test_model_options_refresh_allows_custom_provider_probes(monkeypatch):
class _ImmediateThread:
"""Runs the target callable synchronously so assertions can follow."""
def __init__(self, target=None, daemon=None):
def __init__(self, target=None, daemon=None, **kw):
self._target = target
def start(self):
@ -7832,7 +7832,7 @@ def test_notification_poller_delivers_completion(monkeypatch):
}
class _ImmediateThread:
def __init__(self, target=None, daemon=None):
def __init__(self, target=None, daemon=None, **kw):
self._target = target
def start(self):
self._target()
@ -7900,7 +7900,7 @@ def test_notification_poller_skips_consumed(monkeypatch):
return {"final_response": "ok", "messages": []}
class _ImmediateThread:
def __init__(self, target=None, daemon=None):
def __init__(self, target=None, daemon=None, **kw):
self._target = target
def start(self):
self._target()