Skip to content

Simplify WebSocket worker connection setup - #472

Merged
hermabr merged 1 commit into
t3code/migrate-http-to-websocketsfrom
t3code/extract-websocket-worker-client
Jul 31, 2026
Merged

Simplify WebSocket worker connection setup#472
hermabr merged 1 commit into
t3code/migrate-http-to-websocketsfrom
t3code/extract-websocket-worker-client

Conversation

@hermabr

@hermabr hermabr commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Move only authenticated WebSocket connection setup and hello/welcome negotiation into a 41-line worker_client context manager.
  • Keep typed receive and result send operations as direct one-liners instead of wrapping them in a client class.
  • Simplify consecutive-failure tracking and collapse duplicate completion logging in the worker loop.
  • Preserve the server-pushed assignment protocol from Migrate execution coordination from HTTP to WebSockets #470.

The layer is net negative: 76 additions and 82 deletions, including 47 fewer lines in the worker loop.

Stack

Testing

  • uv run ruff check
  • uv run ty check
  • GITHUB_ACTIONS=true uv run pytest (613 passed, 4 skipped)

@hermabr hermabr changed the title t3code/extract websocket worker client Extract stateful WebSocket worker client Jul 31, 2026
@hermabr
hermabr force-pushed the t3code/extract-websocket-worker-client branch from ccdbe32 to 577113a Compare July 31, 2026 19:31
@hermabr hermabr changed the title Extract stateful WebSocket worker client Simplify WebSocket worker connection setup Jul 31, 2026
@hermabr
hermabr merged commit 8f0d859 into t3code/migrate-http-to-websockets Jul 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant