fix(desktop): gate updater by stable build identity / 按正式构建身份限制桌面更新器 - #10406
Merged
SivanCola merged 2 commits intoSep 16, 2026
Merged
Conversation
SivanCola
force-pushed
the
feature/desktop-updater-policy
branch
from
September 16, 2026 11:39
4f39cc9 to
f4bfba8
Compare
Problem: Desktop test and prerelease builds could still expose and invoke the production updater, while automatic checks could run on every focus or visibility event. Root cause: Updater availability was inferred from normalized configuration instead of immutable build identity, and automatic checks had no persisted throttle shared across lifecycle triggers. Fix: Gate every updater boundary behind exact stable channel and vX.Y.Z build identity, expose the capability through the Desktop RPC contract, hide updater controls for non-stable builds, rename the user-facing settings page to About, and persist a six-hour automatic-check throttle while keeping manual checks explicit. Verification: - cd desktop && go test -timeout 20m ./... - pnpm --dir desktop/frontend test:updater - pnpm --dir desktop/frontend test:app-lifecycle - pnpm --dir desktop/frontend typecheck - pnpm --dir desktop/frontend build - Windows x64 Electron shell packaging reached the unsigned NSIS stage in a Win11 ARM64 VM using x64 emulation; packaged installation validation was intentionally not performed.
Problem: The updater policy implementation added lines to three files already governed by repolint carry-forward budgets, causing the PR lint job to fail. Root cause: The new build policy, policy regressions, and startup settings contract were placed in existing oversized owner files instead of focused package-local files. Fix: Move the build capability helper, its regression tests, and the lightweight startup settings view into dedicated files without changing runtime behavior or the generated Desktop contract. Verification: - go run ./tools/repolint - cd desktop && go test -run 'TestDesktopUpdaterEnabledRequiresExactStableReleaseBuild|TestDisabledDesktopUpdaterBoundariesHaveNoSideEffects|TestDesktopUpdaterCapabilityAndConfigFailureDefaults|TestUpdaterReconcilesBeforeDownloading|TestHostContractFilesAreCurrent' ./... - cd desktop && go test -timeout 20m ./... - Desktop contract drift comparison passed - git diff --check
SivanCola
force-pushed
the
feature/desktop-updater-policy
branch
from
September 16, 2026 12:00
f4bfba8 to
6b129e7
Compare
Collaborator
Author
|
Author review summary (not an approval) Reviewed head Architecture and behavior:
Compatibility and security:
Verification:
Residual validation boundary:
The PR is technically ready for an independent maintainer review and merge. |
This was referenced Sep 17, 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
stablechannel plus an exactvX.Y.Zrelease versionupdaterEnabledthrough the Desktop startup/settings contract and default missing or invalid frontend values to disabledupdatesroute for compatibilityCompatibility
config.tomlschema or persisted user preference migrationupdaterEnabledfield or startup-settings failure as disableddesktop.check_updatespreference remains intact for users returning from a test build to a stable buildSecurity and privacy
Related PR
UpdateBanner.tsx; this PR addresses the same repeated-network-check symptom at the shared updater scheduling boundary with a persisted six-hour throttle, while also covering startup, timers, remounts, manual bypass, and build-level updater disablementVerification
cd desktop && go test -timeout 20m ./...pnpm --dir desktop/frontend test:updaterpnpm --dir desktop/frontend test:app-lifecyclepnpm --dir desktop/frontend typecheckpnpm --dir desktop/frontend buildPackaged installation validation was intentionally not performed for this PR.
Documentation-impact: none - the user-facing behavior and explanatory copy are updated in the About settings surface; no external configuration schema or release procedure changes.