OpenProgram Docs

Stable release automatic updates

An update is a complete stable GitHub Release verified against its manifest. New commits are not updates. The update unit is the whole product: wheel, Web, Programs, OCR, Browser and models are never updated separately. The macOS App and terminal installs take a whole package; Windows and Linux Apps take a signed sealed version.

An App that can replace itself downloads and checks the release in the background, then shows New beside the sidebar wordmark; one click on Restart to update swaps it in.

From Release to platform

GitHub latest non-draft, non-prerelease vX.Y.Z Release gate unique assets Manifest gate version, bytes, SHA-256 install type + architecture Desktop macOS · Windows, Linux when the shell changes 1 Select the exact installer 2 Stream to a resumable .part file 3 Verify bytes and SHA-256 4 Windows: Authenticode check for this App's line 5 Prepare, then Restart to update; or open installer Managed CLI and server macOS · Linux · Windows 1 Fetch installer from the immutable tag 2 Verify archive and capability manifest 3 Version probe, isolated worker cold start 4 macOS, Linux: switch current Windows: replace launchers 5 The user restarts a running worker
  1. GitHub latestNon-draft, non-prerelease, vX.Y.Z
  2. Release gateUnique assets
  3. Manifest gateVersion, bytes, SHA-256
  4. DesktopmacOS; Windows and Linux when the shell changesSelect the exact installer; stream to a resumable .part file; verify bytes and SHA-256; on Windows check Authenticode for this App's line; prepare it and offer Restart to update, or open the installer where the App cannot replace itself
  5. Managed CLI and servermacOS, Linux, WindowsFetch the installer from the immutable tag; verify archive and capability manifest; version probe and isolated worker cold start; macOS, Linux: switch current; Windows: replace launchers; the user restarts a running worker
Install typePath
managed_releaseThe route above. Immutable markers take precedence
source_checkoutExplicit Git ref: preflight, checkout, dependencies and build, probe, restart. Never shown as a stable Release
unknownStable error pointing to the official installer or a source checkout. PyPI, binary and Git paths are not guessed

openprogram upgrade applies; --check reports current and latest read-only; --dry-run prints the plan. pip_wheel is not an install type: developer wheels are build inputs only.

Desktop installers

PlatformAsset
macOSA Developer ID App in a writable folder unpacks OpenProgram-<version>-mac-<arch>.zip in its data folder and keeps the copy only if codesign --verify --deep --strict passes, the team is its own and the version is the release's. On restart a detached shell waits for the App to exit, swaps the bundles with two renames (undoing the first if the second fails) and opens the App
macOS, otherwiseA local build (no team), a translocated or read-only App, or a release without the .zip: -mac-<arch>.dmg, then -unsigned.dmg, saved where the user picks
WindowsOnly when the release needs a newer shell: OpenProgram-<version>-win-<arch>.exe, or -unsigned.exe on an App built unsigned. Downloaded to the App's data folder and checked; Restart to update quits and runs it with /S --updated --force-run, which installs silently and starts the new App
Linux debOnly when the release needs a newer shell. The App sits under /opt, which it cannot write, so it replaces nothing itself: the .deb is saved where the user picks and opened with the system's package installer, which asks for the administrator password
Linux AppImageOnly when the release needs a newer shell. Downloaded beside the running file, verified and made executable; Restart to update renames it over the running file in one step, and the App restarts from the new one. In a folder it cannot write, the file is saved where the user picks

Settings → Versions and updates → Application

StateShows
Not checkedCache absent or expired. Automatic checks default on
CheckingAll windows share one in-flight Promise. Check button disabled
Up to dateSame or lower version. Stable downgrades are not offered
Update availableVersion, date, plain-text notes summary. Full notes open only the fixed GitHub Release page
DownloadingBytes and percent, published at most every 250 ms, with a guaranteed final state
ReadyDownloaded, checked and prepared; readyVersion names it. Settings shows Restart to update, the sidebar shows New beside the wordmark with the same action and the release page, and the App menu (File on Windows and Linux) gets Restart to Update to X. The menu says when a task is running, since the new App restarts the worker. A later check of the same release keeps it ready
Retryable errorKeeps verified release metadata, so retry needs no new check. errorKind is rate-limited, network or failed
Not publishedA newer release exists with no file for this computer. The current App keeps working

Plain Web shows the CLI instruction instead.

Scheduling

Automatic checks discover; on an App that can replace itself they also download and prepare the release, at start too for one found before the last quit. Nothing is installed until the user restarts. Manual checks always refresh. Development mode does not check automatically.

WhenNext check
App start (packaged)30 s later, or the cached due time
After successlastSuccessAt + 24 h
After failurelastAttemptAt + 6 h
Resume or settings changeClear the old timer, check at most once, reschedule
update-state.json

Schema 1. Holds automaticChecks, lastAttemptAt, lastSuccessAt and the latest verified release metadata. Written with a temporary file and rename; POSIX sets the mode, Windows inherits the user-directory ACL.

Invalid JSON, unknown schemas, future timestamps, version or architecture mismatches and missing releases are normalized and rewritten. A write failure must not leave hidden in-memory setting changes.

Trust boundaries

BoundaryRule
GitHub responsesUntrusted. HTTPS, fixed hosts, at most 5 redirects validated per hop, size limit, 30 s request timeout, 60 s download idle timeout. Requires draft === false, prerelease === false, tag vX.Y.Z, unique asset names and manifest basenames, GitHub size equal to manifest bytes.
Network pathChromium's network stack, so the system proxy applies. On API 403, 429, 5xx or no answer: the releases/latest redirect plus release-manifest.json. If that fails too, an optional update-source.json, only with an Ed25519 signature from a built-in key
Renderer IPCExposes only state, check, boolean settings, download, open release, subscribe. Accepts no URL, path, hash, repository or command. Public state strips asset name, URL and SHA-256. Closing a window aborts nothing
Downloaded filesRandom exclusive temporary files, short writes handled, deleted on any mismatch. CLI verifies in a new version directory and rejects archive path traversal. A launcher failure keeps the old current
Signed Windows lineA signed App accepts only an installer with a valid Authenticode signature from its own publisher: the same certificate, or the same subject after a renewal. The publisher comes from the App's own file. If that read failed or timed out, or the App's signature is damaged, it is read again before the comparison; with no publisher known, the installer is refused
Unsigned Windows lineAn App built unsigned accepts an installer that is NotSigned and matches the size and SHA-256 in release-manifest.json. That catches a damaged, truncated or substituted download. It does not prove the publisher: the manifest is unsigned and trusted through HTTPS to the fixed hosts, so whoever can publish a release there can publish an installer. A signed App never takes this line
What the update signature coversupdate-manifest.json.sig covers the version-store files: version, base, toolchain and repo.bundle. It does not cover App installers or release-manifest.json
Installer child processPinned repository and version. Allowed environment only: PATH, HOME, temp, locale, proxy, XDG, OpenProgram state. No provider or API credentials, no archive or checksum overrides. --json emits one JSON document

Failures

What happenedResult
Offline, timeout, rate limitFalls back to the web route first. Automatic: record and back off 6 h. Manual: retryable error with a plain reason. The App keeps running
Invalid Release or manifestRejected before download. No fallback to a wheel, source archive, other architecture or older version. The last valid metadata may stay
Stall, size, hash or Windows signature errorA dropped download retries and resumes through its .part file, across restarts. A size, hash or signature mismatch deletes the file and restores retry. An unverified file is never opened
CLI archive, cold start or launcher failureNon-zero exit before the final switch. The previous version stays selected (current on macOS and Linux, launchers on Windows)
Switch done, worker still oldThe command says so and prints the restart instruction. Running requests are not interrupted
References
ReferenceUse
GitHub Releases APIAdopted for metadata, notes and assets; clients still validate independently
Electron update lifecycleAdapted: check, available, download, ready, restart to install, error
Electron autoUpdaterNot used. No built-in Linux updater, and the swap it does on macOS (Squirrel) is a few lines here, held to the manifest's hash and the running App's team
electron-updaterNot used. No new updater package: Electron, Node, Python and shell cover it
Code
FileHolds
update-service.jsMetadata, state, cache, scheduling, asset selection, download, hash, public projection
app-replace.jsReplacing the App on restart: macOS unpack, signature and swap; silent NSIS; AppImage rename
windows-signature.jsAuthenticode status, subject, thumbprint
apps/desktop/main.jsTimer, resume, IPC, multi-window broadcast
main/preload.jsFixed renderer bridge
general-section.tsxSettings states and Web fallback
update-badge.tsxNew beside the wordmark and its restart menu
commands/updates/upgrade.pyInstall-type routing, Release gate, dry-run, JSON, installer execution
github_release/github.pyStable metadata, manifest, immutable installer retrieval
scripts/install-release.sh, .ps1Published compatibility entry points; fetch the real installer from the same tag
scripts/release/install-release.sh, .ps1Download, verify, cold start, launcher staging, atomic activation
official/assets.pyRelease asset format: packing, signing, verification, unpacking
official/replay.pyReplays the owner's commits onto a verified release and drops them on failure
create-update-assets.pyBuilds one platform's assets and finalizes the signed release directory
release.ymlArtifact publication and the latest-endpoint gate

Official updates on a version store

An installation on the version store updates from signed release assets and replays the owner's own commits onto the release.

PartRule
AssetsEvery release publishes version-<platform>.tar.zst, base-<platform>.tar.zst, toolchain-<platform>.tar.zst, repo.bundle, SHA256SUMS and update-manifest.json with its Ed25519 signature, so a machine that skipped releases can still update. A client downloads only what it lacks: a base it already holds is skipped, and the toolchain is fetched only for owner commits to build. The version archive leaves out the venv's links and the seal, because they name the build machine; unpacking recreates the venv with the build's own command and seals the version here
FetchBare openprogram upgrade resolves the latest release, verifies manifest, signature and sums in memory, then downloads this platform's files to <runtime>/downloads/<release>, each held to its signed size and hash, resuming on the next run. --from <directory> applies files already on the computer
VerificationSignature before the manifest is parsed, sums against the manifest, each asset this platform uses against the sums. The bundle moves refs/heads/release forward only, so an older signed release cannot replace a newer one. A build with no trusted key accepts no release
ReplayThe owner's commits are release..local, so the squashed official line is enough. Oldest first, each is cherry-picked in work/official-<release>. A conflict is saved to unreplayable/<release>/ and the others continue. A commit the release already has is skipped. The candidate builds on the release's own version, so an untouched Web bundle is cloned
FailureA build or trial failure saves the newest commit and tries the rest, at most 5 retries before going straight to the unmodified release. Lack of disk drops nothing. A failed switch does not retry. A release needing a shell_compat or Python minor outside the installed shell waits for the shell update and moves nothing

Implementation status

PartStatus
Desktop pathImplemented. npm run check --workspace apps/desktop. Windows and Linux routes are tested with stand-ins; never exercised on a published release
Managed CLI pathImplemented. pytest tests/component/config/test_formal_release_updates.py tests/component/config/test_distribution_release
Security and failure pathsVerified. apps/desktop/tests/self-update/check-update-service.js
Release gateEvery stable release passes runtime, CLI, Desktop, manifest and checksum checks before publication. These prove what was published, not behaviour on a running client
Installed clientOpen: the background download, the macOS swap and the silent Windows install on a real install of a published release; long runs and sleep/resume, operated on a real install; Authenticode with a real certificate on an official runner; real GitHub responses, a real proxy
Version-store assets and replayImplemented, tested with a local directory as the release source. pytest -q tests/component/self_update/official/test_replay.py
Version-store release pathImplemented and passing end to end on macOS against a local server imitating GitHub (update, resume, go back, refusals). Installed copies trust the official signing key. The Release workflow has published signed update files for Linux only, in v1.1.0; its macOS and Windows asset steps failed in that run and have not run since. Linux activation needs one more run
Upgrading from v0.6.6 or earlierNo updater before v0.7.0: install the current DMG once by hand. CLI and server rerun the public installer once

Out of scope: Windows sandboxing, PyPI product installation, replacing a running App while it runs: the swap happens only on Restart to update.

Last updated · 2026-11-25