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

推荐订阅源

H
Help Net Security
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
小众软件
小众软件
Stack Overflow Blog
Stack Overflow Blog
美团技术团队
博客园_首页
T
Tailwind CSS Blog
博客园 - 三生石上(FineUI控件)
B
Blog
D
DataBreaches.Net
腾讯CDC
C
Check Point Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
U
Unit 42
月光博客
月光博客
V
V2EX
Vercel News
Vercel News
T
The Blog of Author Tim Ferriss
The Cloudflare Blog
博客园 - 叶小钗
Y
Y Combinator 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: tighten cron migration assertions · openclaw/opencl...
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -47,34 +47,29 @@ describe("normalizeStoredCronJobs", () => {

4747

const result = normalizeStoredCronJobs(jobs);

48484949

expect(result.mutated).toBe(true);

50-

expect(result.issues).toMatchObject({

51-

jobId: 1,

52-

legacyScheduleCron: 1,

53-

legacyTopLevelPayloadFields: 1,

54-

legacyTopLevelDeliveryFields: 1,

55-

});

50+

expect(result.issues.jobId).toBe(1);

51+

expect(result.issues.legacyScheduleCron).toBe(1);

52+

expect(result.issues.legacyTopLevelPayloadFields).toBe(1);

53+

expect(result.issues.legacyTopLevelDeliveryFields).toBe(1);

56545755

const [job] = jobs;

5856

expect(job?.jobId).toBeUndefined();

5957

expect(job?.id).toBe("legacy-job");

60-

expect(job?.schedule).toMatchObject({

61-

kind: "cron",

62-

expr: "*/5 * * * *",

63-

tz: "UTC",

64-

});

58+

const schedule = job?.schedule as Record<string, unknown> | undefined;

59+

expect(schedule?.kind).toBe("cron");

60+

expect(schedule?.expr).toBe("*/5 * * * *");

61+

expect(schedule?.tz).toBe("UTC");

6562

expect(job?.message).toBeUndefined();

6663

expect(job?.provider).toBeUndefined();

67-

expect(job?.delivery).toMatchObject({

68-

mode: "announce",

69-

channel: "telegram",

70-

to: "12345",

71-

threadId: "77",

72-

});

73-

expect(job?.payload).toMatchObject({

74-

kind: "agentTurn",

75-

message: "say hi",

76-

model: "openai/gpt-5.5",

77-

});

64+

const delivery = job?.delivery as Record<string, unknown> | undefined;

65+

expect(delivery?.mode).toBe("announce");

66+

expect(delivery?.channel).toBe("telegram");

67+

expect(delivery?.to).toBe("12345");

68+

expect(delivery?.threadId).toBe("77");

69+

const payload = job?.payload as Record<string, unknown> | undefined;

70+

expect(payload?.kind).toBe("agentTurn");

71+

expect(payload?.message).toBe("say hi");

72+

expect(payload?.model).toBe("openai/gpt-5.5");

7873

});

79748075

it("normalizes payload provider alias into channel", () => {

@@ -94,16 +89,13 @@ describe("normalizeStoredCronJobs", () => {

94899590

expect(result.mutated).toBe(true);

9691

expect(result.issues.legacyPayloadProvider).toBe(1);

97-

expect(jobs[0]?.payload).toMatchObject({

98-

kind: "agentTurn",

99-

message: "ping",

100-

});

10192

const payload = jobs[0]?.payload as Record<string, unknown> | undefined;

93+

expect(payload?.kind).toBe("agentTurn");

94+

expect(payload?.message).toBe("ping");

10295

expect(payload?.provider).toBeUndefined();

103-

expect(jobs[0]?.delivery).toMatchObject({

104-

mode: "announce",

105-

channel: "slack",

106-

});

96+

const delivery = jobs[0]?.delivery as Record<string, unknown> | undefined;

97+

expect(delivery?.mode).toBe("announce");

98+

expect(delivery?.channel).toBe("slack");

10799

});

108100109101

it("rewrites legacy OpenAI Codex model refs in cron payloads", () => {

@@ -122,12 +114,11 @@ describe("normalizeStoredCronJobs", () => {

122114123115

expect(result.mutated).toBe(true);

124116

expect(result.issues.legacyPayloadCodexModel).toBe(1);

125-

expect(job.payload).toMatchObject({

126-

kind: "agentTurn",

127-

message: "ping",

128-

model: "openai/gpt-5.5",

129-

fallbacks: ["anthropic/claude-opus-4.6", "openai/gpt-5.4-mini"],

130-

});

117+

const payload = job.payload as Record<string, unknown>;

118+

expect(payload.kind).toBe("agentTurn");

119+

expect(payload.message).toBe("ping");

120+

expect(payload.model).toBe("openai/gpt-5.5");

121+

expect(payload.fallbacks).toEqual(["anthropic/claude-opus-4.6", "openai/gpt-5.4-mini"]);

131122

});

132123133124

it("does not report legacyPayloadKind for already-normalized payload kinds", () => {

@@ -181,8 +172,12 @@ describe("normalizeStoredCronJobs", () => {

181172182173

expect(result.mutated).toBe(true);

183174

expect(result.issues.legacyPayloadKind).toBe(2);

184-

expect(jobs[0]?.payload).toMatchObject({ kind: "agentTurn", message: "ping" });

185-

expect(jobs[1]?.payload).toMatchObject({ kind: "systemEvent", text: "pong" });

175+

const firstPayload = jobs[0]?.payload as Record<string, unknown> | undefined;

176+

expect(firstPayload?.kind).toBe("agentTurn");

177+

expect(firstPayload?.message).toBe("ping");

178+

const secondPayload = jobs[1]?.payload as Record<string, unknown> | undefined;

179+

expect(secondPayload?.kind).toBe("systemEvent");

180+

expect(secondPayload?.text).toBe("pong");

186181

});

187182188183

it("normalizes isolated legacy jobs without mutating runtime code paths", () => {

@@ -322,12 +317,9 @@ describe("normalizeStoredCronJobs", () => {

322317

});

323318324319

expect(result.mutated).toBe(true);

325-

expect(job.schedule).toEqual(

326-

expect.objectContaining({

327-

kind: "cron",

328-

expr: "0 */2 * * *",

329-

}),

330-

);

320+

const schedule = job.schedule as Record<string, unknown>;

321+

expect(schedule.kind).toBe("cron");

322+

expect(schedule.expr).toBe("0 */2 * * *");

331323

expect(job.sessionTarget).toBe("main");

332324

expect(job.wakeMode).toBe("now");

333325

expect(job.payload).toEqual({