diff --git a/docs/ci/pipeline.md b/docs/ci/pipeline.md index c0e945fc5bc6..162d80fa0544 100644 --- a/docs/ci/pipeline.md +++ b/docs/ci/pipeline.md @@ -82,6 +82,10 @@ checkout revision. Partial, filtered or unknown plans retain the explicit step; release-gate dispatches retain their separate merge-tree proof. Both state repair passes, all static baseline ratchets and required Node failure aggregation remain unchanged. +The corpus uses the normal bundled-plugin resolver to select the prepared +runtime from this checkout instead of forcing TypeScript plugin entrypoints. +Plugins whose Doctor contracts require source loading retain that behavior; +the complete config/state matrix and its assertions remain intact. Ordinary pull requests that change only independent Control UI unit-test entries keep all three UI unit rows, performance checks, and existing type/lint gates, diff --git a/src/config/config-startup-corpus.test.ts b/src/config/config-startup-corpus.test.ts index 9701817c9d23..878f4cf476b0 100644 --- a/src/config/config-startup-corpus.test.ts +++ b/src/config/config-startup-corpus.test.ts @@ -8,10 +8,18 @@ import { acquireReadOnlyPreparedModelRuntime } from "../agents/prepared-model-ru import { applyLegacyCompatibilityStep } from "../commands/doctor/shared/config-flow-steps.js"; import { normalizeCompatibilityConfigValues } from "../commands/doctor/shared/legacy-config-core-migrate.js"; import { loadGatewayStartupConfigSnapshot } from "../gateway/server-startup-config-helpers.js"; +import { resolveBundledDirFromPackageRoot } from "../plugins/bundled-dir.js"; import { resolveProviderChannelLoginChoice } from "../plugins/provider-login-options.js"; import { createConfigIO } from "./io.js"; import type { OpenClawConfig } from "./types.js"; +const bundledPluginsDir = resolveBundledDirFromPackageRoot( + fileURLToPath(new URL("../../", import.meta.url)), +); +if (!bundledPluginsDir) { + throw new Error("Missing bundled plugin fixtures for startup corpus"); +} + const corpusDir = fileURLToPath(new URL("../../test/fixtures/config-corpus/", import.meta.url)); const fixtureNames = fs .readdirSync(corpusDir) @@ -107,7 +115,7 @@ describe("operator config startup corpus", () => { OPENCLAW_STATE_DIR: home, DISCORD_BOT_TOKEN: "synthetic-token", OPENCLAW_DISABLE_BUNDLED_PLUGINS: "0", - OPENCLAW_BUNDLED_PLUGINS_DIR: fileURLToPath(new URL("../../extensions/", import.meta.url)), + OPENCLAW_BUNDLED_PLUGINS_DIR: bundledPluginsDir, }; const snapshot = await createConfigIO({ configPath, @@ -173,7 +181,7 @@ describe("operator config startup corpus", () => { OPENCLAW_TEST_HOME: home, OPENCLAW_STATE_DIR: stateDir, OPENCLAW_CONFIG_PATH: configPath, - OPENCLAW_BUNDLED_PLUGINS_DIR: fileURLToPath(new URL("../../extensions/", import.meta.url)), + OPENCLAW_BUNDLED_PLUGINS_DIR: bundledPluginsDir, OPENCLAW_DISABLE_BUNDLED_PLUGINS: "0", })) { vi.stubEnv(key, value); diff --git a/src/config/state-startup-corpus.test.ts b/src/config/state-startup-corpus.test.ts index a5b997bcc618..3214aa7bd07f 100644 --- a/src/config/state-startup-corpus.test.ts +++ b/src/config/state-startup-corpus.test.ts @@ -13,6 +13,7 @@ import { loadCronJobsStore, resolveCronJobsStorePathFromConfig } from "../cron/s import { loadGatewayStartupConfigSnapshot } from "../gateway/server-startup-config-helpers.js"; import { runStartupSessionMigration } from "../gateway/server-startup-session-migration.js"; import { openNodeSqliteDatabase } from "../infra/node-sqlite.js"; +import { resolveBundledDirFromPackageRoot } from "../plugins/bundled-dir.js"; import { closeOpenClawAgentDatabasesAsync, OPENCLAW_AGENT_SCHEMA_VERSION, @@ -29,6 +30,13 @@ import { } from "./sessions.js"; import { loadSessionEntryReadOnly } from "./sessions/session-accessor.js"; +const bundledPluginsDir = resolveBundledDirFromPackageRoot( + fileURLToPath(new URL("../../", import.meta.url)), +); +if (!bundledPluginsDir) { + throw new Error("Missing bundled plugin fixtures for startup corpus"); +} + type StateFixture = { release: string; sessions: Array<{ @@ -83,7 +91,7 @@ function prepareState(release: string, configName: string) { OPENCLAW_TEST_HOME: home, OPENCLAW_STATE_DIR: stateDir, OPENCLAW_CONFIG_PATH: configPath, - OPENCLAW_BUNDLED_PLUGINS_DIR: fileURLToPath(new URL("../../extensions/", import.meta.url)), + OPENCLAW_BUNDLED_PLUGINS_DIR: bundledPluginsDir, OPENCLAW_DISABLE_BUNDLED_PLUGINS: "0", })) { vi.stubEnv(key, value);