Skip to content

Commit d214622

Browse files
authored
feat(update): support extended-stable package updates (#99811)
* feat(update): add extended-stable channel contract * feat(update): implement extended-stable package flow * docs(update): document extended-stable behavior * fix(update): preserve extended-stable preflight guarantees * fix(update): reject extended-stable Git repair * fix(update): support loopback extended-stable canaries * fix(update): preserve scoped package roots
1 parent fe3215c commit d214622

36 files changed

Lines changed: 1271 additions & 112 deletions
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
f5e127927b1810ec9769f43ed15fbabde4c79a8778cc486e12119527df9b5ebb config-baseline.json
2-
4c98c716bc78e65c274ec374757357c1dcc9b5ec75c9e00ea4c20851531b7d1a config-baseline.core.json
3-
c68853362689981ac1cc1e55b9061286c2002104ff1c10bc44ee99a6080e169e config-baseline.channel.json
4-
4721a543fc05a2dee5d6af676a145069adf7849fe50e18c12a8515f9d9fe8b73 config-baseline.plugin.json
1+
55ea9b0a302df9328014e2607f65936358cdd301ea8a48046da4a8200cc77746 config-baseline.json
2+
21d36ba961186f567c0505e7443044fe08573ac1125cdd89e2a0e5b0fa93256a config-baseline.core.json
3+
d27ac1e30c6f3ef7292f33ad9737d4372dd140675293cbddc38364e476f06410 config-baseline.channel.json
4+
e228f29f17758763a098b0ccd10c6db7fc9df84840437ed3f88a88cf945b8078 config-baseline.plugin.json

‎docs/ci.md‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ Use `Package Acceptance` when the question is "does this installable OpenClaw pa
325325

326326
### Candidate sources
327327

328-
- `source=npm` accepts only `openclaw@beta`, `openclaw@latest`, or an exact OpenClaw release version such as `[email protected]`. Use this for published prerelease/stable acceptance.
328+
- `source=npm` accepts only `openclaw@extended-stable`, `openclaw@beta`, `openclaw@latest`, or an exact OpenClaw release version such as `[email protected]`. Use this for published extended-stable, prerelease, or stable acceptance.
329329
- `source=ref` packs a trusted `package_ref` branch, tag, or full commit SHA. The resolver fetches OpenClaw branches/tags, verifies the selected commit is reachable from repository branch history or a release tag, installs deps in a detached worktree, and packs it with `scripts/package-openclaw-for-docker.mjs`.
330330
- `source=url` downloads a public HTTPS `.tgz`; `package_sha256` is required. This path rejects URL credentials, non-default HTTPS ports, private/internal/special-use hostnames or resolved IPs, and redirects outside the same public safety policy.
331331
- `source=trusted-url` downloads an HTTPS `.tgz` from a named trusted-source policy in `.github/package-trusted-sources.json`; `package_sha256` and `trusted_source_id` are required. Use this only for maintainer-owned enterprise mirrors or private package repositories that need configured hosts, ports, path prefixes, redirect hosts, or private-network resolution. If the policy declares bearer auth, the workflow uses the fixed `OPENCLAW_TRUSTED_PACKAGE_TOKEN` secret; URL-embedded credentials are still rejected.
@@ -373,6 +373,15 @@ gh workflow run package-acceptance.yml \
373373
-f suite_profile=product \
374374
-f telegram_mode=mock-openai
375375

376+
# Validate the published extended-stable package with package coverage.
377+
gh workflow run package-acceptance.yml \
378+
--ref main \
379+
-f workflow_ref=main \
380+
-f source=npm \
381+
-f package_spec=openclaw@extended-stable \
382+
-f suite_profile=package \
383+
-f telegram_mode=mock-openai
384+
376385
# Pack and validate a release branch with the current harness.
377386
gh workflow run package-acceptance.yml \
378387
--ref main \

‎docs/cli/update.md‎

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: "Update"
99

1010
# `openclaw update`
1111

12-
Safely update OpenClaw and switch between stable/beta/dev channels.
12+
Safely update OpenClaw and switch between stable/extended-stable/beta/dev channels.
1313

1414
If you installed via **npm/pnpm/bun** (global install, no git metadata),
1515
updates happen via the package-manager flow in [Updating](/install/updating).
@@ -21,6 +21,7 @@ openclaw update
2121
openclaw update status
2222
openclaw update repair
2323
openclaw update wizard
24+
openclaw update --channel extended-stable
2425
openclaw update --channel beta
2526
openclaw update --channel dev
2627
openclaw update --tag beta
@@ -36,8 +37,8 @@ openclaw --update
3637
## Options
3738

3839
- `--no-restart`: skip restarting the Gateway service after a successful update. Package-manager updates that do restart the Gateway verify the restarted service reports the expected updated version before the command succeeds.
39-
- `--channel <stable|beta|dev>`: set the update channel (git + npm; persisted in config).
40-
- `--tag <dist-tag|version|spec>`: override the package target for this update only. For package installs, `main` maps to `github:openclaw/openclaw#main`; GitHub/git source specs are packed into a temporary tarball before the staged global npm install.
40+
- `--channel <stable|extended-stable|beta|dev>`: set the update channel and persist it after core update success. Extended-stable is package-only.
41+
- `--tag <dist-tag|version|spec>`: override the package target for this update only. It cannot be combined with an effective `extended-stable` channel, whose verified exact target is mandatory. For other package installs, `main` maps to `github:openclaw/openclaw#main`; GitHub/git source specs are packed into a temporary tarball before the staged global npm install.
4142
- `--dry-run`: preview planned update actions (channel/tag/target/restart flow) without writing config, installing, syncing plugins, or restarting.
4243
- `--json`: print machine-readable `UpdateRunResult` JSON, including
4344
`postUpdate.plugins.warnings` when corrupt or unloadable managed plugins need
@@ -72,6 +73,12 @@ Downgrades require confirmation because older versions can break configuration.
7273

7374
Show the active update channel + git tag/branch/SHA (for source checkouts), plus update availability.
7475

76+
For extended-stable package installs, status performs the same public selector
77+
and exact-package verification as foreground update. It can report
78+
`ahead of extended-stable` when the installed version is newer. JSON failures
79+
include `registry.reason` (`selector_missing`, `selector_query_failed`,
80+
`exact_package_mismatch`, or `unsupported_git_channel`).
81+
7582
```bash
7683
openclaw update status
7784
openclaw update status --json
@@ -100,8 +107,10 @@ openclaw update repair --json
100107

101108
Options:
102109

103-
- `--channel <stable|beta|dev>`: persist the update channel before repair and
104-
run plugin convergence against that channel.
110+
- `--channel <stable|extended-stable|beta|dev>`: persist the core update channel
111+
before repair. For extended-stable, plugin convergence temporarily targets
112+
the stable/latest plugin line. Extended-stable repair is rejected on Git
113+
checkouts without changing config.
105114
- `--json`: print machine-readable finalization JSON.
106115
- `--timeout <seconds>`: timeout for repair steps (default `1800`).
107116
- `--yes`: skip confirmation prompts.
@@ -137,6 +146,9 @@ install method aligned:
137146
`OPENCLAW_HOME` is set; override with `OPENCLAW_GIT_DIR`),
138147
updates it, and installs the global CLI from that checkout.
139148
- `stable` → installs from npm using `latest`.
149+
- `extended-stable` → resolves the public npm `extended-stable` selector,
150+
verifies the exact selected package, and installs that exact version. It does
151+
not fall back to another selector and is rejected for Git checkouts.
140152
- `beta` → prefers npm dist-tag `beta`, but falls back to `latest` when beta is
141153
missing or older than the current stable release.
142154

@@ -150,6 +162,11 @@ from outside the Gateway process tree. If that handoff is unavailable,
150162
`update.run` returns a structured response with the safe shell command to run
151163
manually.
152164

165+
Extended-stable is deliberately excluded from startup checks and background
166+
auto-update scheduling. Explicit foreground updates, bare foreground updates
167+
with stored `update.channel: "extended-stable"`, on-demand status, and managed
168+
Gateway handoff remain supported.
169+
153170
For package-manager installs, `openclaw update` resolves the target package
154171
version before invoking the package manager. npm global installs use a staged
155172
install: OpenClaw installs the new package into a temporary npm prefix, verifies
@@ -162,6 +179,10 @@ keeps packaged sidecars and channel-owned plugin records aligned with the
162179
installed OpenClaw build while leaving full plugin-command completion rebuilds to
163180
explicit `openclaw completion --write-state` runs.
164181

182+
After an extended-stable core update succeeds, post-core plugin integrity and
183+
convergence still run, but official plugins temporarily target the stable/latest
184+
line. OpenClaw does not query plugin `@extended-stable` selectors in this release.
185+
165186
When a local managed Gateway service is installed and restart is enabled,
166187
package-manager and git-checkout updates stop the running service before
167188
replacing the package tree or mutating the checkout/build output. The updater
@@ -223,6 +244,7 @@ returns the latest sentinel.
223244
- `stable`: checkout the latest non-beta tag, then build and doctor.
224245
- `beta`: prefer the latest `-beta` tag, but fall back to the latest stable tag when beta is missing or older.
225246
- `dev`: checkout `main`, then fetch and rebase.
247+
- `extended-stable`: unsupported for Git checkouts; no checkout mutation occurs.
226248

227249
### Update steps
228250

‎docs/gateway/configuration-reference.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,7 @@ Notes:
11631163
```json5
11641164
{
11651165
update: {
1166-
channel: "stable", // stable | beta | dev
1166+
channel: "stable", // stable | extended-stable | beta | dev
11671167
checkOnStart: true,
11681168

11691169
auto: {
@@ -1176,7 +1176,9 @@ Notes:
11761176
}
11771177
```
11781178

1179-
- `channel`: release channel for npm/git installs - `"stable"`, `"beta"`, or `"dev"`.
1179+
- `channel`: release channel - `"stable"`, `"extended-stable"`, `"beta"`, or
1180+
`"dev"`. Extended-stable is a package-only, foreground/on-demand channel; it
1181+
is skipped by startup checks and background auto-update.
11801182
- `checkOnStart`: check for npm updates when the gateway starts (default: `true`).
11811183
- `auto.enabled`: enable background auto-update for package installs (default: `false`).
11821184
- `auto.stableDelayHours`: minimum delay in hours before stable-channel auto-apply (default: `6`; max: `168`).

‎docs/help/faq-first-run.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ and troubleshooting see the main [FAQ](/help/faq).
487487
```bash
488488
openclaw update
489489
openclaw update status
490-
openclaw update --channel stable|beta|dev
490+
openclaw update --channel stable|extended-stable|beta|dev
491491
openclaw update --tag <dist-tag|version>
492492
openclaw update --no-restart
493493
```

‎docs/help/testing-updates-plugins.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ older trusted releases.
158158

159159
Candidate sources:
160160

161-
- `source=npm`: validate `openclaw@beta`, `openclaw@latest`, or an exact
162-
published version.
161+
- `source=npm`: validate `openclaw@extended-stable`, `openclaw@beta`,
162+
`openclaw@latest`, or an exact published version.
163163
- `source=ref`: pack a trusted branch, tag, or commit with the selected current
164164
harness.
165165
- `source=url`: validate a public HTTPS tarball with required `package_sha256`.
@@ -227,6 +227,10 @@ gh workflow run package-acceptance.yml \
227227
-f telegram_mode=mock-openai
228228
```
229229

230+
For a published extended-stable canary, set
231+
`package_spec=openclaw@extended-stable`. Package Acceptance resolves that
232+
selector into an exact tarball before the Docker lanes run.
233+
230234
Use `suite_profile=product` when the release question includes MCP channels,
231235
cron/subagent cleanup, OpenAI web search, or OpenWebUI. Use `suite_profile=full`
232236
only when you need full Docker release-path coverage.

‎docs/install/development-channels.md‎

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
---
2-
summary: "Stable, beta, and dev channels: semantics, switching, pinning, and tagging"
2+
summary: "Stable, extended-stable, beta, and dev channels: semantics, switching, pinning, and tagging"
33
read_when:
4-
- You want to switch between stable/beta/dev
4+
- You want to switch between stable/extended-stable/beta/dev
55
- You want to pin a specific version, tag, or SHA
66
- You are tagging or publishing prereleases
77
title: "Release channels"
88
sidebarTitle: "Release Channels"
99
---
1010

11-
OpenClaw ships three update channels:
11+
OpenClaw ships four update channels:
1212

1313
- **stable**: npm dist-tag `latest`. Recommended for most users.
14+
- **extended-stable**: npm dist-tag `extended-stable`. A net-new, trailing
15+
supported-month package channel. It is foreground-only in this release.
1416
- **beta**: npm dist-tag `beta` when it is current; if beta is missing or older than
1517
the latest stable release, the update flow falls back to `latest`.
1618
- **dev**: moving head of `main` (git). npm dist-tag: `dev` (when published).
@@ -27,6 +29,7 @@ installs.
2729

2830
```bash
2931
openclaw update --channel stable
32+
openclaw update --channel extended-stable
3033
openclaw update --channel beta
3134
openclaw update --channel dev
3235
```
@@ -35,6 +38,10 @@ openclaw update --channel dev
3538
install method:
3639

3740
- **`stable`** (package installs): updates via npm dist-tag `latest`.
41+
- **`extended-stable`** (package installs only): resolves the public npm
42+
`extended-stable` selector, verifies the exact selected package version, and
43+
installs that exact version. Resolution fails closed with no fallback to
44+
`latest`, `beta`, or `dev`.
3845
- **`beta`** (package installs): prefers npm dist-tag `beta`, but falls back to
3946
`latest` when `beta` is missing or older than the current stable tag.
4047
- **`stable`** (git installs): checks out the latest stable git tag, excluding
@@ -43,6 +50,8 @@ install method:
4350
suffixes.
4451
- **`beta`** (git installs): prefers the latest beta git tag, but falls back to
4552
the latest stable git tag when beta is missing or older.
53+
- **`extended-stable`** (git installs): unsupported. OpenClaw leaves the
54+
checkout unchanged and asks you to use a package installation.
4655
- **`dev`**: ensures a git checkout (default `~/openclaw`, or
4756
`$OPENCLAW_HOME/openclaw` when `OPENCLAW_HOME` is set; override with
4857
`OPENCLAW_GIT_DIR`), switches to `main`, rebases on upstream, builds, and
@@ -85,6 +94,9 @@ Notes:
8594
checkout as your persistent install.
8695
- Downgrade protection: if the target version is older than your current version,
8796
OpenClaw prompts for confirmation (skip with `--yes`).
97+
- Extended-stable always uses its verified exact package target. It is not a
98+
one-off alias for `--tag extended-stable`, and `--tag` cannot be combined
99+
with an effective extended-stable channel.
88100
- `--channel beta` is different from `--tag beta`: the channel flow can fall back
89101
to stable/latest when beta is missing or older, while `--tag beta` targets the
90102
raw `beta` dist-tag for that one run.
@@ -110,6 +122,9 @@ sources:
110122

111123
- `dev` prefers bundled plugins from the git checkout.
112124
- `stable` and `beta` restore npm-installed plugin packages.
125+
- `extended-stable` currently uses the existing stable/latest plugin line after
126+
the core package succeeds. Official plugin `@extended-stable` selectors are
127+
not queried yet.
113128
- npm-installed plugins are updated after the core update completes.
114129

115130
## Checking current status
@@ -132,6 +147,7 @@ source (config, git tag, git branch, or default).
132147
- Keep tags immutable: never move or reuse a tag.
133148
- npm dist-tags remain the source of truth for npm installs:
134149
- `latest` -> stable
150+
- `extended-stable` -> trailing supported-month package release
135151
- `beta` -> candidate build or beta-first stable build
136152
- `dev` -> main snapshot (optional)
137153

‎docs/install/updating.md‎

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ To switch channels or target a specific version:
2020

2121
```bash
2222
openclaw update --channel beta
23+
openclaw update --channel extended-stable
2324
openclaw update --channel dev
2425
openclaw update --dry-run # preview without applying
2526
```
@@ -34,6 +35,12 @@ installer has its own `--verbose` flag, but that flag is not part of
3435
the beta tag is missing or older than the latest stable release. Use `--tag beta`
3536
if you want the raw npm beta dist-tag for a one-off package update.
3637

38+
`--channel extended-stable` is package-only and foreground-only. OpenClaw reads
39+
the public npm `extended-stable` selector, verifies the selected exact package,
40+
and installs that exact version. Missing or inconsistent registry data fails
41+
closed; it never falls back to `latest`. If the selected version is older than
42+
the installed version, the normal downgrade confirmation still applies.
43+
3744
Use `--channel dev` for a persistent moving GitHub `main` checkout. For package
3845
updates, `--tag main` maps to `github:openclaw/openclaw#main` for one run, and
3946
GitHub/git source specs are packed into a temporary tarball before the staged
@@ -67,7 +74,9 @@ openclaw update --channel stable --dry-run
6774
```
6875

6976
The `dev` channel ensures a git checkout, builds it, and installs the global CLI
70-
from that checkout. The `stable` and `beta` channels use package installs. If the
77+
from that checkout. The `stable`, `extended-stable`, and `beta` channels use
78+
package installs. Extended-stable is rejected on a Git checkout without
79+
mutating or converting it. If the
7180
gateway is already installed, `openclaw update` refreshes the service metadata
7281
and restarts it unless you pass `--no-restart`.
7382

@@ -201,13 +210,15 @@ The auto-updater is off by default. Enable it in `~/.openclaw/openclaw.json`:
201210
}
202211
```
203212

204-
| Channel | Behavior |
205-
| -------- | ------------------------------------------------------------------------------------------------------------- |
206-
| `stable` | Waits `stableDelayHours`, then applies with deterministic jitter across `stableJitterHours` (spread rollout). |
207-
| `beta` | Checks every `betaCheckIntervalHours` (default: hourly) and applies immediately. |
208-
| `dev` | No automatic apply. Use `openclaw update` manually. |
213+
| Channel | Behavior |
214+
| ----------------- | ------------------------------------------------------------------------------------------------------------- |
215+
| `stable` | Waits `stableDelayHours`, then applies with deterministic jitter across `stableJitterHours` (spread rollout). |
216+
| `extended-stable` | No startup check or automatic apply. Use `openclaw update` or `openclaw update status` manually. |
217+
| `beta` | Checks every `betaCheckIntervalHours` (default: hourly) and applies immediately. |
218+
| `dev` | No automatic apply. Use `openclaw update` manually. |
209219

210220
The gateway also logs an update hint on startup (disable with `update.checkOnStart: false`).
221+
Stored extended-stable selections skip startup and background resolution entirely.
211222
For downgrade or incident recovery, set `OPENCLAW_NO_AUTO_UPDATE=1` in the gateway environment to block automatic applies even when `update.auto.enabled` is configured. Startup update hints can still run unless `update.checkOnStart` is also disabled.
212223

213224
Package-manager updates requested through the live Gateway control-plane handler

‎scripts/resolve-openclaw-package-candidate.mjs‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ for (const signal of Object.keys(SIGNAL_EXIT_CODES)) {
6262
});
6363
}
6464
export const OPENCLAW_PACKAGE_SPEC_RE =
65-
/^openclaw@(alpha|beta|latest|[0-9]{4}\.[1-9][0-9]*\.[1-9][0-9]*(-[1-9][0-9]*|-(alpha|beta)\.[1-9][0-9]*)?)$/u;
65+
/^openclaw@(alpha|beta|extended-stable|latest|[0-9]{4}\.[1-9][0-9]*\.[1-9][0-9]*(-[1-9][0-9]*|-(alpha|beta)\.[1-9][0-9]*)?)$/u;
6666

6767
function usage() {
6868
return `Usage: node scripts/resolve-openclaw-package-candidate.mjs --source <ref|npm|url|trusted-url|artifact> --output-dir <dir> [options]
@@ -175,7 +175,7 @@ function resolvePackedOpenClawTarballFilename(value) {
175175
export function validateOpenClawPackageSpec(spec) {
176176
if (!OPENCLAW_PACKAGE_SPEC_RE.test(spec)) {
177177
throw new Error(
178-
`package_spec must be openclaw@alpha, openclaw@beta, openclaw@latest, or an exact OpenClaw release version; got: ${spec}`,
178+
`package_spec must be openclaw@alpha, openclaw@beta, openclaw@extended-stable, openclaw@latest, or an exact OpenClaw release version; got: ${spec}`,
179179
);
180180
}
181181
}
@@ -1281,10 +1281,7 @@ async function openHttpsPackageDownloadResponse(parsed, options) {
12811281

12821282
async function openPackageDownloadResponse(url, options) {
12831283
const lookupHost = options.lookupHost ?? defaultLookupHost;
1284-
const timeoutMs = resolveTimerTimeoutMs(
1285-
options.timeoutMs,
1286-
PACKAGE_URL_DOWNLOAD_TIMEOUT_MS,
1287-
);
1284+
const timeoutMs = resolveTimerTimeoutMs(options.timeoutMs, PACKAGE_URL_DOWNLOAD_TIMEOUT_MS);
12881285
const maxRedirects = options.maxRedirects ?? PACKAGE_URL_MAX_REDIRECTS;
12891286
const trustedSource = options.trustedSource;
12901287
let parsed = new URL(url);

0 commit comments

Comments
 (0)