fix: restore interactive PTY behavior
Some checks failed
tamq-ci / test (push) Failing after 6s

Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a03397-4d51-7fd1-8ff2-946eb22ea2bc
This commit is contained in:
tegwick 2026-08-24 19:28:49 +02:00
parent 397a2b4d58
commit 68475922bb
15 changed files with 437 additions and 50 deletions

View file

@ -13,6 +13,9 @@ class FakeControl:
def start(self):
return None
def session_exists(self, expected_pid=None):
return True
def inject(self, window, text):
self.injected.append((window, text))
@ -29,3 +32,17 @@ def test_service_delivery_injects_pending_messages(tmp_path, monkeypatch):
assert FakeControl.instances[-1].injected == [("tamq:repo-b", "#repo-a: continue")]
assert store.list()[0]["message_id"] == message_id
assert store.list()[0]["state"] == "injected"
def test_service_disconnects_disappeared_tmux_endpoint(tmp_path, monkeypatch):
store = Store(tmp_path / "queue.sqlite3")
store.register_endpoint("tmux-amq-9-boot", 9, "tamq", ["repo-b"])
class MissingControl(FakeControl):
def session_exists(self, expected_pid=None):
assert expected_pid == 9
return False
monkeypatch.setattr("tamq.service.ControlModeClient", MissingControl)
Service(store=store)._deliver_once()
assert store.endpoints() == []