chore: envoy client + tunnel slop#4531
chore: envoy client + tunnel slop#4531NathanFlurry wants to merge 10 commits into03-27-chore_envoy_clientfrom
Conversation
|
🚅 Deployed to the rivet-pr-4531 environment in rivet-frontend
|
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
c461b02 to
f902085
Compare
d1dbd29 to
383778c
Compare
PR Review: Envoy Client Tunnel ImplementationThis PR adds the HTTP and WebSocket tunnel module to the envoy client, replacing the TODO stub with a real implementation. The overall structure is solid — good use of staleness checks, synchronous entry creation before async spawning, and the wrapping u16 arithmetic for hibernatable WS deduplication. Potential Bugs1. closeTunnelRequestsForActor silently drops in-flight HTTP requests
2. handleRequestAbort has the same silent-drop issue
3. Non-Error rejection loses original error information
4. closeTunnelRequestsForActor does not filter by generation The function closes all tunnel requests matching Minor Issues5. TextEncoder allocated on every string send
6. sendTunnelMessageRaw always uses messageIndex 0
7. Warning noise in resendBufferedTunnelMessages After reconnect, 8. as any on streaming Request construction
9. URL host inconsistency HTTP requests use TestsThe PR checklist has "I have added tests" unchecked. Given the complexity of tunnel buffering, reconnect resend logic, and hibernatable WebSocket sequencing (wrapping u16 arithmetic), test coverage would be valuable. Flagging since this is a draft. The main items worth addressing before merging are the silent HTTP response drop on actor stop/abort (items 1 and 2) and the generation filtering in |
f902085 to
6e4a901
Compare

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: