mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-30 11:52:04 +00:00
Net-new WebSocketRelayTransport.go_dormant() + RelayAdapter.go_dormant() — the third transport mode the scale-to-zero behaviour layer needs, distinct from both disconnect() and an unexpected close (decisions.md D12/F14): - disconnect() sets _closing=True and CANCELS the reconnect supervisor (terminal "shutting down for good") -> a suspended machine never re-dials on wake, stranding its buffered backlog. - an unexpected close re-dials IMMEDIATELY -> the socket never stays down, so the platform proxy never suspends the machine. go_dormant(): going_idle->ack (reuse go_idle), then close the socket WITHOUT setting _closing, so the reader's fall-through still arms the reconnect supervisor (wake path stays live) but on the longer _dormant_redial_s cadence so it doesn't fight the platform suspend window. A successful re-dial clears _dormant. Honors the §3.4 wake->reconnect->drain contract. Tests: 6 new in test_relay_going_idle.py incl. the F14 regression guard (routing dormancy through disconnect() fails exactly the 4 wake-path tests). Full relay suite 140 passed. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| stub_connector.py | ||
| test_auth.py | ||
| test_contract_doc_conformance.py | ||
| test_descriptor.py | ||
| test_descriptor_from_entry.py | ||
| test_no_stub_leak.py | ||
| test_relay_adapter.py | ||
| test_relay_follow_up.py | ||
| test_relay_going_idle.py | ||
| test_relay_interrupt.py | ||
| test_relay_passthrough.py | ||
| test_relay_policy_send.py | ||
| test_relay_registration.py | ||
| test_relay_roundtrip.py | ||
| test_relay_roundtrip_telegram.py | ||
| test_relay_sheds_crypto.py | ||
| test_self_provision.py | ||
| test_ws_transport.py | ||