Repository navigation
fix(macos): finish ChatGPT login after Gateway reconnect - #134268
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
dc8dc1d to
a603799
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 12:34 PM ET / 16:34 UTC. ClawSweeper reviewWhat this changesThe branch lets macOS onboarding resend a provider-auth callback once after a pre-dispatch Gateway socket reconnect, retaining the same Gateway route and wizard session. Merge readinessKeep open. The PR repairs a source-proven first-run macOS onboarding failure with a narrow same-route retry, while the current main branch and v2026.8.1 still cancel the wizard immediately; the protected maintainer item should proceed through normal exact-head CI and maintainer handling. Priority: P0 Review scores
Verification
How this fits togethermacOS onboarding sends a browser-returned provider callback to the Gateway wizard. The onboarding model holds the authenticated socket lease so that the callback reaches the same Gateway session or fails safely without crossing to a different route. flowchart LR
Browser[Browser OAuth callback] --> Onboarding[macOS onboarding]
Onboarding --> Lease{Server lease current?}
Lease -->|Yes| Wizard[Gateway wizard callback]
Lease -->|No| Reconnect[Reacquire same Gateway route]
Reconnect --> Wizard
Wizard --> Setup[Connected provider setup]
Before merge
Agent review detailsSecurityNone. PR surfaceOther +96. Total +96 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 recovery confined to the typed pre-dispatch error, preserve same-route and current-attempt checks, retain the boundary regression, and merge only after the current head's relevant macOS checks complete. Do we have a high-confidence way to reproduce the issue? Yes—source inspection gives a high-confidence reproduction shape: invalidate the captured server lease after wizard start, then submit the callback. The added boundary harness encodes that sequence, though this review did not execute it. Is this the best way to solve the issue? Yes. Retrying only the wrapper-proven pre-dispatch result, on a route-identical replacement lease and with existing attempt guards, avoids duplicating a callback that might have reached the Gateway. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6704da366a2b. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
ClawSweeper rank-up moves are resolved on
|
|
Thanks @Sedrak-Hovhannisyan! Proof: macOS onboarding now keeps the same ChatGPT Login wizard and submits the callback once after a same-route Gateway socket reconnect. Exact-head CI passed the native macOS tests.
|
Closes #134182
What Problem This Solves
Fixes an issue where users who started ChatGPT Login during macOS onboarding could receive a generic Gateway transport error after the socket reconnected. The callback was rejected before dispatch, but the app cancelled the live wizard session and left the visible Submit control unable to send another request.
Why This Change Was Made
The native onboarding owner now retries only the typed
notDispatchedfailure, which proves the callback did not reach the Gateway. It reacquires the same route, preserves the existing wizard session and answer, and sends one replacement request.Post-dispatch failures, provider errors, cancellation, route changes, and a failed replacement request keep their existing cancellation and reconciliation behavior. The retry never starts a second provider login.
User Impact
ChatGPT Login can finish after a same-route Gateway socket reconnect during the browser flow. Users still see the provider's real error when the provider rejects the callback.
Evidence
2278fbc9df879d52efbb6a0b81f7798a9f7c16c1plus the regression testwizard.next; onboarding sentwizard.cancel, showedOpenClawChatTransportSendError error 0, and stayed disconnected.a603799a69a9d230d34de146769174ffe3e169b5The regression rotates the physical socket after provider auth starts. It verifies that one replacement
wizard.nextcarries the same session ID, step ID, and callback value, and that no wizard cancellation occurs.Production LOC: +52/-33, net +19. Of these additions, 25 are a pure move of existing non-localized helpers into the existing support file so the owner stays under its enforced file-length limit without changing the string inventory. The remaining growth implements the typed, same-route, exactly-once recovery boundary.