Skip to content

Latest commit

 

History

History
337 lines (295 loc) · 20.3 KB

release-process.md

File metadata and controls

337 lines (295 loc) · 20.3 KB

Gateway MSIX release process

Use this guide to prepare and publish an OpenClaw Gateway MSIX release. It is a maintainer how-to: the release uses the reviewed release policy and ends when the GitHub Release and its transition evidence are available. For signing prerequisites, MSIX identity rules, and the identity examples, see the official signing setup in the README.

Release decision and policy change

release-policy.json controls source selection and package identity. The default follows the latest Gateway stable release; a new upstream release does not need a policy update. The following defaults describe stable releases; use the prerelease procedure for beta. Change policy in a reviewed pull request when needed:

Field Owner and purpose
repository The upstream OpenClaw repository that the package source must come from.
channel stable, resolved once per workflow run from public npm openclaw@latest.
stableVersion Optional exact stable version for an exceptional reviewed compatibility pin; omit to follow latest.
msixRevision The packaging rebuild number used to derive the MSIX and GitHub release identity.
packageIdentityName The Partner Center-reserved MSIX identity name.
packageFamilyName The expected Windows package family name for that identity and publisher.
publisher The expected MSIX publisher subject used by packaging and signing validation.
sideloadPackageIdentity The Azure-signable legacy identity used for signed GitHub Release packages and transition proof.

Keep repository, package identity fields, and publisher aligned with the reviewed release trust boundary. Set msixRevision to 0 for a new Gateway tag's first package; reset it in a reviewed change if a previous rebuild increased it. Increment it only for a packaging rebuild of the same Gateway tag. Do not assign a release tag or MSIX version by hand: scripts\Get-MSIXReleaseIdentity.ps1 derives them from the run's resolved Gateway tag and msixRevision.

Leave the workflow's openclaw_ref default empty when packaging should follow the stable source selection described in the README. To hot release a patched OpenClaw revision, set it to an upstream branch, tag, or full commit SHA. The payload is pinned to the resolved commit while package and release identity continue from policy stable, and the payload version must not be newer than that identity source. Set the optional gateway_version input to an exact stable version for a one-run payload rollback. The payload uses that older version, while package and release identity continue from the unmodified policy pin or npm latest so the MSIX remains an upgrade. Both verified sources are captured and replayed with the immutable snapshot; the input does not change release policy and must be older than the release-identity source. In test, Store, or official mode, an accompanying full-SHA openclaw_ref remains a commit assertion for that version-selected payload; branches and tags cannot be combined with gateway_version. The workflow also accepts signing_mode, whose choices are unsigned, test, store, and official. Select test for a credential-free release-candidate preflight, including the installed-upgrade matrix, from any branch. Select store to authorize and retain an unsigned Partner Center submission bundle without signing. Select official to retain that Store bundle and sign the separate sideload-identity packages for GitHub Releases. Following stable does not automatically publish: both modes still require a manual dispatch from main.

Publish a beta GitHub prerelease

Dispatch Build OpenClaw Gateway MSIX from main with:

Input Value
release_channel beta (stable remains the default)
signing_mode official
publish_release true
gateway_version Empty to resolve the matching public npm dist-tag, or an exact version such as 2026.9.8-beta.2
openclaw_ref Empty normally; with an exact version, only its full commit SHA is accepted as an assertion

The normal beta source is upstream openclaw@beta; leave both source inputs empty to follow it. For a packaging-only fix, select the same exact beta gateway_version and increment the reviewed msixRevision. This rebuilds that beta with the packaging changes without requiring a new upstream beta. Publication still requires manual dispatch; upstream beta releases do not automatically trigger this workflow yet.

Prerelease selection ignores the stable compatibility pin. The selected version must have the -beta.N suffix, an exact npm manifest, and a GitHub-verified signed annotated upstream Git tag pointing to the same package version. Missing channels or tags fail; they never fall back to stable. A ref-only override must also carry the selected preview suffix and cannot be newer than the separately captured channel release identity. The snapshot binds releaseChannel along with run ID, packaging commit, and signing mode; retries and signing replay it without resolving npm again.

The workflow signs the sideload x64, ARM64, and bundle assets through the same protected signing environment and pre-credential integrity checks as stable. It publishes <upstream-tag>-msix.<revision> with prerelease=true and make_latest=false. No moving beta tag is created. Verify those flags, the permanent tag, and all three signed assets after publication.

These are updates to the existing sideload package family, not side-by-side installations or an automatic updater. Install the preview explicitly. Return to stable by installing the matching final release or a newer stable release; an older stable package is a downgrade and is not a data-preserving rollback procedure. Store installations use a different identity and do not join this GitHub channel.

Sideload stable numeric versions remain unchanged. Sideload previews use year.month.(releaseSequence*100-1).previewRevision, where previewRevision is N*10+msixRevision. N must be 1..2999, with no leading zero; msixRevision remains 0..9. For example, v2026.9.8-beta.2-msix.0 is 2026.9.799.20, below stable 2026.9.800.0 and above all rebuilds of the preceding stable release. Packaging rebuilds precede the next beta number.

The nonzero fourth component is for sideload distribution only. Preview runs also produce Store-identity packages with the separate Store allocation. Published GitHub prereleases can feed the Development flight. signing_mode=store still rejects preview channels: use official and publish_release=true for that path. Microsoft reserves the fourth component for Store use (package version requirements). For an unsigned or temporary test-signed preview, use unsigned or test; unsigned runs retain development-version sideload artifacts; test runs use release-candidate versions and run all Store and sideload upgrade proof without publication.

Before stable dispatch

Complete this checklist before dispatch. Merge any needed policy changes to main first.

  1. Confirm the dispatch target is main and select signing_mode=store for a Partner Center submission or official for compatible Azure signing. Leave gateway_version empty to package policy/latest, or set the exact older stable payload required for this run. Confirm the resulting MSIX identity is newer than the installed production baseline. Leave openclaw_ref empty to select stable, or supply the OpenClaw branch, tag, or full SHA containing the patch. Release publication is still rejected when the packaging workflow itself is dispatched from any branch other than main. Keep publish_release=true for a new official release. Set it to false only when producing signed artifacts for an explicitly reviewed recovery.
  2. Confirm the policy selects the intended stable release identity and publisher. Check for an exceptional stableVersion pin and remove it in a reviewed change if the release identity should follow latest. The run records the exact upstream commit, selector, and version for both release identity and payload whenever openclaw_ref or gateway_version selects a different payload.
  3. Confirm the derived identity with scripts\Get-MSIXReleaseIdentity.ps1 rather than calculating a version or release tag manually. Use the README's identity guidance for the version scheme.
  4. Review the release-facing pull request titles. The published release notes are generated from merged pull request titles; CONTRIBUTING.md owns the required title format.
  5. Confirm relevant packaging changes have passed their pull request checks. A new upstream stable release needs no version-bump or validation-only pull request: the release dispatch runs test-msix-upgrades against its own source selection before authorization. Older pull request evidence does not replace that gate.
  6. Do not reuse or alter an accepted GitHub release tag. Update the latest production entries in scripts\msix-upgrade-baselines.json only in a reviewed policy pull request, using the verified digest of an immutable signed sideload release.

Dispatch Build OpenClaw Gateway MSIX from main in GitHub Actions with those inputs. A store or official run deliberately bypasses both the upstream package cache and the architecture-specific Windows dependency-tree cache, so its payload is rebuilt and revalidated.

For a preflight without release authorization or Azure credentials, dispatch signing_mode=test with the desired source inputs. It uses the derived release version and the same installed-upgrade matrix, then retains temporary test-signed packages. A later store or official dispatch repeats that proof against its own immutable source snapshot. unsigned dispatches and push builds keep development versions and skip installed-upgrade validation.

Watch the release workflow

The workflow first captures one immutable source snapshot in source-preflight. It selects exactly one caller: build-trusted for main/stable with cache-write access, or build-read-only for overrides, non-main, and pull requests. Both call .github\workflows\gateway-msix-build.yml, which inherits the caller's service-enforced cache cap without requesting a stronger mode. No signing secrets or OIDC capability enter upstream execution. The build job normalizes outputs and rejects missing, failed, cancelled, double, or wrong-route builds, and source identity mismatches. Documentation-only pull requests intentionally skip both callers.

The shared workflow builds the validated upstream package, then builds the expanded payload and unsigned MSIX separately for both x64 and ARM64. It creates Store-identity and sideload-identity packages for every release channel and architecture and composes a multi-architecture bundle for each channel with scripts\Build-MSIXBundle.ps1. Both channels use the same validated payload and independently derived package versions.

After every test-msix-upgrades scenario succeeds, and before publication or Azure credentials, authorize-signing runs scripts\Test-SigningInputs.ps1. It restores the same run's source snapshot and validates its workflow run ID, packaging commit, signing mode, workflow ref, Git ref, and event without resolving latest again. That recorded source supplies the expected upstream commit, payload version, and derived release identity. The check validates policy-controlled publishers and every selected package and bundle against those inputs. A later channel change or upstream tag deletion does not rewrite or revoke a captured source snapshot; stop the workflow rather than retrying it if that captured release must no longer be published. For official, only after all selected identity channels pass does sign-msix use Azure login. It signs only the sideload x64, ARM64, and bundle artifacts; the Store bundle remains unsigned for Partner Center.

Observe these workflow outcomes:

  • Exactly one build caller and the normalized build job succeed.
  • build-msix succeeds for both x64 and ARM64.
  • test-host, build-msix-bundle, and all 13 test-msix-upgrades scenarios succeed before authorize-signing. Missing or skipped required upgrade proof fails the final Gateway MSIX CI gate.
  • authorize-signing succeeds before Azure login and signing begins.
  • sign-msix verifies signatures and refreshes package metadata.

The upgrade matrix runs for versioning/source-selection pull requests and manual test, store, and official dispatches. It uses scripts\Test-MSIXUpgrade.ps1 with the immutable, hash-pinned release fixtures in scripts\msix-upgrade-baselines.json. It requires an isolated clean Windows account per scenario and refuses to run when an OpenClaw Gateway package is already registered. It exercises two explicit modes for every baseline and both standalone and bundle delivery in parallel:

  • Store identity reset: install a signed sideload baseline, write a LocalState marker, remove that identity, install the test-signed Store candidate, and prove the reserved package family has isolated LocalState. This remains the Store gate until Partner Center has distributed an authentic Store-signed baseline.
  • Sideload in-place update: install the same baseline, write the marker, update directly to the newer test-signed sideload candidate without removing the package, and prove the package family and exact marker are retained.
  • Store in-place update: install the published Store product by its Store ID, record the installed version after validating the reserved identity, require the candidate to be newer, write the marker, and update through the test-signed Store bundle. The package family and exact marker must survive.

Before approving a stable Store release, the release owner must confirm that the candidate version is newer than the version Microsoft Store currently installs. A missing or differently identified Store package is a hard failure. If no installed Store baseline exists, record that owner decision and retain the reset/fresh-install evidence. Do not substitute a developer profile or weaken the fixtures to make either check pass.

Publication and completion

After authorization succeeds (and GitHub publication succeeds for previews), retain-store-submission keeps the unsigned Store-identity bundle as the openclaw-gateway-msix-store-submission-<attempt> Actions artifact for 90 days. Microsoft signs it during Store ingestion; it is never a GitHub Release download. publish-release runs after sideload signing and creates the permanent GitHub release tag derived by scripts\Get-MSIXReleaseIdentity.ps1, generates release notes from merged pull request titles, and publishes the signed multi-architecture bundle plus signed x64 and ARM64 standalone MSIX assets.

After publication, verify the release has the derived permanent tag, generated notes, three signed sideload assets, and valid signatures. For stable, verify the retained unsigned Store submission bundle. For previews, verify that bundle and its current-attempt witness after GitHub publication. For every release, verify all successful identity-transition and in-place-upgrade evidence from that same release run. The proof and packages share the run's captured upstream source and derived release identity. Verify the bundle and both standalone packages are present; the bundle is the multi-architecture delivery, while the standalone packages support explicit architecture deployment. Keep the release workflow run, its immutable source snapshot, and its upgrade evidence available as the release record.

Failure and rollback boundaries

Never mutate an accepted release tag or a proof-release baseline to repair a failed release. If the upstream tag and accepted commit are unchanged and only packaging must be rebuilt, increment msixRevision in a reviewed policy change, then repeat the process with the exact same upstream tag and commit. If stable has moved, set gateway_version to the exact older stable payload for the rebuild; release identity still follows the unmodified stable selector. A longer-lived compatibility pin can remain in reviewed policy as stableVersion; remove it and reset msixRevision to 0 before publishing a new Gateway tag. A signing-authorization or upgrade-validation failure is a stop condition: correct the reviewed inputs or packaging defect, then dispatch a new compliant run rather than publishing partial artifacts.

Cache-boundary cutover

Versioning PRs exercise the cache service in the PR's own ref: a write-scoped job persists synthetic bytes, a read-scoped job restores them and attempts a save with a forged client mode, and the reusable build job directly requests write authority with its inherited read token. Every read-only reusable build runs this direct probe, including manual source overrides from main. The request must receive a service policy denial; an unrelated network failure is not passing proof. These checks do not establish main's cold/warm cutover or fresh CodeQL results. Official/store bypass the explicit package and payload caches, but setup-dotnet and nested upstream actions may still use caches under the caller cap. Unsigned/test arbitrary-source dispatches remain read-only even on main. The cache_write input merely avoids explicit save attempts; it is not the authorization boundary and cannot grant writes to a read-capped caller.

Package and payload keys use format 2 to exclude their pre-boundary entries. Implicit NuGet, upstream, and CodeQL caches still need the coordinated reset. Before trusting main caches under the hardened workflow, coordinate an authorized activation window: let legacy writers finish, prevent racing legacy restores/writes, re-enumerate main-scoped cache IDs, and invalidate only the approved IDs (including CodeQL caches). Do not release against legacy cache contents during this transition. A cold build costs a full rebuild; then verify a warm trusted build reuses caches and an arbitrary-source run cannot save, including attempts from upstream subprocesses with altered environment. Verify GitHub accepts the workflow keys and propagates the caller cap to reusable jobs, including implicit NuGet and upstream caches. If it rejects the configuration or enforcement cannot be shown, stop; an environment flag or a different cache key is not a substitute boundary.

Run fresh changed-revision CodeQL analysis before deciding alert outcomes. Cache alerts remain open unless the fresh scan closes them or separately authorized disposition is backed by actual platform denial evidence. Cache deletion, dispatch, alert disposition, signing, and publication are separate authorized operations, not part of local implementation validation.

GitHub Latest ordering

Signed GitHub publication queues in one repository-wide concurrency group. While holding that slot, the job compares the candidate with the current Latest release using the same MSIX version mapping Windows upgrades use. A delayed older build still gets its permanent release, but cannot replace a newer stable download as Latest; correction releases and packaging revisions retain their upgrade order. Previews never become Latest. Failure to read or recognize the existing stable Latest release fails closed. Finish older in-flight publication workflows before enabling the coordinated automatic caller, since those revisions lack this guard.

Store publication requests

See Microsoft Store publication for the central approval cutover, manual requests, the Development tester group/flight, activation, and recovery. The coordinated upstream handoff requests production for stable and Development for beta. Set request_store_publication=true with official and publish_release=true to opt in; manual builds default to no Store request. The completion-triggered adapter requests approval only after the entire release run succeeds, without holding the upstream request open. The central publisher owns activation and release-manager approval; this repository keeps the automatic and manual request adapter, not a Store API engine. Development activation still requires manual submission, certification, and tester install/upgrade proof.