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

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
量子位
T
Tailwind CSS Blog
Vercel News
Vercel News
I
InfoQ
Stack Overflow Blog
Stack Overflow Blog
U
Unit 42
Engineering at Meta
Engineering at Meta
L
LangChain Blog
大猫的无限游戏
大猫的无限游戏
D
Docker
博客园_首页
P
Proofpoint News Feed
月光博客
月光博客
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Martin Fowler
Martin Fowler
腾讯CDC
N
Netflix TechBlog - Medium
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

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(plugins): harden runtime mirrors · openclaw/openclaw@...
steipete · 2026-04-30 · via Recent Commits to openclaw:main

@@ -47,7 +47,7 @@ export function copyBundledPluginRuntimeRoot(sourceRoot: string, targetRoot: str

4747

if (path.resolve(sourceRoot) === path.resolve(targetRoot)) {

4848

return;

4949

}

50-

fs.mkdirSync(targetRoot, { recursive: true, mode: 0o755 });

50+

ensureBundledRuntimeMirrorDirectory(targetRoot);

5151

const mirroredNames = new Set<string>();

5252

for (const entry of fs.readdirSync(sourceRoot, { withFileTypes: true })) {

5353

if (shouldIgnoreBundledRuntimeMirrorEntry(entry.name)) {

@@ -81,16 +81,13 @@ export function materializeBundledRuntimeMirrorFile(sourcePath: string, targetPa

8181

return;

8282

}

8383

try {

84-

if (

85-

fs.realpathSync(sourcePath) === fs.realpathSync(targetPath) &&

86-

!fs.lstatSync(targetPath).isSymbolicLink()

87-

) {

84+

if (isBundledRuntimeMirrorFileAlreadyMaterialized(sourcePath, targetPath)) {

8885

return;

8986

}

9087

} catch {

9188

// Missing targets are expected before the mirror file is materialized.

9289

}

93-

fs.mkdirSync(path.dirname(targetPath), { recursive: true, mode: 0o755 });

90+

ensureBundledRuntimeMirrorDirectory(path.dirname(targetPath));

9491

removeBundledRuntimeMirrorPathIfTypeChanged(targetPath, "file");

9592

const tempPath = createBundledRuntimeMirrorTempPath(targetPath);

9693

try {

@@ -107,6 +104,20 @@ export function materializeBundledRuntimeMirrorFile(sourcePath: string, targetPa

107104

}

108105

}

109106107+

function isBundledRuntimeMirrorFileAlreadyMaterialized(

108+

sourcePath: string,

109+

targetPath: string,

110+

): boolean {

111+

const sourceStat = fs.lstatSync(sourcePath);

112+

const targetStat = fs.lstatSync(targetPath);

113+

return (

114+

sourceStat.isFile() &&

115+

targetStat.isFile() &&

116+

sourceStat.dev === targetStat.dev &&

117+

sourceStat.ino === targetStat.ino

118+

);

119+

}

120+110121

function chmodBundledRuntimeMirrorFileReadable(sourcePath: string, targetPath: string): void {

111122

try {

112123

const sourceMode = fs.statSync(sourcePath).mode;

@@ -131,6 +142,21 @@ function pruneStaleBundledRuntimeMirrorEntries(

131142

}

132143

}

133144145+

function ensureBundledRuntimeMirrorDirectory(targetRoot: string): void {

146+

try {

147+

const stat = fs.lstatSync(targetRoot);

148+

if (stat.isDirectory() && !stat.isSymbolicLink()) {

149+

return;

150+

}

151+

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

152+

} catch (error) {

153+

if ((error as NodeJS.ErrnoException).code !== "ENOENT") {

154+

throw error;

155+

}

156+

}

157+

fs.mkdirSync(targetRoot, { recursive: true, mode: 0o755 });

158+

}

159+134160

function removeBundledRuntimeMirrorPathIfTypeChanged(

135161

targetPath: string,

136162

expectedType: "directory" | "file" | "symlink",

@@ -153,7 +179,7 @@ function removeBundledRuntimeMirrorPathIfTypeChanged(

153179

}

154180155181

function replaceBundledRuntimeMirrorSymlinkAtomic(linkTarget: string, targetPath: string): void {

156-

fs.mkdirSync(path.dirname(targetPath), { recursive: true, mode: 0o755 });

182+

ensureBundledRuntimeMirrorDirectory(path.dirname(targetPath));

157183

const tempPath = createBundledRuntimeMirrorTempPath(targetPath);

158184

try {

159185

fs.symlinkSync(linkTarget, tempPath);

@@ -164,7 +190,7 @@ function replaceBundledRuntimeMirrorSymlinkAtomic(linkTarget: string, targetPath

164190

}

165191166192

function copyBundledRuntimeMirrorFileAtomic(sourcePath: string, targetPath: string): void {

167-

fs.mkdirSync(path.dirname(targetPath), { recursive: true, mode: 0o755 });

193+

ensureBundledRuntimeMirrorDirectory(path.dirname(targetPath));

168194

const tempPath = createBundledRuntimeMirrorTempPath(targetPath);

169195

try {

170196

fs.copyFileSync(sourcePath, tempPath);