Repository navigation
Conversation
…D tunnel Co-authored-by: Lukass Kellijs <lukass16@users.noreply.github.com>
21c03e4 to
56bbd62
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56bbd62c0e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| await asyncio.sleep(60.0) | ||
| raise StopAsyncIteration | ||
|
|
||
| await _splice_websocket( |
There was a problem hiding this comment.
Exercise the normal runtime connection lifecycle
This regression test calls the private _splice_websocket helper directly, bypassing _forward_runtime_connection and the asyncio.start_server callback where the reported unhandled exception is observable. It therefore does not verify that a normal gateway close completes cleanly through the actual runtime lifecycle; mock the websocket boundary while driving a HUDRuntime connection instead.
AGENTS.md reference: AGENTS.md:L126-L132
Useful? React with 👍 / 👎.
Part of the HUDRuntime cancelled-trace bug (counterpart: https://github.com/hud-evals/hud-monorepo/pull/2144). Low priority, draft. Supersedes #692, which GitHub closed when its branch was renamed.
What
When the HUD runtime gateway closes a tunnel websocket normally (code 1000) while the local side is still relaying,
_splice_websocketre-raisedwebsockets.ConnectionClosedOKout of theasyncio.start_servercallback, so asyncio logged it as an unhandled exception even though nothing failed._splice_websocketnow treatsConnectionClosedOKas a clean end of the relay. All other relay errors still propagate.Scope
SDK-only log-noise fix. It does not fix the platform marking local-agent HUDRuntime traces
cancelled; that is the separate monorepo PR (runtime-session DELETE cancels the still-running attached trace before/trace/{id}/exitarrives). Independent of any other open PR; based onmain.Tests
test_splice_websocket_treats_normal_close_as_clean_endfails onmain, passes here.hud/eval/tests/test_hosted.py: 41 passed; ruff format/check and ty clean.Note
Low Risk
SDK-only logging/exception-handling tweak in the websocket relay path; real relay failures still propagate.
Overview
HUDRuntime tunnel relay no longer surfaces
websockets.ConnectionClosedOKas an unhandled error when the gateway closes the tunnel websocket normally (close code 1000) during TCP↔WS splicing._splice_websocketstill re-raises every other relay exception; only a normal close is swallowed so asyncio does not log a spurious failure.Adds
test_splice_websocket_treats_normal_close_as_clean_endalongside the existing relay-error propagation test.Reviewed by Cursor Bugbot for commit 56bbd62. Bugbot is set up for automated code reviews on this repo. Configure here.