The centered Check for updates button in the Settings header checks the newest stable release from this project’s GitHub releases. There are no automatic checks. Python 3.12 or newer, HTTPS access and a normal versioned ARM64 installation are required to install. The feature uses Python’s standard library and adds no service or listening port.
If the published version is equal to or older than the running version, the button says You are on latest version for five seconds, then returns to Check for updates. Versions are compared numerically, so 0.10.0 is newer than 0.9.0. Drafts and prereleases are excluded.
When a newer stable release is available, Download and install update stays available until the process exits, including across closing/reopening Settings. Pressing it starts the update. Checking alone never downloads or installs a package. During an operation, duplicate presses do nothing. If checking or preparation fails, Update failed. Try again appears for five seconds, with a short reason in the Settings status line. Reasons distinguish network errors, GitHub request limits, checksum failures, another installer, disk/permission errors and invalid packages. A known update remains offered after a failed install.
A private helper handles all network, hashing, archive and installation work. The VR loop exchanges bounded nonblocking packets and keeps rendering/input responsive. Requests go to the fixed public GitHub repository over certificate-verified HTTPS, without credentials or proxy-environment forwarding. Asset URLs must match the exact release/tag/name. Redirects are restricted to HTTPS GitHub release download hosts. Requests, sizes and unpacked files are bounded.
Each stable release must publish framekeyboard-VERSION-aarch64.tar.gz and SHA256SUMS. The helper requires exactly one checksum entry for that exact archive and verifies SHA-256 before extraction. If GitHub also provides an asset digest, it must agree. This trusts the project’s GitHub release and protects against download corruption; it is not a separate signature system.
The current updater accepts GitHub release publishing access as its trust boundary. Someone who can publish a release can provide both a different archive and matching checksums; the API digest is not an independent approval of that publisher. HTTPS and checksum verification do not protect against that case. Independent release signing is deferred. Adding it would require a separately protected signing key, a public key trusted by installed clients, and a backup, rotation and migration plan. Verification would need to succeed before extraction or activation.
Extraction rejects traversal, absolute paths, links, devices, duplicate names and special permission bits. Before closing the keyboard, the helper takes the existing installation lock, extracts into a private directory under the installation’s releases/, verifies the AArch64 ELF binaries, checks the package version and validates copied profiles with an isolated configuration. No downloaded installer script is executed.
The keyboard then releases held input, withdraws native replacement, saves settings/placement and closes VR and its instance lock. Only an explicit handoff after cleanup authorizes activation. Merely closing/crashing the app cancels unfinished work. The helper waits for the original process to exit, snapshots the saved config and placement, atomically updates current, and starts the new executable with the original launch options and the new data directory. The new process acknowledges three seconds of completed-loop progress through a private inherited socket. A gap over one second resets this probation. Hidden panels count normal idle loops, so a closed dashboard or unavailable native replacement cannot prevent confirmation. The helper allows 45 seconds for startup. If startup fails or times out, the helper terminates only that new child, restores current and saved preferences and relaunches the old executable. Confirmation covers this startup interval, not every later interaction; native replacement retains its independent fallback rules.
User settings, placement, custom profiles, launchers, desktop entries and autostart are preserved. After startup confirmation and any required service adoption, the helper removes the replaced production release and this update’s config/placement snapshot. Cleanup failure leaves the new app running and reports remaining files in update-status.log; it never rolls back a confirmed process. Failed updates retain their snapshots under update-backups/ for recovery. Manual rollback means reinstalling an older release package.
Production installers and updaters mark their release directories with a root/name-bound ownership record. Cleanup refuses the active current, symlinked releases, and directories without a matching marker, including development deployments and releases installed before this policy. No previous link is created or updated; a leftover link is removed only when it names the marked release just deleted. Automatic installations use a unique version-prefixed release directory, so an existing installation is never overwritten. Short, fixed results and failure codes are saved to ~/.local/share/framekeyboard/update-status.log, including check/download/validation failures before restart. Failure reporting also uses normal stderr, including for launches outside a versioned installation. Exception text, URLs, network responses, input text and clipboard content are never included in these reports.
The helper and any restarted app inherit the original app’s stdout and stderr destinations. An update therefore preserves normal launcher or terminal logging, including after rollback. Stdin remains disconnected, and no additional log service or debug interface is installed.
The boot-only --autostart option is omitted from update, rollback and failed-handoff restarts. These are explicit user-requested launches, so turning off Start with SteamOS or replacement during a session cannot prevent them from starting. Saved startup preferences and the session unit are preserved.
A prepared update closes the outgoing replacement request without reopening Steam’s keyboard. A service-managed successor starts hidden while replacement remains enabled, confirms startup in the background and waits for a fresh keyboard request. This presentation policy is separate from boot opt-in, so disabling Start with SteamOS does not block an update or rollback. Manual updates, and updates with replacement disabled, still show the panel. Quit, disable and failures retain native recovery.
Updates initiated by published 0.8.0 or earlier still use that version’s outgoing cleanup, which can reopen native once. Dismiss it; the next request can summon Full Keyboard. Installing a fixed successor cannot change the code that the old version already ran.
When running under the optional startup service, cleanup still releases VR, input and the instance lock before handoff, but the original service process stays alive. The helper verifies that the service owns that process, launches the candidate and waits for the same sustained startup confirmation. It then uses the user manager’s local notification socket to transfer MainPID to the confirmed successor and checks that the manager accepted it. Only then does the original process exit. The startup unit accepts notifications from its own service processes; no network port is involved. A failed candidate is terminated and rollback applies the same adoption check to the previous release. If neither child can be adopted, both are stopped and the original main process restarts its own still-known binary. Manual launches retain the ordinary exit-then-launch protocol.
In-app updates preserve the existing launcher and desktop entry and restart with the current launch arguments. They do not apply changes in a newer install script. Release preparation must verify compatibility with older launchers; see the release checklist. Manual installation refreshes the generated launcher and desktop entry.
Offline tests use fake release metadata, capture channels and disposable installs. They cover numeric comparison, exact checksum matching, hostile archives, architecture/profile rejection, install locking, cancellation, restart acknowledgement, startup failure/rollback and button timing. Real download checks and ARM64 runtime validation are separate from those offline fixtures. A future release is needed for normal in-headset upgrade acceptance; changing the version is reserved for the project owner.
Rollback attempts link repair, each saved preference and the old executable independently. A file error does not skip the other recovery steps or the old-app restart. The downloaded archive is removed first to free space; the promoted release is removed only after current is confirmed to name the old release. If writes remain unavailable, the new target is retained so the launcher never points at a deleted directory, and the helper directly starts the known old binary. The fixed status log reports incomplete recovery writes; preference backups remain available for repair.
Once the original app has exited, termination signals are deferred until activation commits or rollback finishes. They are then replayed outside the recovery handler. Child processes retain normal signal handling. Acknowledged startup commits the new release before optional cleanup and status logging, so a late stop cannot delete its files or relaunch the old app while the new process owns the instance lock.