Repository navigation
fix: recover Cloud Workers profile saves after reconnect - #127150
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 21, 2026, 6:40 AM ET / 10:40 UTC. ClawSweeper reviewWhat this changesThe PR clears the Cloud Workers profile editor’s busy-save state on Gateway reset and adds a browser regression test for reconnect during a deferred save. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open: current main can leave a Cloud Workers profile editor permanently busy after a reconnect, and this PR places the release at the Gateway lifecycle owner. No blocking correctness or security issue was found; wait for exact-head CI before normal maintainer merge handling. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherThe Cloud Workers settings page saves profile configuration through the Gateway. When a reconnect retires an in-flight request, the page must release its UI save ownership without discarding the operator’s draft. flowchart LR
A[Operator edits Cloud Workers profile] --> B[Settings page starts save]
B --> C[Gateway request in flight]
C --> D[Gateway reconnect resets page state]
D --> E[Release save ownership]
E --> F[Draft stays editable for retry or cancel]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +1, Tests +108. Total +109 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the reset-level busy-state release once exact-head CI is green; no net-neutral refactor can absorb this distinct page-owned state transition. Do we have a high-confidence way to reproduce the issue? Yes. Current source proves the retired-scope cleanup skips busy-state release on reconnect, and the focused E2E deterministically exercises that deferred-save/reconnect order. Is this the best way to solve the issue? Yes. The Gateway invalidator owns retirement of page requests, and the change mirrors the existing Labs-page state-reset pattern rather than allowing stale completions to alter current state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9b37e538a8f9. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Land-ready verificationReviewed exact head The repair releases the page-owned Proof
ClawSweeper “Before merge” disposition
ClawSweeper listed no rank-up moves. No config, protocol, persistence, permission, or public API contract changes. |
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where operators saving a Cloud Workers profile would remain permanently stuck on
Saving…when the Gateway reconnected beforeconfig.patchsettled. The same mounted editor retained its draft, but Profile ID, backend, Save, and Cancel all stayed disabled after the Gateway was connected again.Why This Change Was Made
AI-assisted. Cloud Workers already uses the page Gateway lifecycle as the authority for retiring in-flight requests. Its invalidator reset catalog ownership but omitted
busyProfileId, while the retired request's guardedfinallycorrectly refused to mutate current state. The page's existing Gateway reset now releases busy ownership together with catalog request state, preserving the editor and draft and keeping retired completions silent.The browser regression exercises the real same-client reconnect order: defer
config.patch, reconnect, verify recovery and exact preserved draft, settle the retired request silently, then issue exactly one fresh retry and complete it.Production LOC: +4/-3 (net +1). Tests: +108/-0. The one production line adds the missing lifecycle ownership transition; no request, config, permission, or persistence behavior changes.
Provenance: the Cloud Workers profile editor was introduced in #124864 (
78beccf053974beb42d561471f35fe4954c52c61, 2026-08-17). Live searches forcloud workers reconnect saving,cloud workers stuck, andcloud-workers config.patchfound no exact open issue or PR.User Impact
After a transient Gateway reconnect, operators keep their in-progress Cloud Workers profile draft and can immediately retry or cancel instead of reloading the page and re-entering the profile.
Evidence
Authentic pre-fix source-Chromium regression:
Exact post-fix proof on the rebased head:
The exact changed-file gate passed formatting, UI/core-test typechecks, i18n verification, lint, dead exports, and policy guards. The pre/post rebase patch IDs match (
d421a539ec764cd0c3dfb7c3b96320c63f7f384d), and the focused browser and owner tests passed again after rebasing.Fresh independent high-mode review found no P0-P3 issues and judged the Gateway invalidator the correct owner-boundary fix. The repository Codex autoreview helper's previously disclosed authentication failure prevented the lead from rerunning that helper; independent high-mode review is the substitute.
Before: draft preserved but permanently busy
After: same draft recovered with Save and Cancel enabled