The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(bot-relay): a relayed dm targets only live profiles (#99392 on the authority door)
teknium1db78e35b6389
diff --git a/tests/tui_gateway/test_bot_relay_methods.py b/tests/tui_gateway/test_bot_relay_methods.pyindex 5ad3764f6e1..972991db80f 100644--- a/tests/tui_gateway/test_bot_relay_methods.py+++ b/tests/tui_gateway/test_bot_relay_methods.py@@ -113,9 +113,15 @@ def test_deliver_unreachable_authority_is_a_typed_refusal(home, monkeypatch):raise ValueError("profile authority is not ready")monkeypatch.setattr(live, "authority_delivery", _down)- err = srv._methods["bot_relay.deliver"](1, {"id": "d" * 32, "profile": "ghost", "message": "x"})+ err = srv._methods["bot_relay.deliver"](1, {"id": "d" * 32, "profile": "ops", "message": "x"})assert err["error"]["data"]["reason"] == "runtime_unavailable"assert "not ready" in err["error"]["message"]+ # A name that is not a live profile (#99392: infra dirs and bare shells are not teammates)+ # is refused before any authority is consulted.+ (home / "profiles" / "sessions").mkdir()+ for ghost in ("ghost", "sessions"):+ err = srv._methods["bot_relay.deliver"](2, {"id": "e" * 32, "profile": ghost, "message": "x"})+ assert err["error"]["data"]["reason"] == "unknown_profile", ghost@pytest.mark.parametrize("params", [