Repository navigation
fix: harden desktop update policy recovery - #9647
Merged
Git-on-my-level merged 1 commit intoJul 13, 2026
Merged
Conversation
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
Root cause and durable guard
The update-policy control plane was able to leave desktop clients with a stale blocking prompt or an unusable download target when Firestore or policy data failed. The backend now returns an inactive safe default on control-plane failure; the client decodes policy data defensively, verifies HTTP(S) download targets, and clears stale policy state on refresh failure. Tests cover the backend fault boundary, malformed payloads, and stale-required-prompt recovery.
Product invariants affected
APIClient.swiftis a path-glob match only. This change does not alter session invalidation, 401 handling, credentials, or authenticated-surface gating.Verification
cd backend && /private/tmp/omi-9528-venv/bin/pytest -q tests/unit/test_desktop_updates.py tests/unit/test_desktop_update_channels.py tests/unit/test_desktop_update_resolver.py— 101 passedcd desktop/macos && xcrun swift test --package-path Desktop --filter 'DesktopUpdatePolicyManagerTests|UpdateFailureDiagnosticsTests|UpdateRelaunchWindowPolicyTests'— 17 passedcd desktop/macos && python3 scripts/check_desktop_test_quality.py— passedmake preflightwith this PR body — passedomi-update-policy-recovery; the local automation bridge was reachable. The environment has no reusable signed-in session, so the authenticated banner could not be exercised end to end.Release gate
Live discovery on 2026-07-14 found the configured static repair page returning 404 while the stable dynamic download endpoint and appcast were healthy. This PR deliberately retains the verified stable endpoint as the safe fallback. Publish and verify the static repair page through the normal stable-promotion workflow, then validate a relaunch into the target build before closing the umbrella issue.
Refs #9528