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

推荐订阅源

G
Google Developers Blog
F
Fortinet All Blogs
Microsoft Azure Blog
Microsoft Azure Blog
腾讯CDC
Vercel News
Vercel News
Recent Announcements
Recent Announcements
博客园 - Franky
小众软件
小众软件
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Cloudflare Blog
宝玉的分享
宝玉的分享
I
InfoQ
博客园 - 聂微东
Jina AI
Jina AI
J
Java Code Geeks
V
V2EX
U
Unit 42
Stack Overflow Blog
Stack Overflow Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
阮一峰的网络日志
阮一峰的网络日志
L
LangChain Blog
T
The Blog of Author Tim Ferriss
量子位

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: dedupe gateway cron mock reads · openclaw/openclaw@...
steipete · 2026-05-13 · via Recent Commits to openclaw:main

@@ -126,7 +126,7 @@ function callArg(

126126

argIndex: number,

127127

label: string,

128128

) {

129-

const call = mock.mock.calls.at(callIndex);

129+

const call = mock.mock.calls[callIndex];

130130

if (!call) {

131131

throw new Error(`Expected mock call: ${label}`);

132132

}

@@ -136,6 +136,15 @@ function callArg(

136136

return call[argIndex];

137137

}

138138139+

function lastMockCall(mock: { mock: { calls: Array<Array<unknown>> } }, label: string) {

140+

const calls = mock.mock.calls;

141+

const call = calls[calls.length - 1];

142+

if (!call) {

143+

throw new Error(`Expected last mock call: ${label}`);

144+

}

145+

return call;

146+

}

147+139148

function expectHookContext(callIndex: number, fields: { config?: unknown; hasGetCron?: boolean }) {

140149

const context = requireRecord(

141150

callArg(runCronChangedMock, callIndex, 1, "cron_changed context"),

@@ -646,8 +655,8 @@ describe("buildGatewayCronService", () => {

646655

// configured default "primary". The exact resolved sessionKey is

647656

// delegated to resolveCronSessionKey (already covered by other tests);

648657

// here we only assert the agent target is consistent across both sides.

649-

const enqueueCall = enqueueSystemEventMock.mock.calls.at(-1);

650-

const wakeCall = requestHeartbeatMock.mock.calls.at(-1);

658+

const enqueueCall = lastMockCall(enqueueSystemEventMock, "enqueue system event");

659+

const wakeCall = lastMockCall(requestHeartbeatMock, "request heartbeat");

651660

const enqueueSessionKey = (enqueueCall?.[1] as { sessionKey?: string } | undefined)

652661

?.sessionKey;

653662

const wakeOpts = wakeCall?.[0] as { agentId?: string; sessionKey?: string } | undefined;

@@ -710,8 +719,8 @@ describe("buildGatewayCronService", () => {

710719

sessionKey: "discord:channel:ops",

711720

});

712721713-

const enqueueCall = enqueueSystemEventMock.mock.calls.at(-1);

714-

const wakeCall = requestHeartbeatMock.mock.calls.at(-1);

722+

const enqueueCall = lastMockCall(enqueueSystemEventMock, "enqueue system event");

723+

const wakeCall = lastMockCall(requestHeartbeatMock, "request heartbeat");

715724

expect((enqueueCall?.[1] as { sessionKey?: string } | undefined)?.sessionKey).toBe(

716725

"agent:primary:discord:channel:ops",

717726

);

@@ -770,8 +779,8 @@ describe("buildGatewayCronService", () => {

770779

sessionKey: "agent:ghost:discord:channel:ops",

771780

});

772781773-

const enqueueCall = enqueueSystemEventMock.mock.calls.at(-1);

774-

const wakeCall = requestHeartbeatMock.mock.calls.at(-1);

782+

const enqueueCall = lastMockCall(enqueueSystemEventMock, "enqueue system event");

783+

const wakeCall = lastMockCall(requestHeartbeatMock, "request heartbeat");

775784

expect((enqueueCall?.[1] as { sessionKey?: string } | undefined)?.sessionKey).toBe(

776785

"agent:primary:main",

777786

);

@@ -813,8 +822,8 @@ describe("buildGatewayCronService", () => {

813822

}),

814823

).toEqual({ ok: true });

815824816-

const enqueueCall = enqueueSystemEventMock.mock.calls.at(-1);

817-

const wakeCall = requestHeartbeatMock.mock.calls.at(-1);

825+

const enqueueCall = lastMockCall(enqueueSystemEventMock, "enqueue system event");

826+

const wakeCall = lastMockCall(requestHeartbeatMock, "request heartbeat");

818827

expect(enqueueCall?.[0]).toBe("hello");

819828

expect((enqueueCall?.[1] as { sessionKey?: string } | undefined)?.sessionKey).toMatch(

820829

/^agent:ops:/,