Skip to content

Commit 955b4df

Browse files
committed
fix(ci): stabilize full release validation
1 parent 490e6d6 commit 955b4df

14 files changed

Lines changed: 98 additions & 0 deletions

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,23 @@ jobs:
246246
echo "- Target SHA: \`${TARGET_SHA}\`"
247247
} >> "$GITHUB_STEP_SUMMARY"
248248
249+
cancel_same_sha_push_ci() {
250+
local run_ids run_id
251+
run_ids="$(
252+
gh run list --workflow ci.yml --limit 100 --json databaseId,event,headSha,status \
253+
--jq 'map(select(.event == "push" and .headSha == env.TARGET_SHA and (.status == "queued" or .status == "in_progress" or .status == "waiting" or .status == "pending"))) | .[].databaseId'
254+
)"
255+
if [[ -z "${run_ids// }" ]]; then
256+
return 0
257+
fi
258+
while IFS= read -r run_id; do
259+
[[ -n "${run_id// }" ]] || continue
260+
echo "Cancelling same-SHA push CI run ${run_id}; Full Release Validation dispatches the full manual CI child for ${TARGET_SHA}."
261+
gh run cancel "$run_id" || gh api -X POST "repos/${GITHUB_REPOSITORY}/actions/runs/${run_id}/force-cancel" || true
262+
done <<< "$run_ids"
263+
}
264+
265+
cancel_same_sha_push_ci
249266
dispatch_and_wait ci.yml -f target_ref="$TARGET_SHA"
250267
251268
release_checks:

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1893,13 +1893,17 @@ jobs:
18931893
echo 'OPENCLAW_LIVE_CLI_BACKEND_RESUME_ARGS=["exec","resume","{sessionId}","-c","sandbox_mode=\"danger-full-access\"","--skip-git-repo-check"]' >> "$GITHUB_ENV"
18941894
echo "OPENCLAW_LIVE_CLI_BACKEND_DEBUG=1" >> "$GITHUB_ENV"
18951895
echo "OPENCLAW_CLI_BACKEND_LOG_OUTPUT=1" >> "$GITHUB_ENV"
1896+
echo "OPENCLAW_TEST_CONSOLE=1" >> "$GITHUB_ENV"
18961897
echo "OPENCLAW_LIVE_CLI_BACKEND_USE_CI_SAFE_CODEX_CONFIG=1" >> "$GITHUB_ENV"
18971898
;;
18981899
live-codex-harness-docker)
18991900
# Keep CI on the API-key path for now. The staged Codex auth secret
19001901
# is currently stale, but the wrapper still supports codex-auth for
19011902
# local maintainer reruns without changing Peter's flow.
19021903
echo "OPENCLAW_LIVE_CODEX_HARNESS_AUTH=api-key" >> "$GITHUB_ENV"
1904+
echo "OPENCLAW_LIVE_CODEX_HARNESS_DEBUG=1" >> "$GITHUB_ENV"
1905+
echo "OPENCLAW_CLI_BACKEND_LOG_OUTPUT=1" >> "$GITHUB_ENV"
1906+
echo "OPENCLAW_TEST_CONSOLE=1" >> "$GITHUB_ENV"
19031907
;;
19041908
live-acp-bind-docker)
19051909
if [[ -n "${GEMINI_API_KEY:-}" || -n "${GOOGLE_API_KEY:-}" ]]; then

scripts/openclaw-cross-os-release-checks.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,20 @@ const providerConfig = {
5555
},
5656
};
5757

58+
const RELEASE_SMOKE_PLUGIN_ALLOWLIST_BASE = [
59+
"acpx",
60+
"bonjour",
61+
"browser",
62+
"device-pair",
63+
"memory-core",
64+
"phone-control",
65+
"talk-voice",
66+
];
67+
68+
export function buildCrossOsReleaseSmokePluginAllowlist(providerMeta) {
69+
return [...new Set([providerMeta.extensionId, ...RELEASE_SMOKE_PLUGIN_ALLOWLIST_BASE])];
70+
}
71+
5872
const PACKAGE_DIST_INVENTORY_RELATIVE_PATH = "dist/postinstall-inventory.json";
5973
const OMITTED_QA_EXTENSION_PREFIXES = [
6074
"dist/extensions/qa-channel/",
@@ -1844,6 +1858,20 @@ async function runInstalledModelsSet(params) {
18441858
logPath: params.logPath,
18451859
timeoutMs: 2 * 60 * 1000,
18461860
});
1861+
await runInstalledCli({
1862+
cliPath: params.cliPath,
1863+
args: [
1864+
"config",
1865+
"set",
1866+
"plugins.allow",
1867+
JSON.stringify(buildCrossOsReleaseSmokePluginAllowlist(params.providerConfig)),
1868+
"--strict-json",
1869+
],
1870+
cwd: params.cwd,
1871+
env: params.env,
1872+
logPath: params.logPath,
1873+
timeoutMs: 2 * 60 * 1000,
1874+
});
18471875
await runInstalledCli({
18481876
cliPath: params.cliPath,
18491877
args: ["config", "set", "agents.defaults.skipBootstrap", "true", "--strict-json"],
@@ -2600,6 +2628,19 @@ async function runModelsSet(params) {
26002628
logPath: params.logPath,
26012629
timeoutMs: 2 * 60 * 1000,
26022630
});
2631+
await runOpenClaw({
2632+
lane: params.lane,
2633+
env: params.env,
2634+
args: [
2635+
"config",
2636+
"set",
2637+
"plugins.allow",
2638+
JSON.stringify(buildCrossOsReleaseSmokePluginAllowlist(params.providerConfig)),
2639+
"--strict-json",
2640+
],
2641+
logPath: params.logPath,
2642+
timeoutMs: 2 * 60 * 1000,
2643+
});
26032644
await runOpenClaw({
26042645
lane: params.lane,
26052646
env: params.env,

scripts/postinstall-bundled-plugins.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,10 @@ export function createBundledRuntimeDependencyInstallEnv(env = process.env) {
451451
return {
452452
...createNestedNpmInstallEnv(env),
453453
npm_config_dry_run: "false",
454+
npm_config_fetch_retries: env.npm_config_fetch_retries ?? "5",
455+
npm_config_fetch_retry_maxtimeout: env.npm_config_fetch_retry_maxtimeout ?? "120000",
456+
npm_config_fetch_retry_mintimeout: env.npm_config_fetch_retry_mintimeout ?? "10000",
457+
npm_config_fetch_timeout: env.npm_config_fetch_timeout ?? "300000",
454458
npm_config_legacy_peer_deps: "true",
455459
npm_config_package_lock: "false",
456460
npm_config_save: "false",

scripts/stage-bundled-plugin-runtime-deps.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,10 @@ function runNpmInstall(params) {
886886
CI: "1",
887887
npm_config_audit: "false",
888888
npm_config_dry_run: "false",
889+
npm_config_fetch_retries: process.env.npm_config_fetch_retries ?? "5",
890+
npm_config_fetch_retry_maxtimeout: process.env.npm_config_fetch_retry_maxtimeout ?? "120000",
891+
npm_config_fetch_retry_mintimeout: process.env.npm_config_fetch_retry_mintimeout ?? "10000",
892+
npm_config_fetch_timeout: process.env.npm_config_fetch_timeout ?? "300000",
889893
npm_config_fund: "false",
890894
npm_config_legacy_peer_deps: "true",
891895
npm_config_loglevel: "error",

scripts/test-live-cli-backend-docker.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ DOCKER_RUN_ARGS=(docker run --rm -t \
471471
-e OPENCLAW_LIVE_CLI_BACKEND=1 \
472472
-e OPENCLAW_LIVE_CLI_BACKEND_DEBUG="${OPENCLAW_LIVE_CLI_BACKEND_DEBUG:-}" \
473473
-e OPENCLAW_CLI_BACKEND_LOG_OUTPUT="${OPENCLAW_CLI_BACKEND_LOG_OUTPUT:-}" \
474+
-e OPENCLAW_TEST_CONSOLE="${OPENCLAW_TEST_CONSOLE:-}" \
474475
-e OPENCLAW_LIVE_CLI_BACKEND_MODEL="$CLI_MODEL" \
475476
-e OPENCLAW_LIVE_CLI_BACKEND_COMMAND="${OPENCLAW_LIVE_CLI_BACKEND_COMMAND:-}" \
476477
-e OPENCLAW_LIVE_CLI_BACKEND_ARGS="${OPENCLAW_LIVE_CLI_BACKEND_ARGS:-}" \

scripts/test-live-codex-harness-docker.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ DOCKER_RUN_ARGS=(docker run --rm -t \
257257
-e OPENCLAW_LIVE_CODEX_HARNESS_SUBAGENT_ONLY="${OPENCLAW_LIVE_CODEX_HARNESS_SUBAGENT_ONLY:-}" \
258258
-e OPENCLAW_LIVE_CODEX_HARNESS_SUBAGENT_PROBE="${OPENCLAW_LIVE_CODEX_HARNESS_SUBAGENT_PROBE:-1}" \
259259
-e OPENCLAW_LIVE_CODEX_HARNESS_USE_CI_SAFE_CODEX_CONFIG="${OPENCLAW_LIVE_CODEX_HARNESS_USE_CI_SAFE_CODEX_CONFIG:-1}" \
260+
-e OPENCLAW_CLI_BACKEND_LOG_OUTPUT="${OPENCLAW_CLI_BACKEND_LOG_OUTPUT:-}" \
261+
-e OPENCLAW_TEST_CONSOLE="${OPENCLAW_TEST_CONSOLE:-}" \
260262
-e OPENCLAW_LIVE_DOCKER_SCRIPTS_DIR="${DOCKER_TRUSTED_HARNESS_CONTAINER_DIR}/scripts" \
261263
-e OPENCLAW_LIVE_DOCKER_TRUSTED_HARNESS_DIR="$DOCKER_TRUSTED_HARNESS_CONTAINER_DIR" \
262264
-e OPENCLAW_LIVE_CODEX_TRUSTED_HARNESS_DIR="$DOCKER_TRUSTED_HARNESS_CONTAINER_DIR" \

src/infra/npm-install-env.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ export function createNpmProjectInstallEnv(
2323
return {
2424
...nextEnv,
2525
npm_config_dry_run: "false",
26+
npm_config_fetch_retries: nextEnv.npm_config_fetch_retries ?? "5",
27+
npm_config_fetch_retry_maxtimeout: nextEnv.npm_config_fetch_retry_maxtimeout ?? "120000",
28+
npm_config_fetch_retry_mintimeout: nextEnv.npm_config_fetch_retry_mintimeout ?? "10000",
29+
npm_config_fetch_timeout: nextEnv.npm_config_fetch_timeout ?? "300000",
2630
npm_config_global: "false",
2731
npm_config_location: "project",
2832
npm_config_package_lock: "false",

src/infra/tsdown-config.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ describe("tsdown config", () => {
6666
"agents/auth-profiles.runtime",
6767
"agents/model-catalog.runtime",
6868
"agents/models-config.runtime",
69+
"plugins/memory-state",
6970
"subagent-registry.runtime",
7071
"task-registry-control.runtime",
7172
"agents/pi-model-discovery-runtime",

src/plugins/bundled-runtime-deps.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ describe("resolveBundledRuntimeDepsNpmRunner", () => {
186186
PATH: "/usr/bin:/bin",
187187
npm_config_cache: "/opt/openclaw/runtime-cache",
188188
npm_config_dry_run: "false",
189+
npm_config_fetch_retries: "5",
190+
npm_config_fetch_retry_maxtimeout: "120000",
191+
npm_config_fetch_retry_mintimeout: "10000",
192+
npm_config_fetch_timeout: "300000",
189193
npm_config_global: "false",
190194
npm_config_legacy_peer_deps: "true",
191195
npm_config_location: "project",

0 commit comments

Comments
 (0)