From 32b1f0ce74334ba6f9aaaa89ff0b382564d5795d Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 27 Apr 2026 06:17:04 +0100 Subject: [PATCH] ci: narrow package acceptance to artifact lanes --- .github/workflows/package-acceptance.yml | 4 ++-- docs/ci.md | 4 ++-- docs/reference/RELEASING.md | 2 +- scripts/e2e/plugin-update-unchanged-docker.sh | 15 ++++++++++++++- scripts/e2e/plugins-docker.sh | 12 +++++++++--- scripts/e2e/update-channel-switch-docker.sh | 4 ++-- scripts/lib/docker-e2e-scenarios.mjs | 5 +++++ test/scripts/docker-build-helper.test.ts | 2 ++ test/scripts/package-acceptance-workflow.test.ts | 3 ++- 9 files changed, 39 insertions(+), 12 deletions(-) diff --git a/.github/workflows/package-acceptance.yml b/.github/workflows/package-acceptance.yml index 839bf58339a..88bcc7d55f9 100644 --- a/.github/workflows/package-acceptance.yml +++ b/.github/workflows/package-acceptance.yml @@ -338,10 +338,10 @@ jobs: docker_lanes="npm-onboard-channel-agent gateway-network config-reload" ;; package) - docker_lanes="install-e2e npm-onboard-channel-agent doctor-switch update-channel-switch bundled-channel-deps plugins-offline plugin-update" + docker_lanes="npm-onboard-channel-agent doctor-switch update-channel-switch bundled-channel-deps-compat plugins-offline plugin-update" ;; product) - docker_lanes="install-e2e npm-onboard-channel-agent doctor-switch update-channel-switch bundled-channel-deps plugins plugin-update mcp-channels cron-mcp-cleanup openai-web-search-minimal openwebui" + docker_lanes="npm-onboard-channel-agent doctor-switch update-channel-switch bundled-channel-deps-compat plugins plugin-update mcp-channels cron-mcp-cleanup openai-web-search-minimal openwebui" include_openwebui=true ;; full) diff --git a/docs/ci.md b/docs/ci.md index a9d1bf1ceca..b9f6dedf101 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -78,8 +78,8 @@ older trusted source commits without running old workflow logic. Profiles map to Docker coverage: - `smoke`: `npm-onboard-channel-agent`, `gateway-network`, `config-reload` -- `package`: `install-e2e`, `npm-onboard-channel-agent`, `doctor-switch`, - `update-channel-switch`, `bundled-channel-deps`, `plugins-offline`, +- `package`: `npm-onboard-channel-agent`, `doctor-switch`, + `update-channel-switch`, `bundled-channel-deps-compat`, `plugins-offline`, `plugin-update` - `product`: `package` plus `mcp-channels`, `cron-mcp-cleanup`, `openai-web-search-minimal`, `openwebui` diff --git a/docs/reference/RELEASING.md b/docs/reference/RELEASING.md index b65c6a4fa58..2fd88ac47ea 100644 --- a/docs/reference/RELEASING.md +++ b/docs/reference/RELEASING.md @@ -118,7 +118,7 @@ the maintainer-only release runbook. Example: `gh workflow run package-acceptance.yml --ref main -f workflow_ref=main -f source=npm -f package_spec=openclaw@beta -f suite_profile=product -f telegram_mode=mock-openai` Common profiles: - `smoke`: install/channel/agent, gateway network, and config reload lanes - - `package`: package/update/plugin lanes without OpenWebUI or live ClawHub + - `package`: artifact-native package/update/plugin lanes without OpenWebUI or live ClawHub - `product`: package profile plus MCP channels, cron/subagent cleanup, OpenAI web search, and OpenWebUI - `full`: Docker release-path chunks with OpenWebUI diff --git a/scripts/e2e/plugin-update-unchanged-docker.sh b/scripts/e2e/plugin-update-unchanged-docker.sh index 3121a1340c9..430c2f32cea 100755 --- a/scripts/e2e/plugin-update-unchanged-docker.sh +++ b/scripts/e2e/plugin-update-unchanged-docker.sh @@ -39,7 +39,20 @@ cat > \"\$HOME/.openclaw/extensions/lossless-claw/package.json\" <<'JSON' JSON cat > \"\$HOME/.openclaw/openclaw.json\" <<'JSON' { - \"plugins\": {} + \"plugins\": { + \"installs\": { + \"lossless-claw\": { + \"source\": \"npm\", + \"spec\": \"@example/lossless-claw@0.9.0\", + \"installPath\": \"~/.openclaw/extensions/lossless-claw\", + \"resolvedName\": \"@example/lossless-claw\", + \"resolvedVersion\": \"0.9.0\", + \"resolvedSpec\": \"@example/lossless-claw@0.9.0\", + \"integrity\": \"sha512-same\", + \"shasum\": \"same\" + } + } + } } JSON mkdir -p \"\$HOME/.openclaw/plugins\" diff --git a/scripts/e2e/plugins-docker.sh b/scripts/e2e/plugins-docker.sh index 95d01e72ed8..2a357eeebff 100755 --- a/scripts/e2e/plugins-docker.sh +++ b/scripts/e2e/plugins-docker.sh @@ -560,7 +560,9 @@ const path = require("node:path"); const indexPath = path.join(process.env.HOME, ".openclaw", "plugins", "installs.json"); const index = JSON.parse(fs.readFileSync(indexPath, "utf8")); -const installRecords = index.installRecords ?? index.records ?? {}; +const configPath = path.join(process.env.HOME, ".openclaw", "openclaw.json"); +const config = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, "utf8")) : {}; +const installRecords = index.installRecords ?? index.records ?? config.plugins?.installs ?? {}; for (const id of ["marketplace-shortcut", "marketplace-direct"]) { const record = installRecords[id]; if (!record) throw new Error(`missing install record for ${id}`); @@ -846,7 +848,9 @@ if (inspect.plugin?.id !== pluginId) { const indexPath = path.join(process.env.HOME, ".openclaw", "plugins", "installs.json"); const index = JSON.parse(fs.readFileSync(indexPath, "utf8")); -const installRecords = index.installRecords ?? index.records ?? {}; +const configPath = path.join(process.env.HOME, ".openclaw", "openclaw.json"); +const config = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, "utf8")) : {}; +const installRecords = index.installRecords ?? index.records ?? config.plugins?.installs ?? {}; const record = installRecords[pluginId]; if (!record) throw new Error(`missing ClawHub install record for ${pluginId}`); if (record.source !== "clawhub") { @@ -892,7 +896,9 @@ if ((list.plugins || []).some((entry) => entry.id === pluginId)) { const indexPath = path.join(process.env.HOME, ".openclaw", "plugins", "installs.json"); const index = fs.existsSync(indexPath) ? JSON.parse(fs.readFileSync(indexPath, "utf8")) : {}; -const installRecords = index.installRecords ?? index.records ?? {}; +const configPath = path.join(process.env.HOME, ".openclaw", "openclaw.json"); +const config = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, "utf8")) : {}; +const installRecords = index.installRecords ?? index.records ?? config.plugins?.installs ?? {}; if (installRecords[pluginId]) { throw new Error(`ClawHub install record still present after uninstall: ${pluginId}`); } diff --git a/scripts/e2e/update-channel-switch-docker.sh b/scripts/e2e/update-channel-switch-docker.sh index 0dadcf6a1ad..526367c5fdd 100755 --- a/scripts/e2e/update-channel-switch-docker.sh +++ b/scripts/e2e/update-channel-switch-docker.sh @@ -138,7 +138,7 @@ if (payload.status !== "ok") { if (payload.mode !== "git") { throw new Error(`expected dev update mode git, got ${payload.mode}`); } -if (payload.postUpdate?.plugins?.status !== "ok") { +if (payload.postUpdate?.plugins && payload.postUpdate.plugins.status !== "ok") { throw new Error(`expected plugin post-update ok, got ${JSON.stringify(payload.postUpdate?.plugins)}`); } NODE @@ -182,7 +182,7 @@ if (payload.status !== "ok") { if (!["npm", "pnpm", "bun"].includes(payload.mode)) { throw new Error(`expected package-manager mode after stable switch, got ${payload.mode}`); } -if (payload.postUpdate?.plugins?.status !== "ok") { +if (payload.postUpdate?.plugins && payload.postUpdate.plugins.status !== "ok") { throw new Error(`expected plugin post-update ok, got ${JSON.stringify(payload.postUpdate?.plugins)}`); } NODE diff --git a/scripts/lib/docker-e2e-scenarios.mjs b/scripts/lib/docker-e2e-scenarios.mjs index 4c9345de4c9..61d77e3b52d 100644 --- a/scripts/lib/docker-e2e-scenarios.mjs +++ b/scripts/lib/docker-e2e-scenarios.mjs @@ -223,6 +223,11 @@ export const mainLanes = [ weight: 6, }, ), + npmLane( + "bundled-channel-deps-compat", + "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:bundled-channel-deps:fast", + { resources: ["service"], weight: 3 }, + ), npmLane("plugin-update", "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:plugin-update"), serviceLane("config-reload", "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:config-reload"), ...bundledScenarioLanes, diff --git a/test/scripts/docker-build-helper.test.ts b/test/scripts/docker-build-helper.test.ts index 50d9ec3f732..df34ddf23b1 100644 --- a/test/scripts/docker-build-helper.test.ts +++ b/test/scripts/docker-build-helper.test.ts @@ -65,6 +65,8 @@ describe("docker build helper", () => { expect(scenarios).toContain('"plugins-offline"'); expect(scenarios).toContain("OPENCLAW_PLUGINS_E2E_CLAWHUB=0"); + expect(scenarios).toContain('"bundled-channel-deps-compat"'); + expect(scenarios).toContain("test:docker:bundled-channel-deps:fast"); }); it("passes installer tag env to bash, not curl", () => { diff --git a/test/scripts/package-acceptance-workflow.test.ts b/test/scripts/package-acceptance-workflow.test.ts index 488d409b139..09a3c505dbc 100644 --- a/test/scripts/package-acceptance-workflow.test.ts +++ b/test/scripts/package-acceptance-workflow.test.ts @@ -39,7 +39,8 @@ describe("package acceptance workflow", () => { expect(workflow).toContain("suite_profile:"); expect(workflow).toContain("npm-onboard-channel-agent gateway-network config-reload"); - expect(workflow).toContain("install-e2e npm-onboard-channel-agent doctor-switch"); + expect(workflow).toContain("npm-onboard-channel-agent doctor-switch"); + expect(workflow).toContain("bundled-channel-deps-compat"); expect(workflow).toContain("plugins-offline plugin-update"); expect(workflow).toContain("include_release_path_suites=true"); expect(workflow).not.toContain("telegram_mode requires source=npm");