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

推荐订阅源

WordPress大学
WordPress大学
大猫的无限游戏
大猫的无限游戏
B
Blog
阮一峰的网络日志
阮一峰的网络日志
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
Jina AI
Jina AI
博客园 - 聂微东
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
L
LangChain Blog
M
MIT News - Artificial intelligence
Blog — PlanetScale
Blog — PlanetScale
腾讯CDC
酷 壳 – CoolShell
酷 壳 – CoolShell
Y
Y Combinator Blog
F
Fortinet All Blogs
H
Help Net Security
B
Blog RSS Feed
J
Java Code Geeks
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
S
SegmentFault 最新的问题

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 heartbeat commitment assertions · openclaw/...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -61,6 +61,16 @@ describe("runHeartbeatOnce commitments", () => {

6161

};

6262

}

636364+

function expectCommitmentFields(

65+

commitment: CommitmentRecord | undefined,

66+

expected: Partial<CommitmentRecord>,

67+

) {

68+

expect(commitment).toBeDefined();

69+

for (const [key, value] of Object.entries(expected)) {

70+

expect(commitment?.[key as keyof CommitmentRecord]).toEqual(value);

71+

}

72+

}

73+6474

async function setupCommitmentCase(params?: {

6575

replyText?: string;

6676

target?: "last" | "none";

@@ -237,7 +247,7 @@ describe("runHeartbeatOnce commitments", () => {

237247238248

expect(result.status).toBe("ran");

239249

expect(sendTelegram).toHaveBeenCalled();

240-

expect(store.commitments[0]).toMatchObject({

250+

expectCommitmentFields(store.commitments[0], {

241251

id: "cm_interview",

242252

status: "pending",

243253

attempts: 0,

@@ -314,7 +324,7 @@ describe("runHeartbeatOnce commitments", () => {

314324315325

expect(result.status).toBe("ran");

316326

expect(sendTelegram).not.toHaveBeenCalled();

317-

expect(store.commitments[0]).toMatchObject({

327+

expectCommitmentFields(store.commitments[0], {

318328

id: "cm_interview",

319329

status: "pending",

320330

attempts: 0,

@@ -357,13 +367,12 @@ describe("runHeartbeatOnce commitments", () => {

357367

runner.stop();

358368359369

expect(runOnce).toHaveBeenCalledTimes(1);

360-

expect(runOnce).toHaveBeenCalledWith(

361-

expect.objectContaining({

362-

agentId: "main",

363-

heartbeat: expect.objectContaining({ target: "none" }),

364-

}),

365-

);

366-

expect(runOnce.mock.calls[0]?.[0]).not.toHaveProperty("sessionKey", dueSessionKey);

370+

const runOptions = runOnce.mock.calls[0]?.[0] as

371+

| { agentId?: string; heartbeat?: { target?: string }; sessionKey?: string }

372+

| undefined;

373+

expect(runOptions?.agentId).toBe("main");

374+

expect(runOptions?.heartbeat?.target).toBe("none");

375+

expect(runOptions?.sessionKey).not.toBe(dueSessionKey);

367376

});

368377

});

369378

@@ -372,7 +381,7 @@ describe("runHeartbeatOnce commitments", () => {

372381373382

expect(result.status).toBe("ran");

374383

expect(sendTelegram).toHaveBeenCalled();

375-

expect(store.commitments[0]).toMatchObject({

384+

expectCommitmentFields(store.commitments[0], {

376385

id: "cm_interview",

377386

status: "sent",

378387

attempts: 1,

@@ -387,7 +396,7 @@ describe("runHeartbeatOnce commitments", () => {

387396388397

expect(result.status).toBe("ran");

389398

expect(sendTelegram).not.toHaveBeenCalled();

390-

expect(store.commitments[0]).toMatchObject({

399+

expectCommitmentFields(store.commitments[0], {

391400

id: "cm_interview",

392401

status: "dismissed",

393402

attempts: 1,

@@ -403,7 +412,7 @@ describe("runHeartbeatOnce commitments", () => {

403412404413

expect(result.status).toBe("ran");

405414

expect(sendTelegram).not.toHaveBeenCalled();

406-

expect(store.commitments[0]).toMatchObject({

415+

expectCommitmentFields(store.commitments[0], {

407416

id: "cm_interview",

408417

status: "dismissed",

409418

attempts: 1,

@@ -424,7 +433,7 @@ describe("runHeartbeatOnce commitments", () => {

424433425434

expect(result.status).toBe("ran");

426435

expect(sendTelegram).toHaveBeenCalled();

427-

expect(store.commitments[0]).toMatchObject({

436+

expectCommitmentFields(store.commitments[0], {

428437

id: "cm_interview",

429438

status: "sent",

430439

attempts: 1,