openclaw/scripts/pre-commit
Peter Steinberger 881ad1ca49
fix(ci): scope PR tests to affected consumers (#156729)
* ci: narrow PR tests by import and dependency impact

Resolve affected tests through the existing runtime import graph, workspace
and SDK aliases, configured Vitest inputs, and explicit policy owners.
Compare exact-base dependency closures instead of treating every lockfile
or package metadata change as global. Keep documentation and localization
data out of PR Node test rows.

Preserve canonical execution metadata and complete automatic main coverage.
Retain diagnostic fallbacks for global inputs and unverifiable ownership.
The 40-run replay reduces explicit fallbacks from 30 to 6 and median selected
jobs from 132 to 122, with no unexplained historical failure omissions.
The remaining large import closures do not meet the requested cost target.

* fix(ci): run test selector parsing under Node

Bun workers cannot provide the Node TypeScript parser used by the selector. Resolve the existing Node executable at the scanner boundary and retain that built-in-only dependency in materialized wrappers and standalone fixtures. Preserve real shard inventory exports in the command planner fixture.

* test(ci): isolate changed-gate compiler fixtures

Source-aware selection reaches inline compiler checks that bypassed the fixtures’ subprocess stubs, repeatedly compiling the real repository during gate-order and root-lint tests. Bind that owner to the shared synthetic recorder while preserving the real CLI, lint execution, serial-order assertions, and failure sentinels.

* fix(ci): retain compiler gates for TypeScript catalogs

Catalog-only PRs suppress Node test rows, but their TypeScript modules still need compiler validation. Admit the existing check owner independently of Node tests while preserving documentation and JSON-only skips. The catalog fixtures retain main and manual coverage and distinguish compiler admission from test execution.
2026-09-24 02:46:40 +00:00
..
filter-staged-files.mjs
format-staged.sh improve(tooling): reduce commit formatting resource use (#152297) 2026-09-18 18:01:21 -07:00
guard-staged-content.mjs
pnpm-audit-prod.mjs fix(ci): scope PR tests to affected consumers (#156729) 2026-09-24 02:46:40 +00:00
run-node-tool.sh