Skip to content

Commit 305e38f

Browse files
fix(release): allow beta Docker backfills (#124999)
1 parent d64c516 commit 305e38f

3 files changed

Lines changed: 65 additions & 6 deletions

File tree

‎.github/workflows/openclaw-release-publish.yml‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ on:
6868
default: true
6969
type: boolean
7070
publish_docker_only:
71-
description: Publish Docker only after independently verifying an already-published extended-stable npm package
71+
description: Publish Docker only after independently verifying an already-published beta or extended-stable npm package
7272
required: true
7373
default: false
7474
type: boolean
@@ -184,8 +184,8 @@ jobs:
184184
echo "publish_docker_only requires publish_openclaw_npm=false." >&2
185185
exit 1
186186
fi
187-
if [[ "${RELEASE_NPM_DIST_TAG}" != "extended-stable" ]]; then
188-
echo "publish_docker_only is reserved for an already-published extended-stable release." >&2
187+
if [[ "${RELEASE_NPM_DIST_TAG}" != "beta" && "${RELEASE_NPM_DIST_TAG}" != "extended-stable" ]]; then
188+
echo "publish_docker_only supports already-published beta or extended-stable releases only." >&2
189189
exit 1
190190
fi
191191
fi
@@ -2480,14 +2480,15 @@ jobs:
24802480
- name: Verify exact npm and selector readback matches preflight bytes
24812481
env:
24822482
RELEASE_TAG: ${{ inputs.tag }}
2483+
RELEASE_NPM_DIST_TAG: ${{ inputs.npm_dist_tag }}
24832484
EXPECTED_TARBALL_SHA256: ${{ needs.resolve_release_target.outputs.preflight_tarball_sha256 }}
24842485
run: |
24852486
set -euo pipefail
24862487
version="${RELEASE_TAG#v}"
24872488
exact_version="$(npm view "openclaw@${version}" version)"
2488-
selector_version="$(npm view openclaw@extended-stable version)"
2489+
selector_version="$(npm view "openclaw@${RELEASE_NPM_DIST_TAG}" version)"
24892490
if [[ "${exact_version}" != "${version}" || "${selector_version}" != "${version}" ]]; then
2490-
echo "npm exact-version or extended-stable selector readback does not match ${version}." >&2
2491+
echo "npm exact-version or ${RELEASE_NPM_DIST_TAG} selector readback does not match ${version}." >&2
24912492
exit 1
24922493
fi
24932494
tarball_url="$(npm view "openclaw@${version}" dist.tarball)"

‎docs/reference/RELEASING.md‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,24 @@ gh workflow run openclaw-release-publish.yml \
565565

566566
Include `plugin_sdk_api_acknowledgement` only when the npm preflight's Plugin SDK API report contains changes.
567567

568+
If a beta package is already published but its container images are missing,
569+
do not rerun npm or plugin publication. Reuse the immutable beta tag plus its
570+
successful npm preflight and Full Release Validation evidence through the
571+
Docker-only recovery path. The workflow rechecks the exact npm version, the
572+
`beta` selector, and the published tarball digest before building containers:
573+
574+
```bash
575+
gh workflow run openclaw-release-publish.yml \
576+
--ref main \
577+
-f tag=vYYYY.M.PATCH-beta.N \
578+
-f preflight_run_id=<successful-openclaw-npm-preflight-run-id> \
579+
-f full_release_validation_run_id=<successful-full-release-validation-run-id> \
580+
-f full_release_validation_run_attempt=<successful-full-release-validation-run-attempt> \
581+
-f npm_dist_tag=beta \
582+
-f publish_openclaw_npm=false \
583+
-f publish_docker_only=true
584+
```
585+
568586
Stable publish to the default beta dist-tag:
569587

570588
```bash
@@ -681,7 +699,7 @@ readback confirms that every exact package and `extended-stable` tag converged.
681699
- `windows_node_installer_digests`: candidate-approved compact JSON map of the current Windows installer names to their pinned `sha256:` digests; required for stable OpenClaw publish
682700
- `npm_telegram_run_id`: optional successful `NPM Telegram Beta E2E` run id to include in final release evidence
683701
- `npm_dist_tag`: npm target tag for the OpenClaw package, one of `alpha`, `beta`, `latest`, or `extended-stable`
684-
- `publish_docker_only`: extended-stable-only recovery/closeout path. It requires `publish_openclaw_npm=false`, complete preflight and Full Release Validation evidence, then verifies the exact npm package, selector, and tarball digest before invoking Docker publication.
702+
- `publish_docker_only`: beta or extended-stable recovery/closeout path. It requires `publish_openclaw_npm=false`, complete preflight and Full Release Validation evidence, then verifies the exact npm package, selected dist-tag, and tarball digest before invoking Docker publication.
685703
- `plugin_publish_scope`: defaults to `all-publishable`; use `selected` only for focused plugin-only repair work with `publish_openclaw_npm=false`
686704
- `plugins`: comma-separated `@openclaw/*` package names when `plugin_publish_scope=selected`
687705
- `publish_openclaw_npm`: defaults to `true`; set `false` only when using the workflow as a plugin-only repair orchestrator

‎test/scripts/package-acceptance-workflow.test.ts‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,46 @@ describe("package acceptance workflow", () => {
11411141
);
11421142
});
11431143

1144+
it("allows Docker-only recovery for beta and extended-stable releases", () => {
1145+
for (const release of [
1146+
{ distTag: "beta", tag: "v2026.8.1-beta.2" },
1147+
{ distTag: "extended-stable", tag: "v2026.7.33" },
1148+
]) {
1149+
const result = runReleasePublishInputValidation({
1150+
PUBLISH_DOCKER_ONLY: "true",
1151+
PUBLISH_OPENCLAW_NPM: "false",
1152+
RELEASE_NPM_DIST_TAG: release.distTag,
1153+
RELEASE_TAG: release.tag,
1154+
});
1155+
expect(result.status, result.stderr).toBe(0);
1156+
}
1157+
1158+
const latest = runReleasePublishInputValidation({
1159+
PUBLISH_DOCKER_ONLY: "true",
1160+
PUBLISH_OPENCLAW_NPM: "false",
1161+
RELEASE_NPM_DIST_TAG: "latest",
1162+
RELEASE_TAG: "v2026.8.1",
1163+
});
1164+
expect(latest.status).toBe(1);
1165+
expect(latest.stderr).toContain(
1166+
"publish_docker_only supports already-published beta or extended-stable releases only",
1167+
);
1168+
1169+
const workflow = readWorkflow(RELEASE_PUBLISH_WORKFLOW);
1170+
const input = workflow.on?.workflow_dispatch?.inputs?.publish_docker_only as
1171+
| { description?: string }
1172+
| undefined;
1173+
const verifyJob = workflowJob(RELEASE_PUBLISH_WORKFLOW, "verify_core_npm_registry");
1174+
const verifyStep = workflowStep(
1175+
verifyJob,
1176+
"Verify exact npm and selector readback matches preflight bytes",
1177+
);
1178+
expect(input?.description).toContain("beta or extended-stable");
1179+
expect(verifyStep.env?.RELEASE_NPM_DIST_TAG).toBe("${{ inputs.npm_dist_tag }}");
1180+
expect(verifyStep.run).toContain('npm view "openclaw@${RELEASE_NPM_DIST_TAG}" version');
1181+
expect(verifyStep.run).not.toContain("npm view openclaw@extended-stable version");
1182+
});
1183+
11441184
it("accepts only main-reachable protected SHA-pinned release publish tags", () => {
11451185
const workflowSha = "a".repeat(40);
11461186
const binDir = tempDirs.make("release-publish-gh-");

0 commit comments

Comments
 (0)