Stop OK Desktop's "Update to X didn't install" notice from firing…#424
Merged
Conversation
…344) * fix(desktop): stop stale/cross-channel install-failed notice from nagging every boot The boot-time failed-install detector (PRD-7149) armed attemptedInstall at download and only cleared it once the running version reached it, with no channel check and no retry bound. Two failure modes resulted: - Cross-channel contamination: stable and beta builds share one state.json (same appId/productName), so a version armed by one channel poisoned the other channel's boot check. A beta build surfaced Update to <stable X> didnt install for a version its update-available veto guarantees it can never install, and the record never cleared, so the card re-fired every boot. Now cleared silently when attemptedInstall and the running build are on different channels. - Unbounded nag: a genuinely stuck install re-surfaced the card every boot forever. Now capped at INSTALL_FAILURE_MAX_SURFACES (3) surfacings, after which the record is dropped; the 7-day stuck-hint stays the backstop. Adds attemptedInstallSurfacedCount to AppState (defensively coerced) and the attempted-install-cross-channel / install-failed-giveup dispatch tags. Genuine same-channel failures still surface as before. * address review: clear versionPendingInstall on install abandonment + test hardening Review (claude bot) flagged that the giveup branch cleared attemptedInstall but left versionPendingInstall armed. For a higher-MMP attempted version the MMP-only stale-pending reconciliation cannot clear it, leaving a phantom 'ready to install' banner (and dedup-blocking a genuine re-download). Fix: the giveup AND the cross-channel abandonment branches now also clear versionPendingInstall (the cross-channel branch has the identical latent issue — a stale stable pending marker on a beta build). Tests: assert versionPendingInstall is cleared in the giveup + cross-channel paths (higher-MMP versions so stale-pending does not pre-clear); add persist- failure tests for both new branches; add a same-version re-download budget- preserve test; assert the surface counter resets on success reconcile. GitOrigin-RevId: 32b8aeac91d9ab4a4223d9f2ad288919490e43de
Contributor
There was a problem hiding this comment.
Automated approval from agents-private public-mirror-sync (run: https://github.com/inkeep/agents-private/actions/runs/28542403968). Source of truth is the monorepo; direct edits on inkeep/open-knowledge are overwritten on next sync.
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.
Stop OK Desktop's "Update to X didn't install" notice from firing spuriously and re-appearing on every launch. The boot-time failed-install detector now handles two cases it previously got wrong:
Cross-channel state. The stable and beta builds share one settings file (same app id), so a version that one channel armed as its pending install could poison the other channel's boot check. A beta build would show "Update to 0.23.0 didn't install" for a stable version it can never install (cross-channel updates are blocked), and there was no way for it to clear, so the notice returned on every launch. That stale cross-channel record is now cleared silently.
No retry bound. A genuinely stuck install (a persistently-failing installer, a pulled release) re-surfaced the notice on every boot forever. It is now shown at most 3 times per failed update, after which the record is dropped. The 7-day "updates paused" hint remains the backstop.
Genuine same-channel install failures still surface as before, so a real failed update is not hidden.