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

推荐订阅源

月光博客
月光博客
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
阮一峰的网络日志
阮一峰的网络日志
罗磊的独立博客
T
Tailwind CSS Blog
博客园_首页
博客园 - 司徒正美
Google DeepMind News
Google DeepMind News
Hugging Face - Blog
Hugging Face - Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
V2EX
J
Java Code Geeks
量子位
D
DataBreaches.Net
MongoDB | Blog
MongoDB | Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Azure Blog
Microsoft Azure Blog
P
Proofpoint News Feed
C
Check Point Blog
V
Visual Studio Blog
H
Help Net Security
Recent Announcements
Recent Announcements
Engineering at Meta
Engineering at Meta

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(gateway): trace restart intent reasons · openclaw/ope...
steipete · 2026-05-17 · via Recent Commits to openclaw:main

@@ -91,11 +91,13 @@ type GatewayRestartIntentPayload = {

9191

kind: "gateway-restart";

9292

pid: number;

9393

createdAt: number;

94+

reason?: string;

9495

force?: boolean;

9596

waitMs?: number;

9697

};

97989899

export type GatewayRestartIntent = {

100+

reason?: string;

99101

force?: boolean;

100102

waitMs?: number;

101103

};

@@ -125,6 +127,7 @@ export function writeGatewayRestartIntentSync(opts: {

125127

env?: NodeJS.ProcessEnv;

126128

targetPid?: number;

127129

intent?: GatewayRestartIntent;

130+

reason?: string;

128131

}): boolean {

129132

const targetPid = normalizeRestartIntentPid(opts.targetPid);

130133

if (targetPid === null) {

@@ -133,10 +136,12 @@ export function writeGatewayRestartIntentSync(opts: {

133136

const env = opts.env ?? process.env;

134137

try {

135138

const intentPath = resolveGatewayRestartIntentPath(env);

139+

const reason = normalizeRestartIntentReason(opts.reason ?? opts.intent?.reason);

136140

const payload: GatewayRestartIntentPayload = {

137141

kind: "gateway-restart",

138142

pid: targetPid,

139143

createdAt: Date.now(),

144+

...(reason ? { reason } : {}),

140145

...(opts.intent?.force ? { force: true } : {}),

141146

...(typeof opts.intent?.waitMs === "number" &&

142147

Number.isFinite(opts.intent.waitMs) &&

@@ -170,14 +175,17 @@ function parseGatewayRestartIntent(raw: string): GatewayRestartIntentPayload | n

170175

Number.isFinite(parsed.pid) &&

171176

typeof parsed.createdAt === "number" &&

172177

Number.isFinite(parsed.createdAt) &&

178+

(parsed.reason === undefined || typeof parsed.reason === "string") &&

173179

(parsed.force === undefined || typeof parsed.force === "boolean") &&

174180

(parsed.waitMs === undefined ||

175181

(typeof parsed.waitMs === "number" && Number.isFinite(parsed.waitMs) && parsed.waitMs >= 0))

176182

) {

183+

const reason = normalizeRestartIntentReason(parsed.reason);

177184

return {

178185

kind: "gateway-restart",

179186

pid: parsed.pid,

180187

createdAt: parsed.createdAt,

188+

...(reason ? { reason } : {}),

181189

...(parsed.force ? { force: true } : {}),

182190

...(typeof parsed.waitMs === "number" ? { waitMs: Math.floor(parsed.waitMs) } : {}),

183191

};

@@ -188,6 +196,11 @@ function parseGatewayRestartIntent(raw: string): GatewayRestartIntentPayload | n

188196

return null;

189197

}

190198199+

function normalizeRestartIntentReason(reason: string | undefined): string | undefined {

200+

const normalized = reason?.trim();

201+

return normalized ? normalized.slice(0, 200) : undefined;

202+

}

203+191204

export function consumeGatewayRestartIntentPayloadSync(

192205

env: NodeJS.ProcessEnv = process.env,

193206

now = Date.now(),

@@ -217,6 +230,7 @@ export function consumeGatewayRestartIntentPayloadSync(

217230

return null;

218231

}

219232

return {

233+

...(payload.reason ? { reason: payload.reason } : {}),

220234

...(payload.force ? { force: true } : {}),

221235

...(typeof payload.waitMs === "number" ? { waitMs: payload.waitMs } : {}),

222236

};