From 3d8a77a1137ef823bcc04b2a4e4b3255cf9abf74 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sat, 30 May 2026 11:06:23 +0200 Subject: [PATCH] fix(test): route package tooling changes --- CHANGELOG.md | 1 + scripts/test-projects.test-support.mjs | 14 +++++++++++ test/scripts/test-projects.test.ts | 35 ++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9207e2c2948..8c820157a07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ Docs: https://docs.openclaw.ai - CI/Crabbox: route Crabbox wrapper and Testbox workflow edits to their regression tests so changed-test gates do not silently run zero specs. - CI/workflows: route workflow sanity helper edits to their guard tests and cover composite-action input interpolation checks. - CI/tooling: route CI scope, dependency, changelog, and docs helper edits to their owner tests instead of silently skipping changed-test coverage. +- CI/tooling: route package, release, and install helper edits to their owner tests so changed-test gates cover publish and installer script changes. - Performance: reuse prepared provider handles, strict tool schemas, gateway runtime metadata, session maintenance config, plugin metadata, bundled skill allowlists, package-local plugin artifacts, and single-entry store writes. ## 2026.5.28 diff --git a/scripts/test-projects.test-support.mjs b/scripts/test-projects.test-support.mjs index 9d1e2ab8403..c9122e816e8 100644 --- a/scripts/test-projects.test-support.mjs +++ b/scripts/test-projects.test-support.mjs @@ -448,7 +448,21 @@ const TOOLING_SOURCE_TEST_TARGETS = new Map([ ["scripts/docker-e2e.mjs", ["test/scripts/docker-e2e-helper-cli.test.ts"]], ["scripts/docker-e2e-rerun.mjs", ["test/scripts/docker-e2e-helper-cli.test.ts"]], ["scripts/docker-e2e-timings.mjs", ["test/scripts/docker-e2e-helper-cli.test.ts"]], + ["scripts/generate-npm-shrinkwrap.mjs", ["test/scripts/generate-npm-shrinkwrap.test.ts"]], ["scripts/kova-ci-summary.mjs", ["test/scripts/kova-ci-summary.test.ts"]], + ["scripts/openclaw-npm-postpublish-verify.ts", ["test/openclaw-npm-postpublish-verify.test.ts"]], + ["scripts/openclaw-npm-release-check.ts", ["test/openclaw-npm-release-check.test.ts"]], + ["scripts/openclaw-prepack.ts", ["test/openclaw-prepack.test.ts"]], + ["scripts/package-changelog.mjs", ["test/scripts/package-changelog.test.ts"]], + ["scripts/package-mac-app.sh", ["test/scripts/package-mac-app.test.ts"]], + ["scripts/package-mac-dist.sh", ["test/scripts/package-mac-dist.test.ts"]], + ["scripts/package-openclaw-for-docker.mjs", ["test/scripts/package-openclaw-for-docker.test.ts"]], + ["scripts/postinstall-bundled-plugins.mjs", ["test/scripts/postinstall-bundled-plugins.test.ts"]], + ["scripts/prepare-git-hooks.mjs", ["test/scripts/prepare-git-hooks.test.ts"]], + [ + "scripts/preinstall-package-manager-warning.mjs", + ["test/scripts/preinstall-package-manager-warning.test.ts"], + ], ["scripts/test-extension-batch.mjs", ["test/scripts/test-extension.test.ts"]], ["scripts/test-force.ts", ["test/scripts/test-force.test.ts"]], ["scripts/test-live.mjs", ["test/scripts/test-live.test.ts"]], diff --git a/test/scripts/test-projects.test.ts b/test/scripts/test-projects.test.ts index f52a2c10d61..85fe66d5fcc 100644 --- a/test/scripts/test-projects.test.ts +++ b/test/scripts/test-projects.test.ts @@ -449,6 +449,41 @@ describe("scripts/test-projects changed-target routing", () => { }); }); + it("keeps package, release, and install tooling edits on owner tests", () => { + const expectedTargets = new Map([ + ["scripts/generate-npm-shrinkwrap.mjs", ["test/scripts/generate-npm-shrinkwrap.test.ts"]], + [ + "scripts/package-openclaw-for-docker.mjs", + ["test/scripts/package-openclaw-for-docker.test.ts"], + ], + ["scripts/package-mac-app.sh", ["test/scripts/package-mac-app.test.ts"]], + ["scripts/package-mac-dist.sh", ["test/scripts/package-mac-dist.test.ts"]], + ["scripts/package-changelog.mjs", ["test/scripts/package-changelog.test.ts"]], + ["scripts/openclaw-prepack.ts", ["test/openclaw-prepack.test.ts"]], + ["scripts/openclaw-npm-release-check.ts", ["test/openclaw-npm-release-check.test.ts"]], + [ + "scripts/openclaw-npm-postpublish-verify.ts", + ["test/openclaw-npm-postpublish-verify.test.ts"], + ], + [ + "scripts/postinstall-bundled-plugins.mjs", + ["test/scripts/postinstall-bundled-plugins.test.ts"], + ], + ["scripts/prepare-git-hooks.mjs", ["test/scripts/prepare-git-hooks.test.ts"]], + [ + "scripts/preinstall-package-manager-warning.mjs", + ["test/scripts/preinstall-package-manager-warning.test.ts"], + ], + ]); + + for (const [source, targets] of expectedTargets) { + expect(resolveChangedTestTargetPlan([source]), source).toEqual({ + mode: "targets", + targets, + }); + } + }); + it("routes explicit tooling implementation files to owner tests", () => { expect( findUnmatchedExplicitTestTargets([