Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a03397-4d51-7fd1-8ff2-946eb22ea2bc
This commit is contained in:
parent
398fe316b4
commit
e995cab1b8
12 changed files with 391 additions and 42 deletions
|
|
@ -91,6 +91,8 @@ def test_isolated_installed_tool_session_smoke(tmp_path):
|
|||
timeout=60,
|
||||
)
|
||||
assert run(str(tamq), "--version").stdout.strip() == "0.1.0"
|
||||
root_help = run(str(tamq), "--help").stdout
|
||||
assert "tamq [--detach] [--command COMMAND] REPO [REPO ...]" in root_help
|
||||
started = json.loads(
|
||||
run(
|
||||
str(tamq),
|
||||
|
|
@ -176,7 +178,7 @@ def test_isolated_installed_tool_session_smoke(tmp_path):
|
|||
"send-keys",
|
||||
"-t",
|
||||
"tamq:railiance-platform",
|
||||
f"{tamq} send '@activity-core: installed-message'",
|
||||
"@activity-core: installed-message",
|
||||
"C-m",
|
||||
)
|
||||
deadline = time.monotonic() + 5
|
||||
|
|
@ -191,10 +193,16 @@ def test_isolated_installed_tool_session_smoke(tmp_path):
|
|||
if inbox:
|
||||
break
|
||||
time.sleep(0.05)
|
||||
assert inbox, run(
|
||||
*tmux, "capture-pane", "-p", "-t", "tamq:railiance-platform"
|
||||
).stdout
|
||||
assert inbox[-1]["sender_repo"] == "railiance-platform"
|
||||
assert inbox[-1]["body"] == "installed-message"
|
||||
assert inbox[-1]["state"] == "pending"
|
||||
message_id = inbox[-1]["message_id"]
|
||||
assert run(str(tamq), "inbox", "--repo", "activity-core").stdout == (
|
||||
f"#railiance-platform: installed-message [{message_id}]\n"
|
||||
)
|
||||
target_after = run(
|
||||
*tmux, "capture-pane", "-p", "-t", "tamq:activity-core"
|
||||
).stdout
|
||||
|
|
@ -209,6 +217,32 @@ def test_isolated_installed_tool_session_smoke(tmp_path):
|
|||
).stdout.splitlines()
|
||||
]
|
||||
assert all_messages[-1]["state"] == "acknowledged"
|
||||
|
||||
run(
|
||||
*tmux,
|
||||
"send-keys",
|
||||
"-t",
|
||||
"tamq:railiance-platform",
|
||||
"@activity-core filtered-message",
|
||||
"C-m",
|
||||
)
|
||||
deadline = time.monotonic() + 5
|
||||
while time.monotonic() < deadline:
|
||||
pending = run(
|
||||
str(tamq), "inbox", "--repo", "activity-core", "--json"
|
||||
).stdout
|
||||
if "filtered-message" in pending:
|
||||
break
|
||||
time.sleep(0.05)
|
||||
message_log = tmp_path / "msg.log"
|
||||
run(
|
||||
str(tamq), "inbox", "--repo", "activity-core", "--filter",
|
||||
f"cat >> {message_log}",
|
||||
)
|
||||
assert "#railiance-platform: filtered-message [m-" in message_log.read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
assert run(str(tamq), "inbox", "--repo", "activity-core").stdout == ""
|
||||
status = json.loads(run(str(tamq), "status").stdout)
|
||||
assert status["service"] is True
|
||||
assert [item["endpoint_id"] for item in status["endpoints"]] == [started["instance_id"]]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue