From 842117900ae21ae3adddc90ce2547cf5f8d46f08 Mon Sep 17 00:00:00 2001 From: Mikhail Putilovskij Date: Fri, 24 Apr 2026 12:39:50 +0300 Subject: [PATCH] test: cover agent api base url suffix handling --- README.md | 2 +- tests/platform/test_agent_session.py | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 93782c6..b4b4f16 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ Matrix бот подключается к `platform-agent` по service name, а На `2026-04-21` локальный compose runtime использует vendored upstream-версии платформы без локальных патчей: - `platform-agent`: `5e7c2df954cc3cd2f5bf8ae688e10a20038dde61` -- `platform-agent_api`: `aa480bbec5bbf8e006284dd03aed1c2754e9bbee` +- `platform-agent_api`: `8a4f4db6d36786fe8af7feefffe506d4a54ac6bd` ### 4. Staged attachments в Matrix diff --git a/tests/platform/test_agent_session.py b/tests/platform/test_agent_session.py index bda5cfe..c398e8c 100644 --- a/tests/platform/test_agent_session.py +++ b/tests/platform/test_agent_session.py @@ -9,6 +9,18 @@ def test_lambda_agent_api_module_is_importable(): assert AgentApi is not None +def test_lambda_agent_api_preserves_base_url_path_suffix(): + from sdk.upstream_agent_api import AgentApi + + api = AgentApi( + agent_id="matrix-bot", + base_url="http://platform-agent:8000/proxy/", + chat_id="chat-7", + ) + + assert api.url == "http://platform-agent:8000/proxy/v1/agent_ws/chat-7/" + + def test_agent_session_module_is_intentionally_stubbed(): contents = Path(__file__).resolve().parents[2] / "sdk" / "agent_session.py"