The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(gateway): keep two invariants for the hosted prompt digest (#141014)
Tekniumcf0d8f313ac1
diff --git a/tests/gateway/test_session_hosted_transport.py b/tests/gateway/test_session_hosted_transport.pyindex 278cc646e27..e819971a4a8 100644--- a/tests/gateway/test_session_hosted_transport.py+++ b/tests/gateway/test_session_hosted_transport.py@@ -185,24 +185,6 @@ def test_large_cjk_prompt_crosses_owner_sockets_once(hosted_owner, tmp_path, monasyncio.run_coroutine_threadsafe(server.stop(), loop).result()-def test_oversize_owner_request_has_specific_presend_reason(hosted_owner, tmp_path, monkeypatch):- from gateway import session_hosted_transport as transport- from hermes_cli import gateway_runtime, gateway_runtime_discovery- from hermes_state_runtime import RuntimeStoreError- _, loop, _, _ = hosted_owner- server = _server(tmp_path)- assert asyncio.run_coroutine_threadsafe(server.start(), loop).result()- discovered = gateway_runtime.discover_gateway_endpoint(tmp_path)- monkeypatch.setattr(gateway_runtime, 'discover_gateway_endpoint', lambda *a, **k: discovered)- monkeypatch.setattr(gateway_runtime_discovery, 'connect_private',- lambda *a: pytest.fail('oversized request must not connect'))- try:- with pytest.raises(RuntimeStoreError, match='request_too_large'):- transport.owner_request(tmp_path, 'hosted-producer', {'prompt': '中' * 11000})- finally:- asyncio.run_coroutine_threadsafe(server.stop(), loop).result()--def test_prompt_digest_preserves_source_fences_and_legacy_input(tmp_path, monkeypatch):from hermes_state_runtime import RuntimeStoreErrorsource = _SourceTask(tmp_path, monkeypatch, b'file')