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

推荐订阅源

Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
小众软件
小众软件
爱范儿
爱范儿
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
量子位
博客园_首页
T
Tailwind CSS Blog
The Cloudflare Blog
J
Java Code Geeks
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
U
Unit 42
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
人人都是产品经理
人人都是产品经理
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
腾讯CDC
P
Proofpoint News Feed
aimingoo的专栏
aimingoo的专栏
Recent Announcements
Recent Announcements
T
The Blog of Author Tim Ferriss
D
Docker
Microsoft Azure Blog
Microsoft Azure 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: guard sandbox move cleanup identity · openclaw/openc...
steipete · 2026-05-07 · via Recent Commits to openclaw:main

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

158158

" os.close(dir_fd)",

159159

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

160160

"",

161+

"def entry_identity(entry_stat):",

162+

" return (",

163+

" entry_stat.st_dev,",

164+

" entry_stat.st_ino,",

165+

" entry_stat.st_mode,",

166+

" entry_stat.st_size,",

167+

" getattr(entry_stat, 'st_mtime_ns', int(entry_stat.st_mtime * 1000000000)),",

168+

" getattr(entry_stat, 'st_ctime_ns', int(entry_stat.st_ctime * 1000000000)),",

169+

" )",

170+

"",

171+

"def same_identity(expected, entry_stat):",

172+

" return expected == entry_identity(entry_stat)",

173+

"",

174+

"def source_changed_error(basename):",

175+

" return OSError(getattr(errno, 'ESTALE', errno.EIO), 'source changed during move fallback cleanup', basename)",

176+

"",

161177

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

162178

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

163179

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

@@ -167,6 +183,7 @@ export const SANDBOX_PINNED_MUTATION_PYTHON = [

167183

" dst_dir_fd = None",

168184

" try:",

169185

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

186+

" src_stat = os.fstat(src_dir_fd)",

170187

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

171188

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

172189

" copied_children.append((child, copy_entry(src_dir_fd, child, dst_dir_fd, child)))",

@@ -184,11 +201,11 @@ export const SANDBOX_PINNED_MUTATION_PYTHON = [

184201

" os.close(src_dir_fd)",

185202

" if dst_dir_fd is not None:",

186203

" os.close(dst_dir_fd)",

187-

" return ('dir', copied_children)",

204+

" return ('dir', entry_identity(src_stat), copied_children)",

188205

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

189206

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

190207

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

191-

" return ('leaf', None)",

208+

" return ('leaf', entry_identity(src_stat), None)",

192209

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

193210

" dst_fd = None",

194211

" try:",

@@ -212,10 +229,13 @@ export const SANDBOX_PINNED_MUTATION_PYTHON = [

212229

" if dst_fd is not None:",

213230

" os.close(dst_fd)",

214231

" os.close(src_fd)",

215-

" return ('leaf', None)",

232+

" return ('leaf', entry_identity(src_file_stat), None)",

216233

"",

217234

"def remove_copied_entry(parent_fd, basename, manifest):",

218-

" kind, children = manifest",

235+

" kind, expected_identity, children = manifest",

236+

" current_stat = os.lstat(basename, dir_fd=parent_fd)",

237+

" if not same_identity(expected_identity, current_stat):",

238+

" raise source_changed_error(basename)",

219239

" if kind != 'dir':",

220240

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

221241

" return",

@@ -245,6 +265,7 @@ export const SANDBOX_PINNED_MUTATION_PYTHON = [

245265

" try:",

246266

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

247267

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

268+

" src_stat = os.fstat(src_dir_fd)",

248269

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

249270

" copied_children.append((child, copy_entry(src_dir_fd, child, temp_dir_fd, child)))",

250271

" os.close(src_dir_fd)",

@@ -262,7 +283,7 @@ export const SANDBOX_PINNED_MUTATION_PYTHON = [

262283

" except FileNotFoundError:",

263284

" pass",

264285

" raise",

265-

" remove_copied_entry(src_parent_fd, src_basename, ('dir', copied_children))",

286+

" remove_copied_entry(src_parent_fd, src_basename, ('dir', entry_identity(src_stat), copied_children))",

266287

" os.fsync(dst_parent_fd)",

267288

" os.fsync(src_parent_fd)",

268289

" return",