From 0a8a2557335a3cdea616506b1d9d383c3268aaa5 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Tue, 28 Apr 2026 21:50:16 -0700 Subject: [PATCH] ci: restrict plugin prerelease suite to mega runs --- .github/workflows/ci.yml | 3 ++- docs/ci.md | 8 +++++--- test/scripts/plugin-prerelease-test-plan.test.ts | 11 +++++++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e7ab811ebe..0935ac44813 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -185,6 +185,7 @@ jobs: const runControlUiI18n = parseBoolean(process.env.OPENCLAW_CI_RUN_CONTROL_UI_I18N) && !docsOnly; const pluginPrereleasePlan = assertPluginPrereleaseTestPlanComplete(); + const isMegaCiRun = process.env.OPENCLAW_CI_EVENT_NAME === "workflow_dispatch"; const trustedPluginPrereleaseRef = process.env.OPENCLAW_CI_EVENT_NAME !== "pull_request" || process.env.OPENCLAW_CI_PR_HEAD_REPOSITORY === process.env.OPENCLAW_CI_REPOSITORY; @@ -193,7 +194,7 @@ jobs: ? process.env.OPENCLAW_CI_PR_HEAD_SHA : process.env.OPENCLAW_CI_CHECKOUT_REVISION; const runPluginPrereleaseSuite = - runNodeFull && isCanonicalRepository && trustedPluginPrereleaseRef; + isMegaCiRun && runNodeFull && isCanonicalRepository; const extensionTestShardCount = isCanonicalRepository ? DEFAULT_EXTENSION_TEST_SHARD_COUNT : Math.max(DEFAULT_EXTENSION_TEST_SHARD_COUNT, 36); diff --git a/docs/ci.md b/docs/ci.md index 7566ead195b..d74e412ae98 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -343,6 +343,7 @@ gh workflow run duplicate-after-merge.yml \ | `build-smoke` | Built-CLI smoke tests and startup-memory smoke | Node-relevant changes | | `checks` | Verifier for built-artifact channel tests | Node-relevant changes | | `checks-node-compat-node22` | Node 22 compatibility build and smoke lane | Manual CI dispatch for releases | +| `plugin-prerelease-suite` | Aggregate for plugin prerelease static checks and Docker product lanes | Manual CI dispatch for releases | | `check-docs` | Docs formatting, lint, and broken-link checks | Docs changed | | `skills-python` | Ruff + pytest for Python-backed skills | Python-skill-relevant changes | | `checks-windows` | Windows-specific process/path tests plus shared runtime import specifier regressions | Windows-relevant changes | @@ -353,8 +354,9 @@ gh workflow run duplicate-after-merge.yml \ Manual CI dispatches run the same job graph as normal CI but force every scoped lane on: Linux Node shards, bundled-plugin shards, channel contracts, -Node 22 compatibility, `check`, `check-additional`, build smoke, docs checks, -Python skills, Windows, macOS, Android, and Control UI i18n. Manual runs use a +Node 22 compatibility, plugin prerelease coverage, `check`, +`check-additional`, build smoke, docs checks, Python skills, Windows, macOS, +Android, and Control UI i18n. Manual runs use a unique concurrency group so a release-candidate full suite is not cancelled by another push or PR run on the same ref. The optional `target_ref` input lets a trusted caller run that graph against a branch, tag, or full commit SHA while @@ -406,7 +408,7 @@ copy of the PR. Stop that box and warm a fresh one instead of debugging the product test failure. For intentional large deletion PRs, set `OPENCLAW_TESTBOX_ALLOW_MASS_DELETIONS=1` for that sanity run. -Manual CI dispatches run `checks-node-compat-node22` as release-candidate compatibility coverage. Normal pull requests and `main` pushes skip that lane and keep the matrix focused on the Node 24 test/channel lanes. +Manual CI dispatches run `checks-node-compat-node22` and `plugin-prerelease-suite` as release-candidate compatibility coverage. Normal pull requests and `main` pushes skip those lanes and keep the matrix focused on the Node 24 test/channel lanes. The slowest Node test families are split or balanced so each job stays small without over-reserving runners: channel contracts run as three weighted shards, bundled plugin tests balance across six extension workers, small core unit lanes are paired, auto-reply runs as four balanced workers with the reply subtree split into agent-runner, dispatch, and commands/state-routing shards, and agentic gateway/plugin configs are spread across the existing source-only agentic Node jobs instead of waiting on built artifacts. Broad browser, QA, media, and miscellaneous plugin tests use their dedicated Vitest configs instead of the shared plugin catch-all. Extension shard jobs run up to two plugin config groups at a time with one Vitest worker per group and a larger Node heap so import-heavy plugin batches do not create extra CI jobs. The broad agents lane uses the shared Vitest file-parallel scheduler because it is import/scheduling dominated rather than owned by a single slow test file. `runtime-config` runs with the infra core-runtime shard to keep the shared runtime shard from owning the tail. Include-pattern shards record timing entries using the CI shard name, so `.artifacts/vitest-shard-timings.json` can distinguish a whole config from a filtered shard. `check-additional` keeps package-boundary compile/canary work together and separates runtime topology architecture from gateway watch coverage; the boundary guard shard runs its small independent guards concurrently inside one job. Gateway watch, channel tests, and the core support-boundary shard run concurrently inside `build-artifacts` after `dist/` and `dist-runtime/` are already built, keeping their old check names as lightweight verifier jobs while avoiding two extra Blacksmith workers and a second artifact-consumer queue. Android CI runs both `testPlayDebugUnitTest` and `testThirdPartyDebugUnitTest`, then builds the Play debug APK. The third-party flavor has no separate source set or manifest; its unit-test lane still compiles that flavor with the SMS/call-log BuildConfig flags, while avoiding a duplicate debug APK packaging job on every Android-relevant push. diff --git a/test/scripts/plugin-prerelease-test-plan.test.ts b/test/scripts/plugin-prerelease-test-plan.test.ts index 7dc274ab4b8..a1e0cba3fe4 100644 --- a/test/scripts/plugin-prerelease-test-plan.test.ts +++ b/test/scripts/plugin-prerelease-test-plan.test.ts @@ -14,7 +14,7 @@ function readCiWorkflow() { } describe("scripts/lib/plugin-prerelease-test-plan.mjs", () => { - it("covers every pre-release plugin skill surface in normal CI", () => { + it("covers every pre-release plugin skill surface in mega CI", () => { const plan = assertPluginPrereleaseTestPlanComplete(); expect(plan.surfaces).toEqual( @@ -53,7 +53,7 @@ describe("scripts/lib/plugin-prerelease-test-plan.mjs", () => { } }); - it("keeps live-ish coverage credential-gated in PR CI", () => { + it("keeps live-ish coverage outside provider-backed Docker lanes", () => { const plan = createPluginPrereleaseTestPlan(); expect(plan.dockerLanes).not.toContain("openai-web-search-minimal"); @@ -109,6 +109,7 @@ describe("scripts/lib/plugin-prerelease-test-plan.mjs", () => { const staticShard = workflow.jobs["plugin-prerelease-static-shard"]; const dockerSuite = workflow.jobs["plugin-prerelease-docker-suite"]; const suite = workflow.jobs["plugin-prerelease-suite"]; + const manifestScript = preflight.steps.find((step) => step.name === "Build CI manifest").run; expect(preflight.outputs).toMatchObject({ plugin_prerelease_docker_lanes: @@ -122,6 +123,12 @@ describe("scripts/lib/plugin-prerelease-test-plan.mjs", () => { name: "${{ matrix.check_name }}", "runs-on": "blacksmith-8vcpu-ubuntu-2404", }); + expect(manifestScript).toContain( + 'const isMegaCiRun = process.env.OPENCLAW_CI_EVENT_NAME === "workflow_dispatch";', + ); + expect(manifestScript).toContain( + "const runPluginPrereleaseSuite =\n isMegaCiRun && runNodeFull && isCanonicalRepository;", + ); expect(staticShard.strategy.matrix).toBe( "${{ fromJson(needs.preflight.outputs.plugin_prerelease_static_matrix) }}", );