慣性聚合 関心のあるブログ、ニュース、テクノロジーを効率的に追跡
原文を読む 慣性聚合で開く

おすすめ購読元

V
V2EX
博客园 - 叶小钗
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
博客园 - 【当耐特】
酷 壳 – CoolShell
酷 壳 – CoolShell
D
Docker
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
博客园 - Franky
G
Google Developers Blog
爱范儿
爱范儿
Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
aimingoo的专栏
aimingoo的专栏
V
Visual Studio Blog
M
MIT News - Artificial intelligence
Hugging Face - Blog
Hugging Face - 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 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311
fix (update): harden managed handoff cwd (# 83875) · openclaw / openclaw @ 1bafc23
jason-allen- · 2026-05-22 · via Recent Commits to openclaw:main

@@ -21,6 +21,7 @@ const SERVICE_IDENTITY_ENV_VARS = new Set<string>([

2121

const HANDOFF_SCRIPT = String.raw`

2222

const { spawn } = require("node:child_process");

2323

const fs = require("node:fs");

24+

const os = require("node:os");

2425

const path = require("node:path");

25262627

const params = JSON.parse(fs.readFileSync(process.argv[2], "utf-8"));

@@ -62,6 +63,23 @@ function cleanupSensitiveFiles() {

6263

}

6364

}

646566+

function resolveExistingDirectory(candidates) {

67+

for (const candidate of candidates) {

68+

if (!candidate || typeof candidate !== "string") {

69+

continue;

70+

}

71+

try {

72+

const stat = fs.statSync(candidate);

73+

if (stat.isDirectory()) {

74+

return candidate;

75+

}

76+

} catch {

77+

// Try the next candidate.

78+

}

79+

}

80+

return undefined;

81+

}

82+6583

function readJsonFile(filePath) {

6684

try {

6785

return JSON.parse(fs.readFileSync(filePath, "utf-8"));

@@ -170,8 +188,18 @@ function markUpdateSentinelFailureIfPending(reason) {

170188

let outputFd;

171189

try {

172190

outputFd = fs.openSync(params.logPath, "a", 0o600);

191+

const commandCwd =

192+

resolveExistingDirectory([

193+

params.cwd,

194+

os.homedir(),

195+

os.tmpdir(),

196+

path.parse(process.execPath).root,

197+

]) || params.cwd;

198+

if (commandCwd !== params.cwd) {

199+

appendLog("managed update command cwd fallback: " + params.cwd + " -> " + commandCwd);

200+

}

173201

const child = spawn(params.commandArgv[0], params.commandArgv.slice(1), {

174-

cwd: params.cwd,

202+

cwd: commandCwd,

175203

env: process.env,

176204

detached: true,

177205

stdio: ["ignore", outputFd, outputFd],

@@ -273,6 +301,24 @@ export function stripSupervisorHintEnv(env: NodeJS.ProcessEnv): NodeJS.ProcessEn

273301

return next;

274302

}

275303304+

async function resolveManagedServiceHandoffCwd(root: string): Promise<string> {

305+

const candidates = [os.homedir(), os.tmpdir(), path.dirname(process.execPath), root];

306+

for (const candidate of candidates) {

307+

if (!candidate.trim()) {

308+

continue;

309+

}

310+

try {

311+

const stat = await fs.stat(candidate);

312+

if (stat.isDirectory()) {

313+

return candidate;

314+

}

315+

} catch {

316+

// Try the next candidate.

317+

}

318+

}

319+

return root;

320+

}

321+276322

export async function startManagedServiceUpdateHandoff(params: {

277323

root: string;

278324

timeoutMs?: number;

@@ -295,14 +341,15 @@ export async function startManagedServiceUpdateHandoff(params: {

295341

argv1: params.argv1 ?? process.argv[1],

296342

});

297343

const commandLabel = formatManagedServiceUpdateCommand(params.timeoutMs);

344+

const handoffCwd = await resolveManagedServiceHandoffCwd(params.root);

298345

const metaFile: ControlPlaneUpdateSentinelMetaFile = {

299346

version: 1,

300347

meta: params.meta,

301348

};

302349

const helperParams = {

303350

parentPid: params.parentPid ?? process.pid,

304351

parentExitTimeoutMs: Math.max(0, params.restartDelayMs ?? 0) + PARENT_EXIT_GRACE_MS,

305-

cwd: params.root,

352+

cwd: handoffCwd,

306353

commandArgv,

307354

commandLabel,

308355

handoffId: params.handoffId,

@@ -322,7 +369,7 @@ export async function startManagedServiceUpdateHandoff(params: {

322369

OPENCLAW_UPDATE_RUN_HANDOFF: "1",

323370

};

324371

const child = spawn(params.execPath ?? process.execPath, [scriptPath, paramsPath], {

325-

cwd: params.root,

372+

cwd: handoffCwd,

326373

env,

327374

detached: true,

328375

stdio: "ignore",