Repository navigation
fix(desktop): recover startup when Docker or Temporal is unavailable - #223
Merged
Merged
Conversation
yxflc11
marked this pull request as ready for review
October 10, 2026 18:25
yxflc11
enabled auto-merge (squash)
October 10, 2026 18:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
When macOS launches OpenBot before Docker, the Temporal connection failed during product preflight and Desktop reported a generic installation/Keychain failure. Desktop now keeps one startup pending, identifies the retained local Docker installation with a bounded read-only Engine ping, and automatically continues when Temporal becomes available. Retry wakes the same pending attempt; Quit cancels it and stops only app-owned children.
Only a marked Temporal connection failure enters the wait loop. Migration failures, malformed/private-file configuration failures, denied Keychain access and unknown failures retain their existing fail-closed behavior. Neither Docker nor any container is started or reconfigured. The UI uses the Owner's Docker/waiting copy and removes Keychain advice from unknown errors. Web changes are limited to DesktopInstallScreen and its test; preview copy and other documentation remain Claude-owned.
Acceptance journey
Verification
Final review follow-up at
85306dd1bd3b64d441013a59995ee2da15046818(main base50837bea7bf63290aab250f84fe1b705f942efdb):af5e6cb1and accepted the copy/startup behavior, with one requested fix: allow waiting users to change their connection. The follow-up adds that existingonBackaction plus Retry dispatch-count, non-Docker waiting-copy and late-ready-after-unmount coverage. Claude also reviewed the final85306dd1incremental Web diff and approved the copy and all four regression cases. The Owner subsequently approved this final Web review and authorized merging after all current-head CI checks pass.npm run check: passed; 30 test tasks (14 cached), 20 build tasks (16 cached). Desktop 584 passed / 3 skipped, Web 703 passed (including 8 DesktopInstallScreen tests), Server 147 passed. Existing skips remain unqualified.npm run ui:acceptance -- --entry ts: PASS 12/12 with disposable PostgreSQL/mTLS Temporal and actual Chrome; 112 API responses, zero unexpected responses or page errors.763c4ff9; this follow-up was not packaged or installed.Product validation at
763c4ff9(unchanged by the CI-only follow-upa177f536):npm run check: passed; 30 test tasks (14 cached), 20 build tasks (16 cached). Desktop 584 passed / 3 skipped, Web 699 passed, Server 147 passed. Skips do not establish platform qualification.a177f536passed all 17 checks (run 38065184657). A new installation remains pending Owner confirmation after review.Open-source research
Reuses the existing Electron 44.3.0 main/IPC lifecycle, Node 24.21.0, Temporal TypeScript SDK 1.24.0, safe startup phases and existing private configuration loader. No dependency or version changes, no source copied. Docker transport reference: Mac socket locations and Engine API v1.51 ping; read-only, fixed socket targets, 1-second timeout and 16-character response limit. Relevant reuse decisions: Desktop unified onboarding/Server connection and P4/P5 Temporal in
docs/OPEN_SOURCE_REUSE.md.The first hosted scan exposed three existing fixtures at the new #222 squash commit,
eadee8d53a3e0788f707e74d81c6cb054df349f4. These were already reviewed at their pre-squash source: the two public gVisor binary digests inexperiments/linux-execution/native-config.ts:16–17and the reserved.invalidURL fixture inscripts/integration/fixtures/web-contract-compatibility.json:16842. Their detector, file, line and both content hashes match the existing entries exactly; only the commit identity changed. The existing historical fixture review remains applicable. The adapter adds only these three immutable tuples, with all-field refusal tests. Full fetched-history scanning, scanner-error refusal, detector coverage and offline/no-verification policy remain unchanged. Raw candidates were not printed or uploaded.Two pinned offline scans returned 28 findings each and alternated between the two known gVisor digest lines.
security:config-checkpassed 27 cases covering all 34 exact tuples and all-field mutations, both recorded scan outputs pass the adapter, andnpm run checkpassed again at the finala177f536tree. The packaged application remains the already verified763c4ff9product because the follow-up changes only the CI finding adapter and its tests.Historical startup evidence
The earlier P5 installation's first process exit is still unconfirmed. Its durable backup receipt records Temporal originally running and an engine restart requested after replacement; it does not contain that exit's cause. Temporary installation logs are no longer present after the Mac reboot. A targeted retained container-log query did not recover a conclusive startup event. This fix reproduces and closes the separately reported dependency-order failure; it does not assert that the historical exit had the same cause.
Security impact
The dependency hint uses fixed local socket targets and a bounded read-only request. Server authority, configuration validation, task submission and installed data are unchanged. Only the narrowly marked Temporal connection failure is retried.
Documentation and compatibility
The additive Desktop startup state is implemented in the existing IPC contract and consumer. This PR claims macOS arm64 candidate validation only; Windows/Linux qualification and a fresh installation of this candidate remain pending. The Owner assigned preview copy and post-P5 document cleanup to Claude, outside this change's file scope.
AI or automation assistance
85306dd1follow-up; the Owner then confirmed the final Web review and authorized merging after current-head CI passes. The accepted P5 UI review applies to P5: default TypeScript control plane and Python retirement #222, not this startup fix.