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

推荐订阅源

H
Hackread – Cybersecurity News, Data Breaches, AI and More
U
Unit 42
Vercel News
Vercel News
Martin Fowler
Martin Fowler
云风的 BLOG
云风的 BLOG
爱范儿
爱范儿
MongoDB | Blog
MongoDB | Blog
J
Java Code Geeks
F
Fortinet All Blogs
MyScale Blog
MyScale Blog
C
Check Point Blog
N
Netflix TechBlog - Medium
Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏
博客园_首页
WordPress大学
WordPress大学
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
Last Week in AI
Last Week in AI
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
Jina AI
Jina AI
V
Visual Studio Blog
小众软件
小众软件

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: scope claude doctor runtime checks · openclaw/opencl...
steipete · 2026-04-29 · via Recent Commits to openclaw:main

@@ -25,18 +25,31 @@ function readOptionalUtf8(filePath) {

2525

return fs.readFileSync(filePath, "utf8");

2626

}

272728-

function removePathIfExists(targetPath) {

29-

for (let attempt = 0; ; attempt += 1) {

28+

function removePathIfExists(targetPath, options = {}) {

29+

const retryDelays = options.retryTransient ? TEMP_REMOVE_RETRY_DELAYS_MS : [];

30+

for (let attempt = 0; attempt <= retryDelays.length; attempt += 1) {

3031

try {

3132

fs.rmSync(targetPath, { recursive: true, force: true });

32-

return;

33+

return true;

3334

} catch (error) {

34-

if (!isTransientTempRemoveError(error) || attempt >= TEMP_REMOVE_RETRY_DELAYS_MS.length) {

35+

if (!isTransientTempRemoveError(error)) {

36+

throw error;

37+

}

38+

const delay = retryDelays[attempt];

39+

if (delay === undefined) {

40+

if (options.ignoreTransient) {

41+

return false;

42+

}

3543

throw error;

3644

}

37-

sleepSync(TEMP_REMOVE_RETRY_DELAYS_MS[attempt]);

45+

sleepSync(delay);

3846

}

3947

}

48+

return true;

49+

}

50+51+

function removeOwnedTempPathBestEffort(targetPath) {

52+

return removePathIfExists(targetPath, { retryTransient: true, ignoreTransient: true });

4053

}

41544255

function isTransientTempRemoveError(error) {

@@ -102,7 +115,7 @@ function replaceDirAtomically(targetPath, sourcePath) {

102115

targetParentDir,

103116

`.openclaw-runtime-deps-backup-${sanitizeTempPrefixSegment(path.basename(targetPath))}-`,

104117

);

105-

removePathIfExists(backupPath);

118+

removePathIfExists(backupPath, { retryTransient: true });

106119107120

let movedExistingTarget = false;

108121

try {

@@ -112,7 +125,7 @@ function replaceDirAtomically(targetPath, sourcePath) {

112125

movedExistingTarget = true;

113126

}

114127

fs.renameSync(sourcePath, targetPath);

115-

removePathIfExists(backupPath);

128+

removeOwnedTempPathBestEffort(backupPath);

116129

} catch (error) {

117130

if (movedExistingTarget && !fs.existsSync(targetPath) && fs.existsSync(backupPath)) {

118131

fs.renameSync(backupPath, targetPath);

@@ -138,7 +151,7 @@ function writeJsonAtomically(targetPath, value) {

138151

});

139152

fs.renameSync(tempPath, targetPath);

140153

} finally {

141-

removePathIfExists(tempDir);

154+

removeOwnedTempPathBestEffort(tempDir);

142155

}

143156

}

144157

@@ -1024,21 +1037,7 @@ function removeStaleRuntimeDepsTempDirs(pluginDir) {

10241037

if (!shouldRemoveRuntimeDepsTempDir(targetPath)) {

10251038

continue;

10261039

}

1027-

for (let attempt = 0; attempt <= TEMP_REMOVE_RETRY_DELAYS_MS.length; attempt += 1) {

1028-

try {

1029-

removePathIfExists(targetPath);

1030-

break;

1031-

} catch (error) {

1032-

if (!isTransientTempRemoveError(error)) {

1033-

throw error;

1034-

}

1035-

const delay = TEMP_REMOVE_RETRY_DELAYS_MS[attempt];

1036-

if (delay === undefined) {

1037-

break;

1038-

}

1039-

sleepSync(delay);

1040-

}

1041-

}

1040+

removeOwnedTempPathBestEffort(targetPath);

10421041

}

10431042

}

10441043

}

@@ -1134,7 +1133,7 @@ function stageInstalledRootRuntimeDeps(params) {

11341133

});

11351134

return true;

11361135

} finally {

1137-

removePathIfExists(path.dirname(stagedNodeModulesDir));

1136+

removeOwnedTempPathBestEffort(path.dirname(stagedNodeModulesDir));

11381137

}

11391138

}

11401139

@@ -1226,7 +1225,7 @@ function installPluginRuntimeDeps(params) {

12261225

generatedAt: new Date().toISOString(),

12271226

});

12281227

} finally {

1229-

removePathIfExists(tempInstallDir);

1228+

removeOwnedTempPathBestEffort(tempInstallDir);

12301229

}

12311230

}

12321231