Repository navigation
fix: stale Control UI tabs stop retrying after updates - #123932
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 14, 2026, 10:26 PM ET / August 15, 2026, 02:26 UTC. ClawSweeper reviewWhat this changesThe PR changes stale bundled Control UI build rejections to a terminal protocol-mismatch response so affected tabs stop reconnecting and show a Refresh page action. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open for normal maintainer review: current main still sends the build-specific rejection that stale clients do not understand, while this patch maps that path to the existing terminal protocol-mismatch recovery contract without weakening pre-registration admission. Priority: P1 Review scores
Verification
How this fits togetherThe Gateway validates a Control UI WebSocket before it can register, publish presence, or call RPCs. A rejected handshake is interpreted by the browser client and login gate as either retryable or a terminal recovery state. flowchart LR
A[Open Control UI tab] --> B[Gateway WebSocket admission]
B --> C{Bundled build matches?}
C -->|No| D[Terminal protocol mismatch]
D --> E[Browser reconnect policy]
E --> F[Refresh page recovery]
C -->|Yes| G[Client registration]
G --> H[Gateway RPCs]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -2, Tests +27. Total +25 across 3 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the pre-registration rejection and use the long-standing terminal protocol-mismatch recovery signal for stale bundled documents, with exact-head proof for both missing and explicit stale build IDs. Do we have a high-confidence way to reproduce the issue? Yes: current main emits the dedicated build-mismatch detail before registration, while the focused raw-WebSocket test supplies missing and explicit stale build IDs; the PR body also links pre-fix and after-fix Testbox evidence. Is this the best way to solve the issue? Yes: the patch uses the existing terminal protocol-mismatch behavior that old documents already recognize, rather than adding a new compatibility surface, and retains the Gateway admission fence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9d6b64cabf28. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready at
The raw-WebSocket proof covers missing and explicit stale build IDs, delivers a post-rejection ClawSweeper is explicitly waived for this repair. The remaining proof is post-deploy observation that the three formerly retrying stale tabs stop reconnecting. |
|
Merged via squash.
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix: stale Control UI tabs stop retrying after updates This is item 3/3 in the current shard. Shard 3/48. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
* fix(ui): preserve stale client refresh compatibility * fix(ui): cover build-aware frozen clients
Related: #123882
What Problem This Solves
Fixes an issue where stale Control UI tabs would reconnect forever after a Gateway update, even though the Gateway correctly rejected them before registration or RPC dispatch. The affected tabs showed only a reconnecting state instead of the existing page-refresh recovery action, while their repeated handshakes generated an unbounded warning stream.
Why This Change Was Made
Build identity shipped before the dedicated build-mismatch error code, so neither a missing nor an explicit stale build ID proves that a frozen client understands that newer code. The Gateway now uses the already-shipped terminal
PROTOCOL_MISMATCHdetail plus literal protocol-mismatch reload guidance for every bundled same-origin build rejection, while preserving the pre-registration admission fence.User Impact
Stale tabs from both compatibility cohorts stop retrying and show the existing Refresh page recovery path. They remain unable to register a client, publish presence, or dispatch RPCs before refresh.
AI-assisted: yes. I reviewed the source, history, tests, and final patch.
Evidence
054354e099c4952af5152c974253b99af5cfb676showed three stale tabs safely rejected before RPC, but each retried at the 15-second client backoff cap.CONTROL_UI_BUILD_MISMATCHinstead of the shipped terminal sentinel: run 31857183451.No visual design changed. The Chromium regression asserts that the protocol-mismatch path stays disconnected, does not reconnect, and visibly offers Refresh page.