fix(ci): exclude private qa sidecars from install verify

This commit is contained in:
Vincent Koc
2026-04-15 00:32:44 +01:00
parent 16c949ed5f
commit a2888f8f7d
2 changed files with 20 additions and 3 deletions

View File

@@ -15,6 +15,7 @@ import { isAbsolute, join, relative } from "node:path";
import { pathToFileURL } from "node:url";
import { formatErrorMessage } from "../src/infra/errors.ts";
import { BUNDLED_RUNTIME_SIDECAR_PATHS } from "../src/plugins/runtime-sidecar-paths.ts";
import { listBundledPluginPackArtifacts } from "./lib/bundled-plugin-build-entries.mjs";
import {
collectBundledPluginRootRuntimeMirrorErrors,
collectRootDistBundledRuntimeMirrors,
@@ -43,6 +44,9 @@ type InstalledBundledExtensionManifestRecord = {
const MAX_BUNDLED_EXTENSION_MANIFEST_BYTES = 1024 * 1024;
const LEGACY_CONTEXT_ENGINE_UNRESOLVED_RUNTIME_MARKER =
"Failed to load legacy context engine runtime.";
const PUBLISHED_BUNDLED_RUNTIME_SIDECAR_PATHS = BUNDLED_RUNTIME_SIDECAR_PATHS.filter(
(relativePath) => listBundledPluginPackArtifacts().includes(relativePath),
);
export type PublishedInstallScenario = {
name: string;
@@ -90,7 +94,7 @@ export function collectInstalledPackageErrors(params: {
);
}
for (const relativePath of BUNDLED_RUNTIME_SIDECAR_PATHS) {
for (const relativePath of PUBLISHED_BUNDLED_RUNTIME_SIDECAR_PATHS) {
if (!existsSync(join(params.packageRoot, relativePath))) {
errors.push(`installed package is missing required bundled runtime sidecar: ${relativePath}`);
}

View File

@@ -2,6 +2,7 @@ import { mkdirSync, mkdtempSync, rmSync, symlinkSync, writeFileSync } from "node
import { tmpdir } from "node:os";
import { dirname, join } from "node:path";
import { describe, expect, it } from "vitest";
import { listBundledPluginPackArtifacts } from "../scripts/lib/bundled-plugin-build-entries.mjs";
import {
buildPublishedInstallCommandArgs,
buildPublishedInstallScenarios,
@@ -13,6 +14,10 @@ import {
} from "../scripts/openclaw-npm-postpublish-verify.ts";
import { BUNDLED_RUNTIME_SIDECAR_PATHS } from "../src/plugins/runtime-sidecar-paths.ts";
const PUBLISHED_BUNDLED_RUNTIME_SIDECAR_PATHS = BUNDLED_RUNTIME_SIDECAR_PATHS.filter(
(relativePath) => listBundledPluginPackArtifacts().includes(relativePath),
);
describe("buildPublishedInstallScenarios", () => {
it("uses a single fresh scenario for plain stable releases", () => {
expect(buildPublishedInstallScenarios("2026.3.23")).toEqual([
@@ -70,13 +75,21 @@ describe("collectInstalledPackageErrors", () => {
);
expect(errors).toEqual(
expect.arrayContaining(
BUNDLED_RUNTIME_SIDECAR_PATHS.map(
PUBLISHED_BUNDLED_RUNTIME_SIDECAR_PATHS.map(
(relativePath) =>
`installed package is missing required bundled runtime sidecar: ${relativePath}`,
),
),
);
expect(errors.length).toBeGreaterThanOrEqual(1 + BUNDLED_RUNTIME_SIDECAR_PATHS.length);
expect(errors).not.toEqual(
expect.arrayContaining([
"installed package is missing required bundled runtime sidecar: dist/extensions/qa-channel/runtime-api.js",
"installed package is missing required bundled runtime sidecar: dist/extensions/qa-lab/runtime-api.js",
]),
);
expect(errors.length).toBeGreaterThanOrEqual(
1 + PUBLISHED_BUNDLED_RUNTIME_SIDECAR_PATHS.length,
);
});
});