From cb3e6df656769034268df9331fcde9f21d19946f Mon Sep 17 00:00:00 2001 From: joshavant <830519+joshavant@users.noreply.github.com> Date: Thu, 24 Sep 2026 22:39:43 -0500 Subject: [PATCH] fix(ci): repair schema and test-plan fixtures --- scripts/pr-lib/wrapper-components.txt | 1 + src/state/openclaw-database-maintenance.test.ts | 11 +++++++++++ test/scripts/ci-node-test-plan.test.ts | 8 +++++++- test/vitest/vitest.gateway-server-paths.mjs | 4 ++-- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/scripts/pr-lib/wrapper-components.txt b/scripts/pr-lib/wrapper-components.txt index afde7c34de4d..e0247467d316 100644 --- a/scripts/pr-lib/wrapper-components.txt +++ b/scripts/pr-lib/wrapper-components.txt @@ -1027,6 +1027,7 @@ src/plugins/plugin-generation-artifact.ts src/plugins/plugin-generation-source-lookup.ts src/plugins/plugin-install-default-choice.ts src/plugins/plugin-instance-argument-views.ts +src/plugins/plugin-instance-disposal.ts src/plugins/plugin-instance-error.ts src/plugins/plugin-instance-invocation.ts src/plugins/plugin-instance-module-loader.ts diff --git a/src/state/openclaw-database-maintenance.test.ts b/src/state/openclaw-database-maintenance.test.ts index 2c2fd2ae4bd2..b15d5de42bc8 100644 --- a/src/state/openclaw-database-maintenance.test.ts +++ b/src/state/openclaw-database-maintenance.test.ts @@ -269,6 +269,16 @@ CREATE INDEX IF NOT EXISTS idx_web_push_approval_deliveries_subscription const database = createGlobalDatabase(); try { + const authorizationIndex = database + .prepare( + "SELECT sql FROM sqlite_schema WHERE type = 'index' AND name = 'idx_user_profile_identities_authorization'", + ) + .get()?.sql; + if (typeof authorizationIndex !== "string") { + throw new Error("Canonical channel authorization index is missing"); + } + // A schema predating the authorization columns also predates their index. + database.exec("DROP INDEX idx_user_profile_identities_authorization;"); for (const { columnName, dataType, @@ -287,6 +297,7 @@ CREATE INDEX IF NOT EXISTS idx_web_push_approval_deliveries_subscription } ensureAdditiveStateColumns(database, "runtime"); + database.exec(authorizationIndex); expect(() => assertOpenClawStateDatabaseForMaintenance(database, { pathname: "global.sqlite", diff --git a/test/scripts/ci-node-test-plan.test.ts b/test/scripts/ci-node-test-plan.test.ts index aff7e035d26a..6ff3b96c2850 100644 --- a/test/scripts/ci-node-test-plan.test.ts +++ b/test/scripts/ci-node-test-plan.test.ts @@ -2337,7 +2337,13 @@ describe("scripts/lib/ci-node-test-plan.mts", () => { .flatMap((shard) => shard.includePatterns ?? []) .toSorted((a, b) => a.localeCompare(b)); - expect(bundled.length - gatewayStripes.length).toBeLessThan(base.length - 1); + const outputBundles = bundled.filter((shard) => shard.shardName.startsWith("bundle-")); + const bundledConfigs = new Set(outputBundles.flatMap((shard) => shard.configs)); + // Required 64-file splits can offset bundling savings in the total owner count. + const inputChunks = base + .filter((shard) => shard.configs.every((config) => bundledConfigs.has(config))) + .reduce((count, shard) => count + Math.ceil((shard.includePatterns?.length ?? 0) / 64), 0); + expect(outputBundles.length).toBeLessThan(inputChunks); expect(new Set(bundled.map((shard) => shard.checkName)).size).toBe(bundled.length); expect(bundledPatterns).toEqual(basePatterns); expect( diff --git a/test/vitest/vitest.gateway-server-paths.mjs b/test/vitest/vitest.gateway-server-paths.mjs index 98e75370eed0..7b62ecbe698c 100644 --- a/test/vitest/vitest.gateway-server-paths.mjs +++ b/test/vitest/vitest.gateway-server-paths.mjs @@ -11,8 +11,6 @@ export const gatewayPluginTestFiles = [ // Native database consumers retain lifecycle cleanup within each forked process. export const gatewayDatabaseWorkerTestFiles = [ - "src/gateway/sessions-history-http.physical-source.test.ts", - "src/gateway/update-run-notice-target.test.ts", "src/gateway/agent-turn/agent-run-dispatch.execution-binding.test.ts", "src/gateway/agent-turn/agent-run-dispatch.sqlite.test.ts", "src/gateway/approval-fixture.test.ts", @@ -190,6 +188,7 @@ export const gatewayDatabaseWorkerTestFiles = [ "src/gateway/session-utils.subagent-payloads.test.ts", "src/gateway/session-utils.subagent.test.ts", "src/gateway/session-utils.test.ts", + "src/gateway/sessions-history-http.physical-source.test.ts", "src/gateway/sessions-resolve-store.test.ts", "src/gateway/setup-inference.first-signin.integration.test.ts", "src/gateway/startup-local-cli-pairing.test.ts", @@ -200,6 +199,7 @@ export const gatewayDatabaseWorkerTestFiles = [ "src/gateway/tools-invoke-authorization.test.ts", "src/gateway/tools-invoke-http.test.ts", "src/gateway/tui-session-description-wire.test.ts", + "src/gateway/update-run-notice-target.test.ts", "src/gateway/user-profiles-http.auth.test.ts", "src/gateway/watch-node-http.test.ts", "src/gateway/worker-environments/bundle.test.ts",