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

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Apple Machine Learning Research
Apple Machine Learning Research
aimingoo的专栏
aimingoo的专栏
H
Help Net Security
腾讯CDC
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
人人都是产品经理
人人都是产品经理
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | Blog
宝玉的分享
宝玉的分享
有赞技术团队
有赞技术团队
美团技术团队
雷峰网
雷峰网
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 司徒正美
博客园_首页
Recent Announcements
Recent Announcements
云风的 BLOG
云风的 BLOG
B
Blog RSS Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
D
Docker
博客园 - Franky
Jina AI
Jina AI

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: harden sandbox runtime cleanup · openclaw/openclaw@5...
steipete · 2026-05-07 · via Recent Commits to openclaw:main

@@ -158,6 +158,60 @@ export const SANDBOX_PINNED_MUTATION_PYTHON = [

158158

" os.close(dir_fd)",

159159

" os.rmdir(basename, dir_fd=parent_fd)",

160160

"",

161+

"def copy_entry(src_parent_fd, src_basename, dst_parent_fd, dst_basename):",

162+

" src_stat = os.lstat(src_basename, dir_fd=src_parent_fd)",

163+

" if stat.S_ISDIR(src_stat.st_mode) and not stat.S_ISLNK(src_stat.st_mode):",

164+

" os.mkdir(dst_basename, stat.S_IMODE(src_stat.st_mode) or 0o755, dir_fd=dst_parent_fd)",

165+

" src_dir_fd = None",

166+

" dst_dir_fd = None",

167+

" try:",

168+

" src_dir_fd = open_dir(src_basename, dir_fd=src_parent_fd)",

169+

" dst_dir_fd = open_dir(dst_basename, dir_fd=dst_parent_fd)",

170+

" for child in os.listdir(src_dir_fd):",

171+

" copy_entry(src_dir_fd, child, dst_dir_fd, child)",

172+

" except Exception:",

173+

" if dst_dir_fd is not None:",

174+

" os.close(dst_dir_fd)",

175+

" dst_dir_fd = None",

176+

" try:",

177+

" remove_tree(dst_parent_fd, dst_basename)",

178+

" except FileNotFoundError:",

179+

" pass",

180+

" raise",

181+

" finally:",

182+

" if src_dir_fd is not None:",

183+

" os.close(src_dir_fd)",

184+

" if dst_dir_fd is not None:",

185+

" os.close(dst_dir_fd)",

186+

" return",

187+

" if stat.S_ISLNK(src_stat.st_mode):",

188+

" link_target = os.readlink(src_basename, dir_fd=src_parent_fd)",

189+

" os.symlink(link_target, dst_basename, dir_fd=dst_parent_fd)",

190+

" return",

191+

" src_fd = os.open(src_basename, READ_FLAGS, dir_fd=src_parent_fd)",

192+

" dst_fd = None",

193+

" try:",

194+

" src_file_stat = os.fstat(src_fd)",

195+

" if not stat.S_ISREG(src_file_stat.st_mode):",

196+

" raise OSError(errno.EPERM, 'only regular files are allowed', src_basename)",

197+

" if src_file_stat.st_nlink > 1:",

198+

" raise OSError(errno.EPERM, 'hardlinked file is not allowed', src_basename)",

199+

" dst_fd = os.open(dst_basename, WRITE_FLAGS, stat.S_IMODE(src_stat.st_mode), dir_fd=dst_parent_fd)",

200+

" while True:",

201+

" chunk = os.read(src_fd, 65536)",

202+

" if not chunk:",

203+

" break",

204+

" os.write(dst_fd, chunk)",

205+

" try:",

206+

" os.fchmod(dst_fd, stat.S_IMODE(src_stat.st_mode))",

207+

" except AttributeError:",

208+

" pass",

209+

" os.fsync(dst_fd)",

210+

" finally:",

211+

" if dst_fd is not None:",

212+

" os.close(dst_fd)",

213+

" os.close(src_fd)",

214+

"",

161215

"def move_entry(src_parent_fd, src_basename, dst_parent_fd, dst_basename):",

162216

" try:",

163217

" os.rename(src_basename, dst_basename, src_dir_fd=src_parent_fd, dst_dir_fd=dst_parent_fd)",

@@ -170,16 +224,29 @@ export const SANDBOX_PINNED_MUTATION_PYTHON = [

170224

" src_stat = os.lstat(src_basename, dir_fd=src_parent_fd)",

171225

" if stat.S_ISDIR(src_stat.st_mode) and not stat.S_ISLNK(src_stat.st_mode):",

172226

" temp_dir_name = create_temp_dir(dst_parent_fd, dst_basename, stat.S_IMODE(src_stat.st_mode) or 0o755)",

173-

" temp_dir_fd = open_dir(temp_dir_name, dir_fd=dst_parent_fd)",

174-

" src_dir_fd = open_dir(src_basename, dir_fd=src_parent_fd)",

227+

" temp_dir_fd = None",

228+

" src_dir_fd = None",

175229

" try:",

230+

" temp_dir_fd = open_dir(temp_dir_name, dir_fd=dst_parent_fd)",

231+

" src_dir_fd = open_dir(src_basename, dir_fd=src_parent_fd)",

176232

" for child in os.listdir(src_dir_fd):",

177-

" move_entry(src_dir_fd, child, temp_dir_fd, child)",

178-

" finally:",

233+

" copy_entry(src_dir_fd, child, temp_dir_fd, child)",

179234

" os.close(src_dir_fd)",

235+

" src_dir_fd = None",

180236

" os.close(temp_dir_fd)",

181-

" os.rename(temp_dir_name, dst_basename, src_dir_fd=dst_parent_fd, dst_dir_fd=dst_parent_fd)",

182-

" os.rmdir(src_basename, dir_fd=src_parent_fd)",

237+

" temp_dir_fd = None",

238+

" os.rename(temp_dir_name, dst_basename, src_dir_fd=dst_parent_fd, dst_dir_fd=dst_parent_fd)",

239+

" except Exception:",

240+

" if src_dir_fd is not None:",

241+

" os.close(src_dir_fd)",

242+

" if temp_dir_fd is not None:",

243+

" os.close(temp_dir_fd)",

244+

" try:",

245+

" remove_tree(dst_parent_fd, temp_dir_name)",

246+

" except FileNotFoundError:",

247+

" pass",

248+

" raise",

249+

" remove_tree(src_parent_fd, src_basename)",

183250

" os.fsync(dst_parent_fd)",

184251

" os.fsync(src_parent_fd)",

185252

" return",