Repository navigation
fix(ios): preserve setup after bootstrap preparation refuses - #160218
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. Reviewed September 28, 2026, 6:59 AM ET / 10:59 UTC (Revision 6). ClawSweeper reviewWhat this changesThe branch makes iOS onboarding and Gateway Settings stop on refused bootstrap preparation, and adds simulator regression cases, manual CI coverage, and troubleshooting guidance. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 8 items remain Current main still continues after bootstrap preparation refuses. This PR addresses that failure, but two previously identified ownership races remain on the pinned head and block merge. Priority: P2 Review scores
Verification
How this fits togetherThe iOS setup flow accepts a code, QR scan, or setup link, chooses a Gateway endpoint, and prepares local data before saving credentials. It then connects the device to the selected Gateway. flowchart LR
A[Setup code or link] --> B[iOS setup attempt]
B --> C[Choose Gateway endpoint]
C --> D[Prepare offline data]
D --> E{Attempt and link still current?}
E -->|Yes| F[Save endpoint and credentials]
F --> G[Connect to Gateway]
E -->|No| H[Keep current setup]
Before merge
Findings
Agent review detailsSecurityNeeds attention: The asynchronous setup paths can apply credentials for a superseded Gateway choice. PR surfaceTests +1, Docs +1, Config +1, Other +152. Total +155 across 6 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep refusal retryable while allowing only the still-current attempt to apply credentials and consume exactly the link it prepared. Do we have a high-confidence way to reproduce the issue? Yes for the reported refusal: current-main source continues after preparation can fail, and the supplied baseline and after screenshots show the user-facing difference. The cancellation and replacement races have a clear source path but no final-effect run. Is this the best way to solve the issue? No, not yet. Returning failure from preparation is the right repair boundary, but the callers must revalidate setup ownership after the await and before applying state. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 988be4860740. LabelsLabel changes: No label changes. Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
2d5a0f1 to
13fe7fa
Compare
…w#160218) * test(ios): reproduce bootstrap setup refusal * test(ios): target visible setup input after scrolling * fix(ios): stop setup after bootstrap preparation refuses * test(ios): retain release coverage after bootstrap proof
What Problem This Solves
Fixes iOS setup continuing after safe replacement of a Gateway's offline data fails. Onboarding clears the entered code and attempts connection; Settings also saves the replacement endpoint and credentials.
User Impact
A refused bootstrap setup keeps the current manual endpoint and entered code available for retry, and shows the existing failure message. Successful setup keeps its current cleanup and credential owners. No message text, protocol model, schema, migration, signing, entitlement, or installer behavior changes.
Why This Change Was Made
Both setup-link helpers return whether preparation succeeded, and all five callers stop on refusal. Endpoint and credential assignments follow successful preparation. The regression drives the real onboarding Apply and Settings Connect actions using Foundation's argument domain to supply a malformed legacy Watch queue; it adds no production test hook.
Evidence
Native red/green proof passed. Final candidate 13fe7fa passed exact-head PR CI, including iOS compilation, simulator tests, and both iPhone/iPad screenshot jobs. Local iOS and embedded Watch compilation passed under nice priority 10 with two jobs (3,279.367 seconds under host load). Final Testbox gates passed. This PR is READY-TO-LAND and remains unarmed. Temporary manual-main selection is removed; the UI regression remains registered in existing full/manual validation.
BOOTSTRAP_REFUSAL_NOT_PRESERVED. Both app logs record offline removal refusing withWATCH_UNAVAILABLEbefore the callers continue to the replacement endpoint. Inspected synthetic before/after captures were delivered in chat and verified rendering inline in GitHub below.tbx_01m3jv0saqbw4twe0fwq12z21xpassed frozen installation and all 475 workflow-fixture assertions in 88.86 seconds; the lifecycle fixture took 1.739 seconds. The lease is stopped. Final Blacksmith Testboxtbx_01m3kkn7047c8g4xpap258tn46verified candidate 13fe7fa and passed frozen installation,node scripts/check-changed.mjs(480.609 seconds),pnpm protocol:check(2.902 seconds),pnpm native:i18n:verify(2.465 seconds), and all 511 tests in both workflow-fixture files (142.386 seconds; lifecycle fixture 23 tests in 2.691 seconds); combined gate time was 628.574 seconds. The lease is stopped; its hydration run identifies the provider session. An earlier lease expired during local source preparation before executing any check; no pass is attributed to it.The initial Settings probe failed before submission because XCTest retained pre-scroll field frames. Its result is not counted as product proof. The corrected driver returns the list to its top, awaits the keyboard, verifies the entered value, and reached the intended baseline failure in the run linked above. No timeout, workload, or behavior assertion was weakened.
Before and after