Skip to content

fix(release): publish extended-stable Docker channels safely - #112494

Merged
RomneyDa merged 12 commits into
mainfrom
fix/docker-extended-stable-channels
Jul 23, 2026
Merged

RomneyDa merged 12 commits into
mainfrom
fix/docker-extended-stable-channels

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Jul 22, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

OpenClaw had one Docker alias path for every final release. A trailing-month extended-stable release at patch 33+ could therefore move the normal Docker latest/main aliases. The release and repair paths also needed stronger protection against reordered releases, source-tag changes between verification and promotion, partial multi-platform images, and unsafe manual alias repair.

This PR adds a distinct extended-stable Docker channel and makes channel promotion a verified operation performed only after version-specific images are published.

What This PR Changes

1. Creates one shared release-version policy

  • Moves release parsing, comparison, and the June 2026 patch-floor check out of the npm-only module into scripts/lib/release-version.mjs.
  • Classifies releases as alpha, beta, regular stable, extended-stable, or an unsupported extended-stable correction.
  • Defines final patch 33+ as extended-stable; correction suffixes such as 2026.6.33-1 are rejected on that line.
  • Updates npm planning, npm publish validation, npm provenance checks, official plugin publication, Android/iOS version helpers, release preparation/preflight, and upgrade-baseline selection to use the shared policy.

2. Defines the Docker channel mapping explicitly

Release Docker behavior
Alpha Docker publication remains disabled.
Beta Publishes version-specific tags only; moves no channel alias.
Regular final/correction below patch 33 Promotes latest/main, slim/main-slim, and latest-browser/main-browser.
Extended-stable final at patch 33+ Promotes only extended-stable, extended-stable-slim, and extended-stable-browser.
Extended-stable correction suffix Rejected.

The same mapping is applied to both ghcr.io/openclaw/openclaw and docker.io/openclaw/openclaw.

3. Separates Docker image publication from channel promotion

  • Docker Release first publishes version-specific default, slim, browser, amd64, and arm64 tags to GHCR and Docker Hub.
  • Moving aliases are no longer mixed into manifest creation.
  • The workflow verifies SBOM and provenance attestations for the published multi-platform and architecture images.
  • Only an automatic non-beta tag release proceeds to channel promotion; a manual image backfill publishes the requested version tags without silently moving aliases.

4. Adds one promotion owner

  • Adds scripts/docker-channel-promote.mjs and its typed declaration.
  • Resolves every required source tag to a digest before the first alias write.
  • Verifies attestations against those digest references, then promotes those exact same digests so a tag change cannot swap the content between verification and promotion.
  • Confirms amd64 and arm64 both report the requested release version and rejects mixed-version indexes.
  • Verifies every resulting alias resolves to the expected source digest.
  • Preflights all required variants and registries before writing, preventing a missing source from leaving a partially promoted channel.

5. Prevents automatic rollback

  • Reads the current release version behind each existing alias on both amd64 and arm64.
  • Allows equal-version reruns and forward promotion.
  • Rejects an older candidate before any alias write.
  • Treats a genuinely absent alias as a first promotion, while authentication, parsing, and other registry failures still fail closed.
  • Exposes --allow-rollback only for the separately approved repair workflow.

6. Adds an approved alias-repair workflow

  • Adds Docker Channel Promotion for repairing aliases from an existing stable or extended-stable tag without rebuilding images.
  • Requires dispatch from current main, validates the tag, and checks out trusted promotion tooling.
  • Keeps docker-release environment approval outside the queued writer so a pending human approval does not block a normal release.
  • Logs into both official registries, runs the same digest/attestation/version checks as automatic promotion, and records that rollback was explicitly approved.

7. Serializes Docker publication and alias mutation

  • Automatic Docker tag releases and the mutation phase of approved alias repair share the docker-release-publish concurrency group.
  • Publication is queued instead of cancelling another release midway through registry writes.
  • Manual image backfills retain a tag-specific group because they do not move channel aliases.

8. Keeps npm extended-stable boundaries aligned

  • Final patch 33+ may publish only to npm extended-stable.
  • Regular final/correction releases below 33 continue using the existing beta/latest path.
  • Extended-stable correction suffixes remain invalid.
  • Protected main must be on a later calendar month and a regular patch below 33 before the extended-stable core publish is accepted.
  • Official plugin and provenance workflows now track the shared release-version policy as an input.

9. Updates maintainer and public release guidance

  • Describes extended-stable as the Gateway distribution: the openclaw npm package, all npm-publishable official plugins, and matching Gateway Docker images.
  • Explicitly excludes the macOS app, Windows Hub, mobile apps, GitHub Releases, ClawHub packages, private dist-tags, and website artifacts.
  • Documents the exact branch/SHA/tag identity requirements, candidate validation, signed tag creation, plugin/core publication, Docker publication, alias verification, and alias-only repair path.
  • Requires maintenance branches to carry the complete Docker channel implementation from current main, including policy, promoter, workflows, and tests.
  • Updates Docker installation docs to list the three extended-stable aliases.

10. Adds regression and workflow-structure coverage

  • Tests release classification and Docker alias policy for alpha, beta, regular stable, extended-stable, and rejected corrections.
  • Tests both registries and all default/slim/browser variants.
  • Tests missing sources, first promotion, equal/newer/older candidates, approved rollback, registry failures, mismatched platform versions, changed source tags, digest-bound attestation checks, and post-promotion digest verification.
  • Parses workflow YAML to verify trusted checkout refs, job dependencies, approval placement, permissions, concurrency, verification ordering, and the single alias-writing path.
  • Adds changed-test routing and declaration-mirror coverage for the new shared modules.
  • Updates CI scoping so changes to shared release-version logic still trigger the affected iOS/release tests.
  • Adds narrow Actionlint configuration for GitHub's workflow concurrency queue field.

User Impact

  • Regular Docker users stay on the normal latest/main release line.
  • Extended-stable Docker users get dedicated default, slim, and browser aliases in both official registries.
  • Beta publication cannot move stable aliases.
  • Reordered or repeated automatic releases cannot move a channel backward.
  • Maintainers can repair an alias from an existing release tag through an approval-gated workflow without rebuilding the release images.
  • Promotion stops before mutation when source images, attestations, platform versions, registry access, or version ordering are invalid.

Evidence

@RomneyDa
RomneyDa requested a review from a team as a code owner July 22, 2026 03:46
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts docker Docker and sandbox tooling size: M maintainer Maintainer-authored PR labels Jul 22, 2026
@RomneyDa

RomneyDa commented Jul 22, 2026 •

Copy link
Copy Markdown
Member Author

Updated the Docker release fix at 34bb10c1ccde99633e988294e07026ff2a67d760 after the strict maintainability review.

  • Centralized .33+ release-train classification across npm planning/boundaries/provenance and Docker policy.
  • Added required SBOM/provenance verification for all six immutable GHCR/Docker Hub source variants before the first alias write.
  • Replaced substring workflow checks with parsed YAML job-graph/order assertions covering trusted checkout, approval, permissions, concurrency, attestation ordering, and the sole package writer.
  • Replaced the handwritten CLI parser with node:util.parseArgs and reused the canonical direct-run helper.
  • Preserved the testing-only pre-.33 bypass while explicitly proving it still rejects correction suffixes.

Proof:

@RomneyDa
RomneyDa force-pushed the fix/docker-extended-stable-channels branch from 34bb10c to 0def167 Compare July 22, 2026 05:51
@RomneyDa

Copy link
Copy Markdown
Member Author

Bug-focused review of 869c5d8b4d49f1521ecf8e1331c78c1d333dea9f: the shared release classifier and dedicated alias owner are the right design, but I found two release-safety issues that should be fixed before merge.

  1. Automatic promotion can move a channel backward. .github/workflows/docker-release.yml:21 serializes tag runs, but scripts/docker-channel-promote.mjs:69 overwrites the moving aliases without checking their current release version. A later or reordered v2026.7.1 run after v2026.7.2 leaves latest/main on the older release. Please make automatic promotion monotonic with scripts/lib/release-version.mjs:172; reserve rollback for the approved repair workflow behind an explicit override, and test older/equal/newer candidates.

  2. The attestation check is not bound to the promoted digest. .github/workflows/docker-channel-promote.yml:165 verifies :${VERSION}, then scripts/docker-channel-promote.mjs:75 resolves the tag again. Manual backfills use a different concurrency group at .github/workflows/docker-release.yml:22 and rewrite those version tags, so a same-version backfill can replace the source between verification and promotion. Resolve the source digests once, verify those digest references, and promote the same digest plan—or serialize every version-tag writer with promotion. Add a source-tag-drift test proving the replacement digest cannot be promoted.

The public docs wording and incomplete maintenance-branch copy instruction were corrected in 869c5d8b4d4: the scope is now the Gateway distribution, explicitly not the macOS app, Windows Hub, mobile apps, GitHub Release, ClawHub, or website downloads.

@RomneyDa

Copy link
Copy Markdown
Member Author

Fixed both release-safety findings in ecc07ba7a36f38ee6910965c1634bc720ce5e24f.

  1. Automatic promotion now reads both amd64 and arm64 release labels from every existing target alias and rejects an older candidate before the first write. Equal/newer candidates remain idempotent; only the environment-approved repair workflow passes --allow-rollback.
  2. Promotion now resolves every source digest once, verifies attestations and both platform version labels against those digest references, and writes those exact same digests. The source-tag-drift test changes the tag result after verification and proves the replacement digest is never promoted.

Current-head proof: 31 focused assertions passed; targeted Oxlint/Oxfmt, Actionlint, Zizmor, docs links, workflow policy checks, and git diff --check passed. The exact Buildx platform lookup also succeeded live for both a tag and its resolved digest. Final Codex autoreview is clean with no actionable findings. Exact-head PR CI is running at https://github.com/openclaw/openclaw/actions?query=branch%3Afix%2Fdocker-extended-stable-channels.

@RomneyDa RomneyDa changed the title fix(release): isolate extended-stable Docker aliases fix(release): publish extended-stable Docker channels safely Jul 23, 2026
@RomneyDa
RomneyDa merged commit 74cc99f into main Jul 23, 2026
129 checks passed
@RomneyDa
RomneyDa deleted the fix/docker-extended-stable-channels branch July 23, 2026 01:03
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 23, 2026
…w#112494)

* fix(release): isolate extended-stable Docker aliases

* fix(release): harden Docker channel promotion

* docs(release): pin Docker policy into tagged tree

* refactor(release): isolate Docker channel promotion

* fix(release): queue Docker publications

* fix(release): harden docker channel promotion

* docs(release): tighten extended-stable guidance

* fix(release): promote Docker aliases after verification

* chore(release): format maintainer instructions

* refactor(release): separate release version policy

* docs(release): clarify extended-stable gateway scope

* fix(release): harden Docker channel promotion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling docs Improvements or additions to documentation maintainer Maintainer-authored PR scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant