You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
llm-proxy identity probe can panic inside ureq when the peer drops the connection #4912
hooks::session_start::probe_identity::probe_rejects_a_stranger_on_the_port failed on the macOS runner of PR #3833's CI (run 39525727363, job 118980201432). That PR touches only hooks/hermes/:
thread 'hooks::session_start::probe_identity::probe_rejects_a_stranger_on_the_port' panicked at
.../ureq-2.12.1/src/response.rs:403:34:
failed to read exact buffer length from stream: Os { code: 22, kind: InvalidInput, message: "Invalid argument" }
The test calls the production probe() (src/hooks/session_start.rs:82, which calls crate::llm_proxy::is_rtk_proxy_at) against a stub server. The stub writes HTTP/1.1 200 OK … {} and drops the socket without reading the request. ureq 2.12.1 buffers a short body with read_exact(...).expect(...) (response.rs:401-403). Its own comment there says this can panic when resetting the stream's timeouts fails. On macOS, the reset after an unread request turns that into a panic.
So it is not only a flaky test. Anything listening on the probed port that answers and closes early can make the probe panic instead of returning false. The test exists because a stranger on the port is the expected case (8080 is a common dev-server port).
Two parts to a fix:
the probe must not unwind: catch the panic around the ureq call, or read the body without ureq's buffered expect path;
the test stub should read the request before replying, so the test checks the identity decision rather than the socket race.
Develop's own CI runs have passed this test on macOS, so it is intermittent.
ureq panics instead of returning false when a peer on the probed port drops the connection early; probe needs panic isolation and the test stub needs to read the request first.
📁 Relevant files
src/hooks/session_start.rs
src/llm_proxy.rs
Suggested Actions
Wrap the ureq call in src/llm_proxy.rs (is_rtk_proxy_at) with catch_unwind or avoid the buffered read_exact path
Fix the test stub in session_start.rs's probe_rejects_a_stranger_on_the_port to read the request before responding
Check ureq 2.12.1 changelog/issue tracker for known read_exact panic on timeout-reset failure
Activity
rtk-wshm-sync-bot commentedon Nov 1, 2026
🔍 Automated Triage
bughighSummary
ureq panics instead of returning false when a peer on the probed port drops the connection early; probe needs panic isolation and the test stub needs to read the request first.
📁 Relevant files
src/hooks/session_start.rssrc/llm_proxy.rsSuggested Actions
Triaged automatically by wshm · This is an automated analysis, not a human review.