惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

I
InfoQ
博客园_首页
美团技术团队
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
J
Java Code Geeks
T
Tailwind CSS Blog
Jina AI
Jina AI
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
G
Google Developers Blog
爱范儿
爱范儿
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
宝玉的分享
宝玉的分享
小众软件
小众软件
MongoDB | Blog
MongoDB | Blog
博客园 - 三生石上(FineUI控件)
L
LangChain Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
V
Visual Studio Blog
博客园 - Franky
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(test): reuse heavy-check lock in boundary prep · open...
vincentkoc · 2026-04-25 · via Recent Commits to openclaw:main

@@ -1,14 +1,10 @@

11

import { spawn } from "node:child_process";

22

import fs from "node:fs";

3-

import { createRequire } from "node:module";

43

import path, { resolve } from "node:path";

4+

import { isLocalCheckEnabled } from "./lib/local-heavy-check-runtime.mjs";

556-

const require = createRequire(import.meta.url);

76

const repoRoot = resolve(import.meta.dirname, "..");

8-

const tsgoBin = path.join(

9-

path.dirname(require.resolve("@typescript/native-preview/package.json")),

10-

"bin/tsgo.js",

11-

);

7+

const runTsgoScript = path.join(repoRoot, "scripts/run-tsgo.mjs");

128

const TYPE_INPUT_EXTENSIONS = new Set([".ts", ".tsx", ".d.ts", ".js", ".mjs", ".json"]);

139

const VALID_MODES = new Set(["all", "package-boundary"]);

1410

@@ -167,7 +163,7 @@ export function runNodeStep(label, args, timeoutMs, params = {}) {

167163

return new Promise((resolvePromise, rejectPromise) => {

168164

const child = spawn(process.execPath, args, {

169165

cwd: repoRoot,

170-

env: process.env,

166+

env: params.env ? { ...process.env, ...params.env } : process.env,

171167

signal: abortController?.signal,

172168

stdio: ["ignore", "pipe", "pipe"],

173169

});

@@ -231,14 +227,27 @@ export function runNodeStep(label, args, timeoutMs, params = {}) {

231227

export async function runNodeStepsInParallel(steps) {

232228

const abortController = new AbortController();

233229

const results = await Promise.allSettled(

234-

steps.map((step) => runNodeStep(step.label, step.args, step.timeoutMs, { abortController })),

230+

steps.map((step) =>

231+

runNodeStep(step.label, step.args, step.timeoutMs, { abortController, env: step.env }),

232+

),

235233

);

236234

const firstFailure = results.find((result) => result.status === "rejected");

237235

if (firstFailure) {

238236

throw firstFailure.reason;

239237

}

240238

}

241239240+

export async function runNodeSteps(steps, env = process.env) {

241+

if (!isLocalCheckEnabled(env)) {

242+

await runNodeStepsInParallel(steps);

243+

return;

244+

}

245+246+

for (const step of steps) {

247+

await runNodeStep(step.label, step.args, step.timeoutMs, { env: step.env });

248+

}

249+

}

250+242251

export async function main(argv = process.argv.slice(2)) {

243252

try {

244253

const mode = parseMode(argv);

@@ -272,7 +281,8 @@ export async function main(argv = process.argv.slice(2)) {

272281

});

273282

pendingSteps.push({

274283

label: "plugin-sdk boundary dts",

275-

args: [tsgoBin, "-p", "tsconfig.plugin-sdk.dts.json"],

284+

args: [runTsgoScript, "-p", "tsconfig.plugin-sdk.dts.json", "--declaration", "true"],

285+

env: { OPENCLAW_TSGO_HEAVY_CHECK_LOCK_HELD: "1" },

276286

timeoutMs: 300_000,

277287

stampPath: ROOT_DTS_STAMP,

278288

});

@@ -287,7 +297,8 @@ export async function main(argv = process.argv.slice(2)) {

287297

});

288298

pendingSteps.push({

289299

label: "plugin-sdk package boundary dts",

290-

args: [tsgoBin, "-p", "packages/plugin-sdk/tsconfig.json"],

300+

args: [runTsgoScript, "-p", "packages/plugin-sdk/tsconfig.json", "--declaration", "true"],

301+

env: { OPENCLAW_TSGO_HEAVY_CHECK_LOCK_HELD: "1" },

291302

timeoutMs: 300_000,

292303

stampPath: PACKAGE_DTS_STAMP,

293304

});

@@ -296,7 +307,7 @@ export async function main(argv = process.argv.slice(2)) {

296307

}

297308298309

if (pendingSteps.length > 0) {

299-

await runNodeStepsInParallel(pendingSteps);

310+

await runNodeSteps(pendingSteps);

300311

for (const step of pendingSteps) {

301312

if (step.stampPath) {

302313

writeStampFile(step.stampPath);