fix(release): restart gateway after app replacement#106
Open
tcballard wants to merge 4 commits into
Open
Conversation
tcballard
marked this pull request as ready for review
July 19, 2026 21:55
This was referenced Jul 21, 2026
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.
Summary
Implements
WF-ROADMAP-0015 desktop v0.1.0 app-replacement recovery.Adds:
Scope
Included
Excluded
Product / Architecture Decisions
/Applications/Wayfinder.appis replaced at the same path.User-Facing Contract
CLI
No CLI changes.
Human Output
Replacing Wayfinder and reopening it automatically refreshes the persistent bundled gateway. Users should not need to run
launchctl kickstartto restore Apple Foundation Models availability.JSON Output
No JSON changes.
Exit Codes
No exit-code changes.
Verification
Ran
env CLANG_MODULE_CACHE_PATH=/private/tmp/wayfinder-replacement-module-cache SWIFTPM_MODULECACHE_OVERRIDE=/private/tmp/wayfinder-replacement-module-cache WAYFINDER_DISABLE_SWIFTPM_SANDBOX=1 swift test --disable-sandbox --scratch-path /private/tmp/wayfinder-replacement-build --package-path macos/WayfinderMacgit diff --checkCovered
23749to48559and persisted the new0.1.0|1|R8HXTBY3NM|...fingerprint.{"status":"ok","models":["apple-local"],"offline":true}and returnedOK.from a real non-streamingapple-localrequest.Review Path
GatewayReplacementReconciler.swiftfor fingerprint, trust, and retry behavior.WayfinderMacApp.swiftfor startup ordering.GatewayReplacementReconcilerTests.swiftfor boundary coverage.Notes For Reviewer
The bug was reproduced on a real signed/notarized RC: the live Foundation Models harness reported
available, while the stale pre-replacement gateway returnedwayfinder_router_not_ready. A manual launchd restart immediately restored a successfulapple-localreply. The corrected branch was then Developer ID-signed and installed over the stale process; automatic reconciliation restarted the gateway and restored the same successful Apple reply without manuallaunchctlwork.