Skip to content

Commit ba108ad

Browse files
authored
perf(ci): balance release verification work and trim runtime builds (#133865)
1 parent e888f38 commit ba108ad

9 files changed

Lines changed: 184 additions & 48 deletions

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,15 +1057,20 @@ jobs:
10571057
command: pnpm test:e2e:gateway --shard=4/4
10581058
- name: UI 1/4
10591059
command: pnpm test:ui:e2e --shard=1/4
1060+
build_command: pnpm build:ci-artifacts
10601061
- name: UI 2/4
10611062
command: pnpm test:ui:e2e --shard=2/4
1063+
build_command: pnpm build:ci-artifacts
10621064
- name: UI 3/4
10631065
command: pnpm test:ui:e2e --shard=3/4
1066+
build_command: pnpm build:ci-artifacts
10641067
- name: UI 4/4
10651068
command: pnpm test:ui:e2e --shard=4/4
1069+
build_command: pnpm build:ci-artifacts
10661070
- name: Agent plugin Gateway
10671071
command: pnpm test:e2e:agent-plugin-gateway
10681072
target_script: test:e2e:agent-plugin-gateway
1073+
build_command: pnpm build:ci-artifacts
10691074
env:
10701075
OPENCLAW_BUILD_PRIVATE_QA: "1"
10711076
OPENCLAW_ENABLE_PRIVATE_QA_CLI: "1"
@@ -1088,7 +1093,8 @@ jobs:
10881093
- name: Build dist for repo E2E
10891094
env:
10901095
NODE_OPTIONS: --max-old-space-size=8192
1091-
run: pnpm build
1096+
# Gateway shards pack and type-check packages; runtime-only suites keep SDK checks without global declarations.
1097+
run: ${{ matrix.build_command || 'pnpm build' }}
10921098

10931099
- name: Install Playwright Chromium
10941100
run: pnpm --dir ui exec playwright install --with-deps chromium
@@ -1542,6 +1548,7 @@ jobs:
15421548
bash .release-harness/scripts/ci-docker-pull-retry.sh "${OPENCLAW_DOCKER_E2E_FUNCTIONAL_IMAGE}"
15431549
15441550
- name: Validate Docker E2E credentials
1551+
id: validate_credentials
15451552
if: contains(matrix.profiles, inputs.release_test_profile)
15461553
shell: bash
15471554
env:
@@ -1581,7 +1588,8 @@ jobs:
15811588
fi
15821589
15831590
- name: Run Docker E2E chunk
1584-
if: contains(matrix.profiles, inputs.release_test_profile)
1591+
# Missing live credentials still fail this job, but must not suppress non-live diagnostics.
1592+
if: ${{ !cancelled() && contains(matrix.profiles, inputs.release_test_profile) && (success() || steps.validate_credentials.outcome == 'failure') }}
15851593
shell: bash
15861594
run: |
15871595
set -euo pipefail
@@ -1928,6 +1936,7 @@ jobs:
19281936
bash .release-harness/scripts/ci-docker-pull-retry.sh "${OPENCLAW_DOCKER_E2E_FUNCTIONAL_IMAGE}"
19291937
19301938
- name: Validate Docker E2E credentials
1939+
id: validate_credentials
19311940
shell: bash
19321941
env:
19331942
CREDENTIALS: ${{ steps.plan.outputs.credentials }}
@@ -1966,6 +1975,7 @@ jobs:
19661975
fi
19671976
19681977
- name: Run targeted Docker E2E lanes
1978+
if: ${{ !cancelled() && (success() || steps.validate_credentials.outcome == 'failure') }}
19691979
shell: bash
19701980
env:
19711981
ARTIFACT_SUFFIX: ${{ steps.plan.outputs.artifact_suffix }}

‎docs/ci.md‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -876,8 +876,12 @@ A lane heavier than its effective cap can still start from an empty pool, then r
876876
Repository E2E runs as nine independent jobs: four native Gateway shards, four
877877
duration-weighted Control UI shards, and the standalone agent-plugin Gateway
878878
test. At most six run concurrently, and a failure does not cancel the remaining
879-
jobs. Every job checks out the same selected source and prepares its own full
880-
private-QA build, Chromium, and sandbox image. Gateway shards retain the existing
879+
jobs. Every job checks out the same selected source and prepares its own
880+
private-QA build, Chromium, and sandbox image. Gateway shards use the full build
881+
because they include packed-package type checks. UI and agent-plugin jobs use
882+
the existing CI artifact build, retaining runtime code, private QA entries,
883+
Control UI assets, and canonical SDK declarations/checks without generating
884+
unneeded package-wide declarations. Gateway shards retain the existing
881885
four fresh-process boundaries and two-worker limit; UI shards retain serial
882886
files within each process. No tests are filtered out, and the existing
883887
90-minute job deadline is unchanged. Local `pnpm test:e2e` remains sequential.
@@ -895,9 +899,11 @@ The reusable live/E2E workflow asks `scripts/test-docker-all.mjs --plan-json` wh
895899
Release Docker coverage runs smaller chunked jobs with `OPENCLAW_SKIP_DOCKER_BUILD=1` so each chunk verifies and loads only the artifact-backed image kind it needs (or pulls it under explicit `existing-only` reuse) and executes multiple lanes through the same weighted scheduler:
896900

897901
- `OPENCLAW_DOCKER_ALL_PROFILE=release-path`
898-
- `OPENCLAW_DOCKER_ALL_CHUNK=core | package-update-openai | package-update-anthropic | package-update-core | plugins-runtime-plugins | plugins-runtime-services | plugins-runtime-install-a..h | openwebui`
902+
- `OPENCLAW_DOCKER_ALL_CHUNK=core | package-update-openai | package-update-core | plugins-runtime-plugins | plugins-runtime-services | plugins-runtime-install-a..h | openwebui`
899903

900-
Current release Docker chunks are `core`, `package-update-openai`, `package-update-anthropic`, `package-update-core`, `plugins-runtime-plugins`, `plugins-runtime-services`, `plugins-runtime-install-a` through `plugins-runtime-install-h`, and `openwebui`. `package-update-openai` includes the live Codex plugin package lane, which installs the candidate OpenClaw package, installs the Codex plugin from `codex_plugin_spec` or a same-ref tarball with explicit Codex CLI install approval, runs Codex CLI preflight and same-session agent turns, then runs a zero-retry medium-thinking turn that sends progress, reads randomized workspace inputs, writes their exact artifact, and sends completion. `plugins-runtime-core`, `plugins-runtime`, and `plugins-integrations` remain aggregate plugin/runtime aliases. The `install-e2e` lane alias remains the aggregate manual rerun alias for both provider installer lanes.
904+
Current release Docker chunks are `core`, `package-update-openai`, `package-update-core`, `plugins-runtime-plugins`, `plugins-runtime-services`, `plugins-runtime-install-a` through `plugins-runtime-install-h`, and `openwebui`. `package-update-openai` includes the live Codex plugin package lane, which installs the candidate OpenClaw package, installs the Codex plugin from `codex_plugin_spec` or a same-ref tarball with explicit Codex CLI install approval, runs Codex CLI preflight and same-session agent turns, then runs a zero-retry medium-thinking turn that sends progress, reads randomized workspace inputs, writes their exact artifact, and sends completion. `plugins-runtime-core`, `plugins-runtime`, and `plugins-integrations` remain aggregate plugin/runtime aliases. The `install-e2e` lane alias remains the aggregate manual rerun alias for both provider installer lanes.
905+
906+
The `package-update-openai` row also runs root-managed VPS upgrade and authenticated update restart proof, balancing the existing package jobs without raising scheduler limits. Credential preflight failures remain blocking while the following diagnostic pool drains non-live lanes; earlier setup failures and cancellation still prevent execution.
901907

902908
OpenWebUI runs as a standalone `openwebui` chunk on a dedicated large-disk Blacksmith runner whenever stable or full release-path coverage requests it, even when the reusable workflow routes supported jobs to GitHub-hosted runners. Keeping the external image pull separate prevents the large image from competing with the shared package and plugin images in `plugins-runtime-services`; legacy aggregate plugin/runtime chunks still include OpenWebUI for compatible manual reruns. Bundled-channel update lanes retry once for transient npm network failures.
903909

‎docs/reference/RELEASING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ Release Docker coverage includes:
518518
- full install smoke with the slow Bun global install smoke enabled
519519
- root Dockerfile smoke image preparation/reuse by target SHA, with QR, root/gateway, and installer/Bun smoke jobs running as separate install-smoke shards
520520
- repository E2E lanes
521-
- release-path Docker chunks: `core`, `package-update-openai`, `package-update-anthropic`, `package-update-core`, `plugins-runtime-plugins`, `plugins-runtime-services`, `plugins-runtime-install-a` through `plugins-runtime-install-h`, and `openwebui`
521+
- release-path Docker chunks: `core`, `package-update-openai`, `package-update-core`, `plugins-runtime-plugins`, `plugins-runtime-services`, `plugins-runtime-install-a` through `plugins-runtime-install-h`, and `openwebui`
522522
- OpenWebUI coverage on a dedicated large-disk runner when requested
523523
- split bundled plugin install/uninstall lanes `bundled-plugin-install-uninstall-0` through `bundled-plugin-install-uninstall-23`
524524
- live/E2E provider suites and Docker live model coverage when release checks include live suites

‎docs/reference/full-release-validation.md‎

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -398,16 +398,22 @@ artifact when package or Docker-facing stages need it.
398398
The Docker release-path stage runs these chunks when `live_suite_filter` is
399399
empty:
400400

401-
| Chunk | Coverage |
402-
| --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
403-
| `core` | Core Docker release-path smoke lanes. |
404-
| `package-update-openai` | OpenAI package install/update behavior, Codex on-demand install, Codex plugin live progress follow-through, and Chat Completions tool calls. |
405-
| `package-update-anthropic` | Anthropic package install and update behavior. |
406-
| `package-update-core` | Provider-neutral package and update behavior. |
407-
| `plugins-runtime-plugins` | Plugin runtime lanes that exercise plugin behavior. |
408-
| `plugins-runtime-services` | Service-backed and live plugin runtime lanes. |
409-
| `plugins-runtime-install-a` through `plugins-runtime-install-h` | Plugin install/runtime batches split for parallel release validation. |
410-
| `openwebui` | OpenWebUI compatibility smoke isolated on a dedicated large-disk runner when requested. |
401+
| Chunk | Coverage |
402+
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
403+
| `core` | Core Docker release-path smoke lanes. |
404+
| `package-update-openai` | OpenAI package and tool-call proof, Codex on-demand install and live progress, root-managed VPS upgrades, and authenticated update restart. |
405+
| `package-update-core` | Provider-neutral package and update behavior. |
406+
| `plugins-runtime-plugins` | Plugin runtime lanes that exercise plugin behavior. |
407+
| `plugins-runtime-services` | Service-backed and live plugin runtime lanes. |
408+
| `plugins-runtime-install-a` through `plugins-runtime-install-h` | Plugin install/runtime batches split for parallel release validation. |
409+
| `openwebui` | OpenWebUI compatibility smoke isolated on a dedicated large-disk runner when requested. |
410+
411+
The two package/update rows share the same coverage across every release profile.
412+
Root-managed VPS upgrade and authenticated restart checks run in the shorter
413+
OpenAI row to balance the workload without adding jobs or raising resource caps.
414+
Missing required credentials still fail the job; the diagnostic pool continues
415+
so independent non-live checks also report their results. Setup failures and
416+
cancellation do not start that pool.
411417

412418
Expanded published-upgrade survivor and update-migration coverage runs in
413419
baseline-specific groups of at most three scenarios, with up to 32 targeted

‎scripts/lib/docker-e2e-scenarios.mts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,8 @@ const releasePathPackageUpdateOpenAiLanes = [
877877
scheduledLane("live-codex-npm-plugin"),
878878
scheduledLane("codex-on-demand", { timeoutMs: 30 * 60 * 1000 }),
879879
scheduledLane("release-typed-onboarding"),
880+
// Use the shorter package row without changing npm weights or upgrade coverage.
881+
...scheduledLaneList("root-managed-vps-upgrade", "update-restart-auth"),
880882
];
881883

882884
const releasePathPackageUpdateCoreLanes = scheduledLaneList(
@@ -888,8 +890,6 @@ const releasePathPackageUpdateCoreLanes = scheduledLaneList(
888890
"skill-install",
889891
"upgrade-survivor",
890892
"published-upgrade-survivor",
891-
"root-managed-vps-upgrade",
892-
"update-restart-auth",
893893
"update-run-package-self-upgrade",
894894
);
895895

‎scripts/plan-release-workflow-matrix.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const DOCKER_E2E_CHUNKS = [
1010
},
1111
{
1212
chunk_id: "package-update-openai",
13-
label: "package/update OpenAI",
13+
label: "package/update OpenAI and recovery",
1414
timeout_minutes: 45,
1515
profiles: "beta minimum stable full",
1616
},

‎test/scripts/ci-workflow-guards.test.ts‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4585,6 +4585,22 @@ server.listen(0, "127.0.0.1", () => {
45854585
expect(repoE2eSteps.find((step) => step.name === "Checkout selected ref")?.with?.ref).toBe(
45864586
"${{ needs.validate_selected_ref.outputs.selected_sha }}",
45874587
);
4588+
const build = repoE2eSteps.find((step) => step.name === "Build dist for repo E2E");
4589+
for (const row of repoE2eRows) {
4590+
const command = build?.run?.startsWith("${{")
4591+
? evaluateWorkflowExpression(build.run, {
4592+
eventName: "workflow_dispatch",
4593+
repository: "openclaw/openclaw",
4594+
runAttempt: 1,
4595+
matrix: row,
4596+
})
4597+
: build?.run;
4598+
// Gateway shards include packed-package type consumers; UI and the
4599+
// standalone agent-plugin proof need runtime and canonical SDK artifacts.
4600+
expect(command, row.name).toBe(
4601+
row.command.startsWith("pnpm test:e2e:gateway ") ? "pnpm build" : "pnpm build:ci-artifacts",
4602+
);
4603+
}
45884604
const sandboxSetupIndex = repoE2eSteps.findIndex(
45894605
(step) => step.name === "Build sandbox image" && step.run === "scripts/sandbox-setup.sh",
45904606
);

‎test/scripts/docker-e2e-plan.test.ts‎

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,8 @@ describe("scripts/lib/docker-e2e-plan", () => {
571571
"live-codex-npm-plugin",
572572
"codex-on-demand",
573573
"release-typed-onboarding",
574+
"root-managed-vps-upgrade",
575+
"update-restart-auth",
574576
]);
575577
expect(
576578
packageInstallOpenAi.lanes
@@ -588,6 +590,34 @@ describe("scripts/lib/docker-e2e-plan", () => {
588590
weight: 3,
589591
},
590592
]);
593+
expect(packageInstallOpenAi.lanes.slice(-2).map(summarizeLane)).toEqual([
594+
{
595+
command: trustedUpgradeSurvivorCommand(
596+
"OPENCLAW_UPGRADE_SURVIVOR_PUBLISHED_BASELINE=1 OPENCLAW_UPGRADE_SURVIVOR_ROOT_MANAGED_VPS=1",
597+
'export OPENCLAW_UPGRADE_SURVIVOR_BASELINE_SPEC="${OPENCLAW_UPGRADE_SURVIVOR_BASELINE_SPEC:-openclaw@latest}"; export OPENCLAW_UPGRADE_SURVIVOR_DOCKER_RUN_TIMEOUT="${OPENCLAW_UPGRADE_SURVIVOR_DOCKER_RUN_TIMEOUT:-1500s}"',
598+
),
599+
imageKind: "bare",
600+
live: false,
601+
name: "root-managed-vps-upgrade",
602+
resources: ["docker", "npm"],
603+
stateScenario: "upgrade-survivor",
604+
timeoutMs: 1_500_000,
605+
weight: 3,
606+
},
607+
{
608+
command: trustedUpgradeSurvivorCommand(
609+
"OPENCLAW_UPGRADE_SURVIVOR_PUBLISHED_BASELINE=1 OPENCLAW_UPGRADE_SURVIVOR_UPDATE_RESTART_MODE=auto-auth",
610+
'export OPENCLAW_UPGRADE_SURVIVOR_BASELINE_SPEC="${OPENCLAW_UPGRADE_SURVIVOR_BASELINE_SPEC:-openclaw@latest}"; export OPENCLAW_UPGRADE_SURVIVOR_DOCKER_RUN_TIMEOUT="${OPENCLAW_UPGRADE_SURVIVOR_DOCKER_RUN_TIMEOUT:-1500s}"',
611+
),
612+
imageKind: "bare",
613+
live: false,
614+
name: "update-restart-auth",
615+
resources: ["docker", "npm"],
616+
stateScenario: "upgrade-survivor",
617+
timeoutMs: 1_500_000,
618+
weight: 3,
619+
},
620+
]);
591621
expect(packageUpdateCore.lanes.map(summarizeLane)).toEqual([
592622
{
593623
command: "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:npm-onboard-channel-agent",
@@ -670,32 +700,6 @@ describe("scripts/lib/docker-e2e-plan", () => {
670700
timeoutMs: 1_500_000,
671701
weight: 3,
672702
},
673-
{
674-
command: trustedUpgradeSurvivorCommand(
675-
"OPENCLAW_UPGRADE_SURVIVOR_PUBLISHED_BASELINE=1 OPENCLAW_UPGRADE_SURVIVOR_ROOT_MANAGED_VPS=1",
676-
'export OPENCLAW_UPGRADE_SURVIVOR_BASELINE_SPEC="${OPENCLAW_UPGRADE_SURVIVOR_BASELINE_SPEC:-openclaw@latest}"; export OPENCLAW_UPGRADE_SURVIVOR_DOCKER_RUN_TIMEOUT="${OPENCLAW_UPGRADE_SURVIVOR_DOCKER_RUN_TIMEOUT:-1500s}"',
677-
),
678-
imageKind: "bare",
679-
live: false,
680-
name: "root-managed-vps-upgrade",
681-
resources: ["docker", "npm"],
682-
stateScenario: "upgrade-survivor",
683-
timeoutMs: 1_500_000,
684-
weight: 3,
685-
},
686-
{
687-
command: trustedUpgradeSurvivorCommand(
688-
"OPENCLAW_UPGRADE_SURVIVOR_PUBLISHED_BASELINE=1 OPENCLAW_UPGRADE_SURVIVOR_UPDATE_RESTART_MODE=auto-auth",
689-
'export OPENCLAW_UPGRADE_SURVIVOR_BASELINE_SPEC="${OPENCLAW_UPGRADE_SURVIVOR_BASELINE_SPEC:-openclaw@latest}"; export OPENCLAW_UPGRADE_SURVIVOR_DOCKER_RUN_TIMEOUT="${OPENCLAW_UPGRADE_SURVIVOR_DOCKER_RUN_TIMEOUT:-1500s}"',
690-
),
691-
imageKind: "bare",
692-
live: false,
693-
name: "update-restart-auth",
694-
resources: ["docker", "npm"],
695-
stateScenario: "upgrade-survivor",
696-
timeoutMs: 1_500_000,
697-
weight: 3,
698-
},
699703
{
700704
command:
701705
"OPENCLAW_QA_ALLOW_UPDATE_RUN_SELF=1 OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:update-run-package-self-upgrade",
@@ -853,6 +857,8 @@ describe("scripts/lib/docker-e2e-plan", () => {
853857
"live-codex-npm-plugin",
854858
"codex-on-demand",
855859
"release-typed-onboarding",
860+
"root-managed-vps-upgrade",
861+
"update-restart-auth",
856862
"npm-onboard-channel-agent",
857863
"npm-onboard-discord-channel-agent",
858864
"npm-onboard-slack-channel-agent",
@@ -861,8 +867,6 @@ describe("scripts/lib/docker-e2e-plan", () => {
861867
"skill-install",
862868
"upgrade-survivor",
863869
"published-upgrade-survivor",
864-
"root-managed-vps-upgrade",
865-
"update-restart-auth",
866870
"update-run-package-self-upgrade",
867871
]);
868872
expect(pluginsRuntime.lanes.map((lane) => lane.name)).toEqual([

0 commit comments

Comments
 (0)