Repository navigation
fix(h3): share failed dials and join client shutdown - #47
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Deadline checks can violate the caller context contract before timer cancellation is published.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
This PR improves HTTP/3 connection coordination and shutdown behavior.
Changes:
- Shares cold H3 dial results while isolating caller cancellation.
- Joins dial and session-cleanup workers during concurrent client shutdown.
- Adds extensive lifecycle tests and documents the semantics.
| File | Description |
|---|---|
internal/tunnel/web_h3_client.go |
Implements shared dials and joined shutdown. |
internal/tunnel/web_h3_dial_sharing_test.go |
Tests sharing, cancellation, retry, and fallback. |
internal/tunnel/web_h3_close_join_test.go |
Tests cleanup completion and concurrent Close calls. |
docs/WEB_COVER.md |
Documents the new H3 behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Change
contextErrorhelper at caller entry and result/error arbitration, including an elapsed deadline whose timer has not yet published cancellation. Published custom causes still take precedence.Final candidate verification
make checkand shuffled fullmake racepassed. New H3 race tests repeated 5 times: 6 tops / 10 terminal cases, 60 group-inclusive PASS, 0 FAIL/SKIP.3c6ebbdfailed all three added deadline cases for the intended reasons; the corrected final candidate passed them. The fixed-deadline unpublished-timer Context model is synthetic, not a naturally observed timing race.Boundaries
No authentication/wire-profile/default-timeout/native-QUIC change, deployment, release or tag; published v1.0.1 is unchanged. This fixes coordination/resource ownership, not general speed or browser equivalence. Close-completion and earlier late-valid-session audits use synthetic scheduling barriers. The earlier late-session fixture's initial repeated-server-shutdown failure is retained; a one-line fixture-only allowance passed once.
attempt.doneproves result publication, not worker termination; Client.Close separately joins workers. The closed-client deadline case checks entry precedence, not isolation of the client-cancellation select branch. Local raw evidence is ignored, outside this four-file PR.Corrected-head GitHub verification
Final head
e660b1df6f4015c36c8c06a9bf4a342454f552dbpassed all 13 workflow jobs (attempt 1): CI, CodeQL, Linux netem. Actual PR merge checkoutb974784c1b7fd1d7ec04db57947d2e7aea7e9870has the exact candidate treec9eb596a6b47d51fa81fe19be3d16ac57f6463f3; key race/coverage/container logs were inspected. The elapsed-deadline thread is fixed and resolved. Merged-main checks were verified independently on556f9948d48ab64b28529ae5eb81d26abf737792(same candidate tree, attempt 1, all 13 workflow jobs successful): main CI, main CodeQL, main Linux netem. Actual key logs check out the merged commit itself; local main is fast-forwarded, source hashes match and the tracked worktree is clean.