Add hardened auto-update with immutable release notes artifacts#306
Open
Add hardened auto-update with immutable release notes artifacts#306
Conversation
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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.
This PR implements a production auto-update system for OpenNOW that checks GitHub Releases and prefers immutable versioned release-notes assets, with a full UI in Settings → Miscellaneous.
Main process:
electron-updaterlogic, maintains typed in-memory updater state (status, progress, release info), and broadcasts sanitized state to the renderer. Prefersrelease-notes-v<version>.jsonfrom the matching GitHub release tag, with graceful fallback to mutable feed notes.autoCheckForUpdates(default true) andskippedUpdateVersionsettings with backward-compatible defaults.Contracts and bridge:
UpdaterState,UpdaterStatus,UpdaterReleaseNotesSource,UpdaterDownloadProgress,ReleaseNotesArtifact, and extendsOpenNowApiwith updater methods and event subscription.UPDATES_GET_STATE,UPDATES_CHECK,UPDATES_DOWNLOAD,UPDATES_INSTALL,UPDATES_SKIP,UPDATES_CLEAR_SKIPPED, andUPDATES_STATE_CHANGEDchannels.onUpdaterStateChangedevent.Renderer:
updaterStatedown toSettingsPage.Packaging and workflow:
electron-updaterdependency, setselectronUpdaterCompatibility: ">=2.16"in build config, and keeps GitHub as the publish provider.*.ymland*.blockmapfiles (updater metadata). Generates an immutablerelease-notes-v<version>.jsonartifact from GitHub's generated notes payload and attaches it to the release; uses the same markdown for the mutable release body.Behavior:
autoCheckForUpdatesand run on a delay to avoid spam.