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

推荐订阅源

爱范儿
爱范儿
博客园_首页
U
Unit 42
Apple Machine Learning Research
Apple Machine Learning Research
云风的 BLOG
云风的 BLOG
MongoDB | Blog
MongoDB | Blog
美团技术团队
H
Help Net Security
G
Google Developers Blog
B
Blog RSS Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
aimingoo的专栏
aimingoo的专栏
Google DeepMind News
Google DeepMind News
J
Java Code Geeks
M
MIT News - Artificial intelligence
腾讯CDC
IT之家
IT之家
Vercel News
Vercel News
C
Check Point Blog
博客园 - 三生石上(FineUI控件)
Last Week in AI
Last Week in AI
I
InfoQ
博客园 - 司徒正美
A
About on SuperTechFans

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
refactor: share cron state parsing · openclaw/openclaw@77...
vincentkoc · 2026-05-29 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -84,6 +84,27 @@ type CronStateFile = {

8484

jobs: Record<string, CronStateFileEntry>;

8585

};

8686
87+

function parseCronStateFile(raw: string): CronStateFile | null {

88+

try {

89+

const parsed = parseJsonWithJson5Fallback(raw);

90+

if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {

91+

return null;

92+

}

93+

const record = parsed as Record<string, unknown>;

94+

if (

95+

record.version !== 1 ||

96+

typeof record.jobs !== "object" ||

97+

record.jobs === null ||

98+

Array.isArray(record.jobs)

99+

) {

100+

return null;

101+

}

102+

return { version: 1, jobs: record.jobs as Record<string, CronStateFileEntry> };

103+

} catch {

104+

return null;

105+

}

106+

}

107+
87108

function normalizeCronStoreFile(parsed: unknown): CronStoreFile {

88109

const rawJobs = getRawCronJobs(parsed);

89110

return {

@@ -153,25 +174,7 @@ async function loadStateFile(statePath: string): Promise<CronStateFile | null> {

153174

});

154175

}

155176
156-

try {

157-

const parsed = parseJsonWithJson5Fallback(raw);

158-

if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {

159-

return null;

160-

}

161-

const record = parsed as Record<string, unknown>;

162-

if (

163-

record.version !== 1 ||

164-

typeof record.jobs !== "object" ||

165-

record.jobs === null ||

166-

Array.isArray(record.jobs)

167-

) {

168-

return null;

169-

}

170-

return { version: 1, jobs: record.jobs as Record<string, CronStateFileEntry> };

171-

} catch {

172-

// Best-effort: if state file is corrupt, treat as absent.

173-

return null;

174-

}

177+

return parseCronStateFile(raw);

175178

}

176179
177180

function loadStateFileSync(statePath: string): CronStateFile | null {

@@ -187,24 +190,7 @@ function loadStateFileSync(statePath: string): CronStateFile | null {

187190

});

188191

}

189192
190-

try {

191-

const parsed = parseJsonWithJson5Fallback(raw);

192-

if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {

193-

return null;

194-

}

195-

const record = parsed as Record<string, unknown>;

196-

if (

197-

record.version !== 1 ||

198-

typeof record.jobs !== "object" ||

199-

record.jobs === null ||

200-

Array.isArray(record.jobs)

201-

) {

202-

return null;

203-

}

204-

return { version: 1, jobs: record.jobs as Record<string, CronStateFileEntry> };

205-

} catch {

206-

return null;

207-

}

193+

return parseCronStateFile(raw);

208194

}

209195
210196

function hasInlineState(jobs: Array<Record<string, unknown> | null | undefined>): boolean {