Repository navigation
Conversation
Record the cross-platform updater selection contract and its backend/client regression guards for PR BasedHardware#10610.
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for this — this is a clean, well-reasoned fix for #10508, and the test coverage is strong.
What stands out positively:
- The root cause is correctly identified:
GitHubProviderresolves/releases/latest, which in this multi-platform repo can land on a macOS tag with nolatest.yml. Scoping to an explicit Windows release directory is the right fix. - The client-side trust validation in
windowsUpdateFeed.tsis notably well done. Even if the backend response were tampered with, the client only acceptshttps://github.comorigin, rejects userinfo/query/hash, and constrains the path to a BasedHardware/omi Windows release directory. Fails closed on any mismatch. - The channel invariants are correctly modeled and tested: stable never falls through to beta; beta may fall back to stable when the slot is empty after promotion. The
WindowsUpdateFeedSelectoralso handles the real concurrency edge case of a channel flip mid-check without applying a stale resolution to the wrong channel. - Backend, client, route policy manifest, failure-class doc, and release-pipeline docs are all coherent around one outcome.
Two things to resolve before merge:
-
CI is not green. Formatting, Hygiene, and Detect Changes are showing as cancelled/failed. A clean passing run is needed before this can merge. These look like they may be cancelled from a superseded run — if so, re-triggering should clear them.
-
As the PR body correctly notes, the backend endpoint (
/v2/desktop/update-feed/windows) must be deployed before a Windows build containing the client change is published, since the new client intentionally fails closed rather than falling back to the broken repository-wide provider. Please confirm the deployment sequence with whoever owns the backend release schedule.
Marking for maintainer review since this touches the auto-update/release pipeline. No changes requested — the implementation itself looks correct.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
kodjima33
left a comment
There was a problem hiding this comment.
Scopes the Windows updater feed to Windows releases; tests included. Approve-only — 870 lines spanning backend route policy + desktop, above the scoped-diff bar for an agent merge.
ZachL111
left a comment
There was a problem hiding this comment.
Requesting changes for one channel-integrity race. The selector fences stale feed-resolution responses, but an already-started beta download can outlive a beta opt-out and still be staged for installation. Details and a deterministic regression scenario are inline.
|
Independent review confirming the channel-integrity race @ZachL111 identified should be resolved before merge. With Suggested fix: generation-fence the The rest of the implementation is strong: client-side feed validation (origin/path/channel checks, fails closed), channel invariant modeling (stable never falls to beta; beta falls back to stable only when empty), and test coverage across backend + TypeScript are all well done. Holding on by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
d82ffbc to
512af59
Compare
Record the cross-platform updater selection contract and its backend/client regression guards for PR BasedHardware#10610.
Resolve stable and beta Windows release directories through the backend before each electron-updater check, then use the generic provider instead of GitHub's repository-wide latest release. Validate trusted feed URLs, fail closed on resolver errors, and serialize checks across live channel changes. Failure-Class: new
Record the cross-platform updater selection contract and its backend/client regression guards for PR BasedHardware#10610.
Register the public, read-only desktop update feed endpoint in the reviewed backend route policy manifest.
Failure-Class: FC-platform-unscoped-update-feed
Bind update checks, downloads, and staged installers to an immutable channel generation. Opting out now cancels the active beta download, clears an already-staged beta installer, and rejects delayed updater events. Tests: Windows updater Vitest suite (13 tests), Node and web typechecks, affected ESLint, and production electron-vite build. Failure-Class: FC-platform-unscoped-update-feed
c9fa275 to
2d6e2a2
Compare
kodjima33
left a comment
There was a problem hiding this comment.
Channel-scoped Windows update feed is the right fix for #10508 (GitHubProvider's repo-wide /releases/latest can hand a Windows client a macOS release); 1024 lines across backend + desktop is past the unattended-merge bar.
|
Thanks — confirmed the channel-integrity race from the earlier change request is properly resolved on the current head. What is now correctly handled:
Remaining items for the human maintainer before merge:
Keeping by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
…ardware#10610) * fix(desktop-windows): scope updater feeds to Windows releases Resolve stable and beta Windows release directories through the backend before each electron-updater check, then use the generic provider instead of GitHub's repository-wide latest release. Validate trusted feed URLs, fail closed on resolver errors, and serialize checks across live channel changes. Failure-Class: new * chore(failure-class): register platform-scoped update feeds Record the cross-platform updater selection contract and its backend/client regression guards for PR BasedHardware#10610. * chore(backend): declare Windows updater route policy Register the public, read-only desktop update feed endpoint in the reviewed backend route policy manifest. * fix(windows): cancel stale update downloads Failure-Class: FC-platform-unscoped-update-feed * fix(windows): generation-fence updater downloads Bind update checks, downloads, and staged installers to an immutable channel generation. Opting out now cancels the active beta download, clears an already-staged beta installer, and rejects delayed updater events. Tests: Windows updater Vitest suite (13 tests), Node and web typechecks, affected ESLint, and production electron-vite build. Failure-Class: FC-platform-unscoped-update-feed --------- Co-authored-by: 491034170 <[email protected]> Co-authored-by: Max Carter 祁明思 <[email protected]>
Windows builds since #10610 fail closed without /v2/desktop/update-feed/windows. Probe production before tagging so a missing backend deploy cannot mint another broken auto-update cohort. Failure-Class: new Co-authored-by: Cursor <[email protected]> Co-authored-by: multica-agent <[email protected]>
Windows builds since #10610 fail closed without /v2/desktop/update-feed/windows. Probe production before tagging so a missing backend deploy cannot mint another broken auto-update cohort. Failure-Class: new Co-authored-by: Cursor <[email protected]> Co-authored-by: multica-agent <[email protected]>
## Summary - Root cause of Windows auto-update breakage after v1.0.30: production is missing `/v2/desktop/update-feed/windows` (merged in #10610) while Windows clients fail closed without it. - Gate `desktop_windows_release.yml` on a production probe of that route **before** tagging, so a missing backend deploy cannot mint another broken cohort. - Register failure class `FC-ship-before-required-route` and document the deploy-before-ship contract. - Restore `--check-id` support in `run_checks.py` and the Windows portability manifest checks that #10825 dropped while `windows-preflight-portability.yml` still depends on them (fixes Native Windows process and launcher contracts). - Keep the Windows python-path detect bash-3.2-safe so macOS pre-push can source the harness resolver. Closes SCA-256 ## Test plan - [x] `python3 .github/scripts/test_probe_windows_update_feed.py` (8 passed) - [x] `python3 .github/scripts/test_run_checks.py` (40 passed) - [x] `python3 .github/scripts/run_checks.py --lane ci --base HEAD --head HEAD --platform windows --check-id check-manifest-contract --list` - [ ] CI green on PR #10883 ## Failure class Failure-Class: new ## Product invariants None matched by path globs for this change.
What changed and why
Fixes #10508.
The Windows app now resolves a channel-scoped Windows release directory through the backend and points
electron-updater's generic provider at that immutable feed before every check. This avoids GitHubProvider's repository-wide/releases/latest, which can select a macOS release in this multi-platform repository.Stable never falls through to beta; beta may fall back to stable while no beta release is available. The client validates the returned GitHub repository, Windows tag, and channel relationship, fails closed on resolver errors, and serializes checks across live channel changes.
OMI_UPDATER_DEV=1continues to use the developer-supplied feed.Each check, download, and staged installer is also bound to an immutable channel generation. Changing channels cancels or fences in-flight work, clears an installer staged by the previous channel, disables install-on-quit, and accepts
update-downloadedonly from the current version/channel attempt.Rollout note: deploy the backend endpoint before publishing a Windows build that contains the client change. Until then, that build intentionally fails closed instead of falling back to the broken repository-wide provider.
Product invariants affected
INV-BETA-1is preserved. This route is Windows-only and does not change the macOS beta identity, artifacts, or identity-aware appcast/download behavior; the full desktop update router regression suite remains green.How it was verified
python -m pytest tests/unit/test_desktop_updates.py -q-> 124 passed.npm test -- updater.test.ts updaterChannel.test.ts windowsUpdateFeed.test.ts-> 13 passed.npm run buildindesktop/windows-> node/web typecheck, Electron main/preload/renderer build, bytecode verification, and extension bundle passed.512af596efails because beta2.0.0remains staged after opt-out; current head clears it and rejects both pre-settlement and post-settlement delayed events.PYTHONUTF8=1 scripts/pr-preflight --pr-body-file ...in a Windows integration worktree with fix(ci): support Windows in manifest preflight #10594 and fix(preflight): decode Git content as UTF-8 on Windows #10595 applied -> all 22 selected checks passed.v1.0.1-windowsfor stable andv1.0.19-windowsfor beta.electron-updaterGenericProvider probe read versions1.0.1and1.0.19from those immutable release feeds without selecting a macOS tag.The full Windows Vitest suite was also attempted. Its unrelated baseline failures were reproduced on a clean main worktree: the bundled Node SQLite lacks FTS5, and a date-label assertion assumes an English locale while this machine uses
zh-CN.Tests
backend/tests/unit/test_desktop_updates.pycovers immutable trusted feed construction, stable/beta selection, beta-to-stable fallback telemetry, strict stable behavior, and non-cacheable success/error responses.desktop/windows/src/main/windowsUpdateFeed.test.tscovers endpoint requests, trust-boundary validation, failure handling, refresh behavior, and stale-channel races.desktop/windows/src/main/updater.test.tscovers the Windows-only production path, live channel switches, generation-fenced in-flight checks/downloads, beta opt-out after staging, delayed download events, fail-closed resolution, and the staged-install flow.Failure class (fixes)
Failure-Class: new
Failure-class transition narrative (only when needed)
The violated contract was that a Windows update check must resolve metadata from a Windows release in the requested channel. GitHubProvider's repository-wide latest-release lookup encoded neither platform nor Omi's release-channel semantics.
The new class is
FC-platform-unscoped-update-feed. Its canonical guard is the backend's existing paginated, cached platform/channel release resolver combined with a client-side trusted-feed validator before the generic provider runs. Regression tests exercise both sides, and live probes verify the currently published stable and beta Windows feeds.