mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-03 17:53:39 +00:00
* fix(tooling): prevent accidental shared dependency installs Stop creating implicit checkout-root dependency links during tool bootstrap. Refuse default pnpm reconciliation through borrowed roots before linking, while preserving explicit hydrated aliases, existing read-only borrows, and configured-to-local toolchain fallback. Include the early guard in package files and document its checkout-root scope, lifecycle bypasses, and concurrent-path limits. Validation: 127 focused Linux tests, seven real pnpm install cases, packaged-root command proof, full checks plus final scoped loader checks, and independent P0-P2 review. * fix(tooling): audit install hook and align bootstrap coverage Include the dependency ownership guard in the exact install lifecycle contract and dependency fingerprint inputs so CI admits the hook and invalidates cached dependencies when its implementation changes. Update the existing wrapper expectation for the intentionally removed implicit primary-checkout borrowing path while retaining hydration proof. Validation: reproduced both failures, 517 workflow guards (2 existing skips), 98 bootstrap/ownership tests, full scoped Linux checks, and independent P0-P2 review. * test(tooling): align isolated harness and routing contracts Provision the copied Docker harness's TypeScript package explicitly and update the preflight diagnostic and dedicated shim test routing expectations. Validate compact tooling runner capacity from each resulting group's compiler membership, preserving all file-policy and negative mutation checks without freezing incidental compiler co-tenants onto a larger runner. Validation: all 604 affected Linux tests, complete scoped checks, original failure reproductions, planner inventory attribution and independent P0-P2 review. No production dependency or capacity policy changed in this follow-up. * test(tooling): keep bootstrap cases in the runtime owner suite Preserve all eight bootstrap cases and fixture logic in the existing local runtime suite, with scoped environment cleanup and precise test routing. The standalone filename fragmented the integrated GitHub compact plan into 81 jobs; the actual consolidated merge fits all three plans within80. Keep the cap, estimates, compiler capacity, assertions and test coverage. Validation: identical moved AST/token bodies, 571 local tests, 624 integrated Linux tests and full scoped checks, exact merged planner proof, and clean independent P0-P2 review.
41 lines
1.5 KiB
TypeScript
41 lines
1.5 KiB
TypeScript
// Runs the complete lint pipeline with the selected installed toolchain.
|
|
import { createRequire } from "node:module";
|
|
import path from "node:path";
|
|
import { pathToFileURL } from "node:url";
|
|
import { runWithFailedTrailer } from "./lib/failed-trailer.mts";
|
|
import { resolveRepoToolBinPath } from "./lib/local-check-runtime.mts";
|
|
import { runManagedCommand } from "./lib/managed-child-process.mts";
|
|
import { main as runOxlintShards } from "./run-oxlint-shards.mts";
|
|
import { runStylelint } from "./run-stylelint.mts";
|
|
|
|
await runWithFailedTrailer("lint", async () => {
|
|
const tsxPath = resolveRepoToolBinPath("tsx");
|
|
const tsxImportSpecifier = pathToFileURL(createRequire(tsxPath).resolve("tsx")).href;
|
|
|
|
// Invoke directly: pnpm through a linked node_modules can reconcile its owner's install.
|
|
process.exitCode = await runManagedCommand({
|
|
bin: process.execPath,
|
|
args: [
|
|
"--import",
|
|
tsxImportSpecifier,
|
|
path.resolve("scripts", "control-ui-i18n-verify.ts"),
|
|
"verify",
|
|
],
|
|
env: process.env,
|
|
requireProcessTreeExit: process.platform !== "win32",
|
|
});
|
|
if (process.exitCode !== 0) {
|
|
return;
|
|
}
|
|
// Compose the batch so cancellation and final reporting remain with this process.
|
|
process.exitCode = await runOxlintShards();
|
|
if (process.exitCode !== 0) {
|
|
return;
|
|
}
|
|
// Oxlint cannot see plain stylesheets or css`` templates in Lit components.
|
|
process.exitCode = await runStylelint([
|
|
"ui/src/**/*.css",
|
|
"ui/src/**/*.ts",
|
|
"ui/public/themes/*.css",
|
|
]);
|
|
});
|