Guard WebSocket lifecycle with connection generations#739
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Codex review: needs changes before merge. Reviewed June 21, 2026, 6:35 PM ET / 22:35 UTC. Summary Reproducibility: yes. source-level. A failed current Review metrics: 2 noteworthy metrics.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Land the focused generation guard only after every reconnect kickoff is generation-aware and targeted WebSocketClientBase tests cover listener, failed-connect, and closing-socket takeover cases. Do we have a high-confidence way to reproduce the issue? Yes, source-level. A failed current Is this the best way to solve the issue? No, not yet. Generation guarding is the right ownership boundary, but the fix needs to carry that ownership through every reconnect kickoff, including failed-connect backoff. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ae61c99bd858. Label changesLabel justifications:
Evidence reviewedAcceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Bind listener-initiated reconnect loops to the socket generation that requested them so a stale loop cannot dispose or replace a newer successful connection after backoff delay. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Guard reconnect loops so failed retries and closing current sockets do not strand the websocket client while still avoiding active newer sockets. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
shanselman
left a comment
There was a problem hiding this comment.
Maintainer validation looks good. I added and validated two small reconnect-loop hardening tests/fixes so stale generation guards do not strand reconnects after failed retries or current close handshakes.
Fixes #696.
Summary
Validation
Review
Proof