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

推荐订阅源

罗磊的独立博客
Recent Announcements
Recent Announcements
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
有赞技术团队
有赞技术团队
J
Java Code Geeks
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
人人都是产品经理
人人都是产品经理
aimingoo的专栏
aimingoo的专栏
U
Unit 42
The GitHub Blog
The GitHub Blog
云风的 BLOG
云风的 BLOG
T
Tailwind CSS Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
博客园 - 司徒正美
腾讯CDC
I
InfoQ
GbyAI
GbyAI
博客园_首页

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(cli): skip compile cache on early Node 24.x to avoid ...
zhangguiping · 2026-06-16 · via Recent Commits to openclaw:main

@@ -7,6 +7,7 @@ import { afterEach, describe, expect, it, vi } from "vitest";

77

import { cleanupTempDirs, makeTempDir } from "../test/helpers/temp-dir.js";

88

import {

99

buildOpenClawCompileCacheRespawnPlan,

10+

isNodeVersionAffectedByCompileCacheDeadlock,

1011

isSourceCheckoutInstallRoot,

1112

resolveOpenClawCompileCacheDirectory,

1213

resolveEntryInstallRoot,

@@ -58,11 +59,20 @@ describe("entry compile cache", () => {

5859

it("keeps compile cache enabled for packaged installs unless disabled by env", () => {

5960

const root = makeTempDir(tempDirs, "openclaw-compile-cache-package-");

606161-

expect(shouldEnableOpenClawCompileCache({ env: {}, installRoot: root })).toBe(true);

62+

expect(

63+

shouldEnableOpenClawCompileCache({

64+

env: {},

65+

installRoot: root,

66+

nodeVersion: "24.15.0",

67+

platform: "win32",

68+

}),

69+

).toBe(true);

6270

expect(

6371

shouldEnableOpenClawCompileCache({

6472

env: { NODE_DISABLE_COMPILE_CACHE: "1" },

6573

installRoot: root,

74+

nodeVersion: "24.15.0",

75+

platform: "win32",

6676

}),

6777

).toBe(false);

6878

});

@@ -101,23 +111,50 @@ describe("entry compile cache", () => {

101111

args: ["--no-warnings", path.join(root, "dist", "entry.js"), "status", "--json"],

102112

env: {

103113

NODE_DISABLE_COMPILE_CACHE: "1",

104-

OPENCLAW_SOURCE_COMPILE_CACHE_RESPAWNED: "1",

114+

OPENCLAW_COMPILE_CACHE_DISABLED_RESPAWNED: "1",

105115

},

106116

});

107117

});

108118109-

it("does not respawn packaged installs when NODE_COMPILE_CACHE is configured", () => {

119+

it("does not respawn unaffected packaged installs when NODE_COMPILE_CACHE is configured", () => {

110120

const root = makeTempDir(tempDirs, "openclaw-compile-cache-package-respawn-");

111121112122

expect(

113123

buildOpenClawCompileCacheRespawnPlan({

114124

currentFile: path.join(root, "dist", "entry.js"),

115125

env: { NODE_COMPILE_CACHE: "/tmp/openclaw-cache" },

116126

installRoot: root,

127+

nodeVersion: "24.1.0",

128+

platform: "linux",

117129

}),

118130

).toBeUndefined();

119131

});

120132133+

it("builds a no-cache respawn plan for affected Windows packaged installs", () => {

134+

const root = makeTempDir(tempDirs, "openclaw-compile-cache-package-win24-");

135+

const entryFile = path.join(root, "dist", "entry.js");

136+137+

const plan = buildOpenClawCompileCacheRespawnPlan({

138+

currentFile: entryFile,

139+

env: { NODE_COMPILE_CACHE: "/tmp/openclaw-cache" },

140+

execArgv: ["--no-warnings"],

141+

execPath: "/usr/bin/node",

142+

installRoot: root,

143+

argv: ["/usr/bin/node", entryFile, "doctor", "--fix", "--non-interactive"],

144+

nodeVersion: "24.1.0",

145+

platform: "win32",

146+

});

147+148+

expect(plan).toEqual({

149+

command: "/usr/bin/node",

150+

args: ["--no-warnings", entryFile, "doctor", "--fix", "--non-interactive"],

151+

env: {

152+

NODE_DISABLE_COMPILE_CACHE: "1",

153+

OPENCLAW_COMPILE_CACHE_DISABLED_RESPAWNED: "1",

154+

},

155+

});

156+

});

157+121158

it("does not respawn source checkouts twice", async () => {

122159

const root = makeTempDir(tempDirs, "openclaw-compile-cache-respawn-once-");

123160

await fs.mkdir(path.join(root, "src"), { recursive: true });

@@ -128,7 +165,7 @@ describe("entry compile cache", () => {

128165

currentFile: path.join(root, "dist", "entry.js"),

129166

env: {

130167

NODE_COMPILE_CACHE: "/tmp/openclaw-cache",

131-

OPENCLAW_SOURCE_COMPILE_CACHE_RESPAWNED: "1",

168+

OPENCLAW_COMPILE_CACHE_DISABLED_RESPAWNED: "1",

132169

},

133170

installRoot: root,

134171

}),

@@ -246,4 +283,97 @@ describe("entry compile cache", () => {

246283

vi.useRealTimers();

247284

}

248285

});

286+287+

it("disables compile cache for early Node 24.x versions on Windows", () => {

288+

const root = makeTempDir(tempDirs, "openclaw-compile-cache-node24-");

289+

expect(

290+

shouldEnableOpenClawCompileCache({

291+

env: {},

292+

installRoot: root,

293+

nodeVersion: "24.1.0",

294+

platform: "win32",

295+

}),

296+

).toBe(false);

297+

expect(

298+

shouldEnableOpenClawCompileCache({

299+

env: {},

300+

installRoot: root,

301+

nodeVersion: "24.14.0",

302+

platform: "win32",

303+

}),

304+

).toBe(false);

305+

});

306+307+

it("keeps compile cache enabled for early Node 24.x on non-Windows packaged installs", () => {

308+

const root = makeTempDir(tempDirs, "openclaw-compile-cache-node24-nonwin-");

309+

expect(

310+

shouldEnableOpenClawCompileCache({

311+

env: {},

312+

installRoot: root,

313+

nodeVersion: "24.1.0",

314+

platform: "linux",

315+

}),

316+

).toBe(true);

317+

expect(

318+

shouldEnableOpenClawCompileCache({

319+

env: {},

320+

installRoot: root,

321+

nodeVersion: "24.14.0",

322+

platform: "darwin",

323+

}),

324+

).toBe(true);

325+

});

326+327+

it("keeps compile cache enabled for Node 24.15+ and other majors on Windows", () => {

328+

const root = makeTempDir(tempDirs, "openclaw-compile-cache-node2415-");

329+

expect(

330+

shouldEnableOpenClawCompileCache({

331+

env: {},

332+

installRoot: root,

333+

nodeVersion: "24.15.0",

334+

platform: "win32",

335+

}),

336+

).toBe(true);

337+

expect(

338+

shouldEnableOpenClawCompileCache({

339+

env: {},

340+

installRoot: root,

341+

nodeVersion: "22.22.0",

342+

platform: "win32",

343+

}),

344+

).toBe(true);

345+

expect(

346+

shouldEnableOpenClawCompileCache({

347+

env: {},

348+

installRoot: root,

349+

nodeVersion: "25.0.0",

350+

platform: "win32",

351+

}),

352+

).toBe(true);

353+

});

354+

});

355+356+

describe("isNodeVersionAffectedByCompileCacheDeadlock", () => {

357+

it("flags Node 24.0 through 24.14 as affected", () => {

358+

expect(isNodeVersionAffectedByCompileCacheDeadlock("24.0.0")).toBe(true);

359+

expect(isNodeVersionAffectedByCompileCacheDeadlock("24.1.0")).toBe(true);

360+

expect(isNodeVersionAffectedByCompileCacheDeadlock("24.14.0")).toBe(true);

361+

});

362+363+

it("does not flag Node 24.15+", () => {

364+

expect(isNodeVersionAffectedByCompileCacheDeadlock("24.15.0")).toBe(false);

365+

expect(isNodeVersionAffectedByCompileCacheDeadlock("24.20.1")).toBe(false);

366+

});

367+368+

it("does not flag other major versions", () => {

369+

expect(isNodeVersionAffectedByCompileCacheDeadlock("22.22.0")).toBe(false);

370+

expect(isNodeVersionAffectedByCompileCacheDeadlock("23.11.0")).toBe(false);

371+

expect(isNodeVersionAffectedByCompileCacheDeadlock("25.0.0")).toBe(false);

372+

});

373+374+

it("handles missing or invalid versions", () => {

375+

expect(isNodeVersionAffectedByCompileCacheDeadlock(undefined)).toBe(false);

376+

expect(isNodeVersionAffectedByCompileCacheDeadlock("")).toBe(false);

377+

expect(isNodeVersionAffectedByCompileCacheDeadlock("not-a-version")).toBe(false);

378+

});

249379

});