Skip to content

Commit a0deb8e

Browse files
authored
fix(release): provide prerelease plugin companions to package QA (#120107)
1 parent aea8b4f commit a0deb8e

26 files changed

Lines changed: 1669 additions & 71 deletions

‎.github/workflows/full-release-validation.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,8 @@ jobs:
418418
include_release_path_suites: false
419419
include_openwebui: false
420420
include_live_suites: false
421+
enable_prepublish_plugin_registry: true
422+
published_upgrade_survivor_scenarios: ${{ (inputs.run_release_soak || inputs.release_profile == 'stable' || inputs.release_profile == 'full') && 'reported-issues' || '' }}
421423
allow_unreleased_changelog: ${{ inputs.allow_unreleased_changelog || (inputs.target_context_ref == '' && (inputs.ref == 'main' || inputs.ref == 'refs/heads/main')) }}
422424
release_test_profile: ${{ inputs.release_profile }}
423425
shared_image_artifact_namespace: full-release

‎.github/workflows/openclaw-live-and-e2e-checks-reusable.yml‎

Lines changed: 295 additions & 1 deletion
Large diffs are not rendered by default.

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

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,15 @@ jobs:
331331
RELEASE_PACKAGE_SPEC_INPUT: ${{ inputs.release_package_spec }}
332332
RELEASE_PACKAGE_ACCEPTANCE_PACKAGE_SPEC_INPUT: ${{ inputs.package_acceptance_package_spec }}
333333
RELEASE_CODEX_PLUGIN_SPEC_INPUT: ${{ inputs.codex_plugin_spec }}
334+
CANDIDATE_ARTIFACT_JSON_INPUT: ${{ inputs.candidate_artifact_json }}
334335
run: |
335336
set -euo pipefail
337+
if [[ -n "${CANDIDATE_ARTIFACT_JSON_INPUT// }" ]] &&
338+
{ [[ -n "${RELEASE_PACKAGE_SPEC_INPUT// }" ]] ||
339+
[[ -n "${RELEASE_PACKAGE_ACCEPTANCE_PACKAGE_SPEC_INPUT// }" ]]; }; then
340+
echo "candidate_artifact_json cannot be combined with release package specs." >&2
341+
exit 1
342+
fi
336343
qa_live_matrix_enabled=true
337344
qa_live_buzz_enabled=true
338345
qa_live_telegram_enabled=true
@@ -749,7 +756,29 @@ jobs:
749756
(.imageArtifactDigest | hex64) and
750757
(.imageArtifactRunId | tostring | digits) and
751758
(.imageArtifactRunAttempt | tostring | digits) and
752-
(.imageArchiveSha256 | hex64)' \
759+
(.imageArchiveSha256 | hex64) and
760+
(
761+
(
762+
(has("prepublishPluginRegistryArtifactName") | not) and
763+
(has("prepublishPluginRegistryArtifactId") | not) and
764+
(has("prepublishPluginRegistryArtifactDigest") | not) and
765+
(has("prepublishPluginRegistryArtifactRunId") | not) and
766+
(has("prepublishPluginRegistryArtifactRunAttempt") | not) and
767+
(has("prepublishPluginRegistryManifestSha256") | not)
768+
) or
769+
(
770+
(.prepublishPluginRegistryArtifactName | type == "string" and length > 0) and
771+
(.prepublishPluginRegistryArtifactId | tostring | digits) and
772+
(.prepublishPluginRegistryArtifactDigest | hex64) and
773+
(.prepublishPluginRegistryArtifactRunId | tostring | digits) and
774+
(.prepublishPluginRegistryArtifactRunAttempt | tostring | digits) and
775+
(.prepublishPluginRegistryManifestSha256 | hex64) and
776+
.prepublishPluginRegistryArtifactName ==
777+
("docker-e2e-prepublish-plugin-registry-" +
778+
(.prepublishPluginRegistryArtifactRunId | tostring) + "-" +
779+
(.prepublishPluginRegistryArtifactRunAttempt | tostring))
780+
)
781+
)' \
753782
<<< "$CANDIDATE_ARTIFACT_JSON" >/dev/null
754783
755784
install_smoke_release_checks:
@@ -901,6 +930,13 @@ jobs:
901930
package_sha256: ${{ needs.prepare_release_package.outputs.package_sha256 }}
902931
package_source_sha: ${{ needs.prepare_release_package.outputs.source_sha }}
903932
package_version: ${{ needs.prepare_release_package.outputs.package_version }}
933+
enable_prepublish_plugin_registry: ${{ needs.resolve_target.outputs.release_package_spec == '' }}
934+
prepublish_plugin_registry_artifact_name: ${{ fromJSON(inputs.candidate_artifact_json || '{}').prepublishPluginRegistryArtifactName || '' }}
935+
prepublish_plugin_registry_artifact_id: ${{ fromJSON(inputs.candidate_artifact_json || '{}').prepublishPluginRegistryArtifactId || '' }}
936+
prepublish_plugin_registry_artifact_digest: ${{ fromJSON(inputs.candidate_artifact_json || '{}').prepublishPluginRegistryArtifactDigest || '' }}
937+
prepublish_plugin_registry_artifact_run_id: ${{ fromJSON(inputs.candidate_artifact_json || '{}').prepublishPluginRegistryArtifactRunId || '' }}
938+
prepublish_plugin_registry_artifact_run_attempt: ${{ fromJSON(inputs.candidate_artifact_json || '{}').prepublishPluginRegistryArtifactRunAttempt || '' }}
939+
prepublish_plugin_registry_manifest_sha256: ${{ fromJSON(inputs.candidate_artifact_json || '{}').prepublishPluginRegistryManifestSha256 || '' }}
904940
codex_plugin_spec: ${{ needs.resolve_target.outputs.codex_plugin_spec }}
905941
shared_image_artifact_namespace: release-docker
906942
shared_image_artifact_name: ${{ fromJSON(inputs.candidate_artifact_json || '{}').imageArtifactName || '' }}

‎.github/workflows/openclaw-scheduled-live-checks.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
include_openwebui: true
3434
include_live_suites: true
3535
allow_unreleased_changelog: true
36+
enable_prepublish_plugin_registry: true
3637
shared_image_artifact_namespace: scheduled-live
3738
shared_image_policy: no-push-artifact
3839
secrets:

‎.github/workflows/package-acceptance.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,13 @@ jobs:
841841
package_sha256: ${{ needs.resolve_package.outputs.package_sha256 }}
842842
package_source_sha: ${{ needs.resolve_package.outputs.package_source_sha }}
843843
package_version: ${{ needs.resolve_package.outputs.package_version }}
844+
enable_prepublish_plugin_registry: ${{ contains(fromJSON('["artifact","ref"]'), inputs.source) }}
845+
prepublish_plugin_registry_artifact_name: ${{ fromJSON(inputs.candidate_artifact_json || '{}').prepublishPluginRegistryArtifactName || '' }}
846+
prepublish_plugin_registry_artifact_id: ${{ fromJSON(inputs.candidate_artifact_json || '{}').prepublishPluginRegistryArtifactId || '' }}
847+
prepublish_plugin_registry_artifact_digest: ${{ fromJSON(inputs.candidate_artifact_json || '{}').prepublishPluginRegistryArtifactDigest || '' }}
848+
prepublish_plugin_registry_artifact_run_id: ${{ fromJSON(inputs.candidate_artifact_json || '{}').prepublishPluginRegistryArtifactRunId || '' }}
849+
prepublish_plugin_registry_artifact_run_attempt: ${{ fromJSON(inputs.candidate_artifact_json || '{}').prepublishPluginRegistryArtifactRunAttempt || '' }}
850+
prepublish_plugin_registry_manifest_sha256: ${{ fromJSON(inputs.candidate_artifact_json || '{}').prepublishPluginRegistryManifestSha256 || '' }}
844851
include_live_suites: ${{ needs.resolve_package.outputs.include_live_suites == 'true' }}
845852
live_models_only: false
846853
shared_image_artifact_namespace: ${{ inputs.shared_image_artifact_namespace }}

‎.github/workflows/plugin-prerelease.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,13 @@ jobs:
574574
package_source_sha: ${{ fromJSON(inputs.candidate_artifact_json || '{}').packageSourceSha || '' }}
575575
package_sha256: ${{ fromJSON(inputs.candidate_artifact_json || '{}').packageSha256 || '' }}
576576
package_version: ${{ fromJSON(inputs.candidate_artifact_json || '{}').packageVersion || '' }}
577+
enable_prepublish_plugin_registry: true
578+
prepublish_plugin_registry_artifact_name: ${{ fromJSON(inputs.candidate_artifact_json || '{}').prepublishPluginRegistryArtifactName || '' }}
579+
prepublish_plugin_registry_artifact_id: ${{ fromJSON(inputs.candidate_artifact_json || '{}').prepublishPluginRegistryArtifactId || '' }}
580+
prepublish_plugin_registry_artifact_digest: ${{ fromJSON(inputs.candidate_artifact_json || '{}').prepublishPluginRegistryArtifactDigest || '' }}
581+
prepublish_plugin_registry_artifact_run_id: ${{ fromJSON(inputs.candidate_artifact_json || '{}').prepublishPluginRegistryArtifactRunId || '' }}
582+
prepublish_plugin_registry_artifact_run_attempt: ${{ fromJSON(inputs.candidate_artifact_json || '{}').prepublishPluginRegistryArtifactRunAttempt || '' }}
583+
prepublish_plugin_registry_manifest_sha256: ${{ fromJSON(inputs.candidate_artifact_json || '{}').prepublishPluginRegistryManifestSha256 || '' }}
577584
shared_image_artifact_name: ${{ fromJSON(inputs.candidate_artifact_json || '{}').imageArtifactName || '' }}
578585
shared_image_artifact_id: ${{ fromJSON(inputs.candidate_artifact_json || '{}').imageArtifactId || '' }}
579586
shared_image_artifact_digest: ${{ fromJSON(inputs.candidate_artifact_json || '{}').imageArtifactDigest || '' }}

‎scripts/docker-e2e.mjs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ function githubOutputs(plan) {
2929
`needs_functional_image=${boolOutput(needs.functionalImage)}`,
3030
`needs_live_image=${boolOutput(needs.liveImage)}`,
3131
`needs_package=${boolOutput(needs.package)}`,
32+
`needs_prepublish_plugin_registry=${boolOutput(needs.prepublishPluginRegistry)}`,
33+
`required_prepublish_plugin_packages=${JSON.stringify(
34+
plan.requiredPrepublishPluginPackages ?? [],
35+
)}`,
3236
];
3337
}
3438

‎scripts/e2e/lib/upgrade-survivor/config-recipe.d.mts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ export function resolveScenarioConfigSteps(scenario: string): Array<{
55
intent: string;
66
argv: string[];
77
}>;
8+
export function resolveUpgradeSurvivorConfigSteps(scenario?: string): Array<{
9+
id: string;
10+
intent: string;
11+
argv: string[];
12+
}>;
13+
export function resolveUpgradeSurvivorConfigStepsForBaseline(
14+
scenario?: string,
15+
baselineVersion?: string | null,
16+
): Array<{
17+
id: string;
18+
intent: string;
19+
argv: string[];
20+
}>;
821
export function resolveUpgradeSurvivorOpenClawCommand(
922
argv: unknown,
1023
params?: Record<string, unknown>,

‎scripts/e2e/lib/upgrade-survivor/config-recipe.mjs‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,15 @@ const recipe = [
200200
},
201201
];
202202

203+
export function resolveUpgradeSurvivorConfigSteps(scenario = "base") {
204+
const validateStep = recipe.at(-1);
205+
return [
206+
...recipe.slice(0, -1),
207+
...resolveScenarioConfigSteps(scenario),
208+
...(validateStep ? [validateStep] : []),
209+
];
210+
}
211+
203212
function selectedScenario() {
204213
return process.env.OPENCLAW_UPGRADE_SURVIVOR_SCENARIO || "base";
205214
}
@@ -252,6 +261,16 @@ function adaptStepForBaseline(step, baselineVersion, summary) {
252261
return step;
253262
}
254263

264+
export function resolveUpgradeSurvivorConfigStepsForBaseline(
265+
scenario = "base",
266+
baselineVersion = null,
267+
) {
268+
const summary = { skippedIntents: [] };
269+
return resolveUpgradeSurvivorConfigSteps(scenario)
270+
.map((step) => adaptStepForBaseline(step, baselineVersion, summary))
271+
.filter(Boolean);
272+
}
273+
255274
export function resolveUpgradeSurvivorOpenClawCommand(argv, params = {}) {
256275
const platform = params.platform ?? process.platform;
257276
if (platform === "win32") {
@@ -331,7 +350,7 @@ function applyRecipe() {
331350
steps: [],
332351
};
333352

334-
for (const step of [...recipe.slice(0, -1), ...scenarioSteps, recipe.at(-1)]) {
353+
for (const step of resolveUpgradeSurvivorConfigSteps(scenario)) {
335354
const adaptedStep = adaptStepForBaseline(step, baselineVersion, summary);
336355
if (!adaptedStep) {
337356
continue;

‎scripts/e2e/lib/upgrade-survivor/run.sh‎

Lines changed: 56 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ set -Eeuo pipefail
33

44
source scripts/lib/openclaw-e2e-instance.sh
55

6+
SCENARIO="${OPENCLAW_UPGRADE_SURVIVOR_SCENARIO:-base}"
7+
68
export npm_config_loglevel=error
79
export npm_config_fund=false
810
export npm_config_audit=false
@@ -16,7 +18,9 @@ export GATEWAY_AUTH_TOKEN_REF="upgrade-survivor-token"
1618
export OPENAI_API_KEY="sk-openclaw-upgrade-survivor"
1719
export DISCORD_BOT_TOKEN="upgrade-survivor-discord-token"
1820
export TELEGRAM_BOT_TOKEN="123456:upgrade-survivor-telegram-token"
19-
export FEISHU_APP_SECRET="upgrade-survivor-feishu-secret"
21+
if [ "$SCENARIO" = "feishu-channel" ]; then
22+
export FEISHU_APP_SECRET="upgrade-survivor-feishu-secret"
23+
fi
2024
export MATRIX_ACCESS_TOKEN="upgrade-survivor-matrix-token"
2125
export BRAVE_API_KEY="BSA_upgrade_survivor_brave_key"
2226

@@ -43,7 +47,6 @@ PHASE_LOG="$ARTIFACT_ROOT/phases.jsonl"
4347
BASELINE_RAW="${OPENCLAW_UPGRADE_SURVIVOR_BASELINE:?missing OPENCLAW_UPGRADE_SURVIVOR_BASELINE}"
4448
CANDIDATE_KIND="${OPENCLAW_UPGRADE_SURVIVOR_CANDIDATE_KIND:-tarball}"
4549
CANDIDATE_SPEC="${OPENCLAW_UPGRADE_SURVIVOR_CANDIDATE_SPEC:-${OPENCLAW_CURRENT_PACKAGE_TGZ:-}}"
46-
SCENARIO="${OPENCLAW_UPGRADE_SURVIVOR_SCENARIO:-base}"
4750
UPDATE_RESTART_MODE="${OPENCLAW_UPGRADE_SURVIVOR_UPDATE_RESTART_MODE:-manual}"
4851
ROOT_MANAGED_VPS="${OPENCLAW_UPGRADE_SURVIVOR_ROOT_MANAGED_VPS:-0}"
4952
COMMAND_TIMEOUT="${OPENCLAW_UPGRADE_SURVIVOR_COMMAND_TIMEOUT:-900s}"
@@ -365,16 +368,49 @@ TS
365368
echo "Seeded source-only plugin shadow: $shadow_root"
366369
}
367370

368-
configure_configured_plugin_install_fixture_registry() {
369-
configured_plugin_installs_enabled || return 0
370-
371-
local fixture_root="$ARTIFACT_ROOT/configured-plugin-installs-npm-fixture"
371+
configure_plugin_registry() {
372+
local fixture_root="$ARTIFACT_ROOT/plugin-registry"
372373
local package_dir="$fixture_root/package"
373374
local tarball="$fixture_root/openclaw-brave-plugin-2026.5.2.tgz"
374375
local port_file="$fixture_root/npm-registry-port"
375376
local log_file="$fixture_root/npm-registry.log"
376-
mkdir -p "$package_dir"
377-
FIXTURE_PACKAGE_DIR="$package_dir" node <<'NODE'
377+
local registry_args=()
378+
379+
if [ -n "${OPENCLAW_PREPUBLISH_PLUGIN_REGISTRY_DIR:-}" ]; then
380+
local manifest="$OPENCLAW_PREPUBLISH_PLUGIN_REGISTRY_DIR/prepublish-plugin-registry.json"
381+
local registry_rows
382+
registry_rows="$(
383+
PREPUBLISH_PLUGIN_REGISTRY_MANIFEST="$manifest" node <<'NODE'
384+
const fs = require("node:fs");
385+
const path = require("node:path");
386+
const manifestPath = process.env.PREPUBLISH_PLUGIN_REGISTRY_MANIFEST;
387+
const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf8"));
388+
if (!Array.isArray(manifest.packages) || manifest.packages.length === 0) {
389+
throw new Error("prepublish plugin registry manifest must contain packages");
390+
}
391+
for (const entry of manifest.packages) {
392+
if (
393+
typeof entry.name !== "string" ||
394+
typeof entry.version !== "string" ||
395+
typeof entry.tarball !== "string" ||
396+
path.basename(entry.tarball) !== entry.tarball
397+
) {
398+
throw new Error("invalid prepublish plugin registry package entry");
399+
}
400+
process.stdout.write(
401+
`${entry.name}\t${entry.version}\t${path.join(path.dirname(manifestPath), entry.tarball)}\n`,
402+
);
403+
}
404+
NODE
405+
)"
406+
while IFS=$'\t' read -r package_name package_version package_tarball; do
407+
registry_args+=("$package_name" "$package_version" "$package_tarball")
408+
done <<<"$registry_rows"
409+
fi
410+
411+
if configured_plugin_installs_enabled; then
412+
mkdir -p "$package_dir"
413+
FIXTURE_PACKAGE_DIR="$package_dir" node <<'NODE'
378414
const fs = require("node:fs");
379415
const path = require("node:path");
380416
const root = process.env.FIXTURE_PACKAGE_DIR;
@@ -424,13 +460,19 @@ fs.writeFileSync(
424460
`module.exports = { id: "brave", name: "Brave Fixture", register() {} };\n`,
425461
);
426462
NODE
427-
tar -czf "$tarball" -C "$fixture_root" package
463+
tar -czf "$tarball" -C "$fixture_root" package
464+
registry_args+=("@openclaw/brave-plugin" "2026.5.2" "$tarball")
465+
fi
466+
467+
if [ "${#registry_args[@]}" -eq 0 ]; then
468+
return 0
469+
fi
470+
471+
mkdir -p "$fixture_root"
428472
OPENCLAW_NPM_REGISTRY_UPSTREAM=https://registry.npmjs.org \
429473
node scripts/e2e/lib/plugins/npm-registry-server.mjs \
430474
"$port_file" \
431-
"@openclaw/brave-plugin" \
432-
"2026.5.2" \
433-
"$tarball" \
475+
"${registry_args[@]}" \
434476
>"$log_file" 2>&1 &
435477
plugin_registry_pid="$!"
436478

@@ -448,7 +490,7 @@ NODE
448490
done
449491

450492
openclaw_e2e_print_log "$log_file" >&2
451-
echo "Timed out waiting for configured plugin install npm fixture registry." >&2
493+
echo "Timed out waiting for upgrade survivor npm registry." >&2
452494
return 1
453495
}
454496

@@ -1270,10 +1312,10 @@ phase assert-baseline assert_baseline_state
12701312
phase seed-legacy-runtime-deps-symlink seed_legacy_runtime_deps_symlink
12711313
phase resolve-candidate resolve_candidate_version
12721314
phase prepare-update-restart-probe prepare_update_restart_probe
1315+
phase configure-plugin-registry configure_plugin_registry
12731316
phase update-candidate update_candidate
12741317
phase root-managed-vps-cli-usable assert_root_managed_vps_cli_usable
12751318
phase assert-legacy-plugin-dependency-debris-before-doctor assert_legacy_plugin_dependency_debris_before_doctor
1276-
phase configure-configured-plugin-install-fixture-registry configure_configured_plugin_install_fixture_registry
12771319
phase doctor run_doctor
12781320
phase assert-legacy-plugin-dependency-debris-cleaned assert_legacy_plugin_dependency_debris_cleaned
12791321
phase assert-legacy-runtime-deps-symlink-repaired assert_legacy_runtime_deps_symlink_repaired

0 commit comments

Comments
 (0)