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

推荐订阅源

Security Archives - TechRepublic
Security Archives - TechRepublic
Project Zero
Project Zero
K
Kaspersky official blog
G
Google Developers Blog
T
Threat Research - Cisco Blogs
T
The Blog of Author Tim Ferriss
Cyberwarzone
Cyberwarzone
Y
Y Combinator Blog
Recorded Future
Recorded Future
Blog — PlanetScale
Blog — PlanetScale
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cisco Talos Blog
Cisco Talos Blog
Latest news
Latest news
Microsoft Security Blog
Microsoft Security Blog
H
Help Net Security
S
Schneier on Security
P
Palo Alto Networks Blog
H
Hacker News: Front Page
N
News and Events Feed by Topic
N
Netflix TechBlog - Medium
博客园 - Franky
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
SecWiki News
SecWiki News
Cloudbric
Cloudbric
TaoSecurity Blog
TaoSecurity Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The Hacker News
The Hacker News
C
Check Point Blog
L
LangChain Blog
腾讯CDC
小众软件
小众软件
T
Tenable Blog
Google DeepMind News
Google DeepMind News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
About on SuperTechFans
Google Online Security Blog
Google Online Security Blog
C
Cisco Blogs
Recent Announcements
Recent Announcements
Hacker News: Ask HN
Hacker News: Ask HN
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Vercel News
Vercel News
雷峰网
雷峰网
美团技术团队
D
DataBreaches.Net
Martin Fowler
Martin Fowler
Help Net Security
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Full Disclosure
博客园_首页

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: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
test: guard core mock call assertions · openclaw/openclaw@be5483f
steipete · 2026-05-12 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -233,7 +233,7 @@ async function expectNextRunUsesTargetSession(

233233

);

234234
235235

expect(params.runEmbeddedPiAgentMock).toHaveBeenCalledOnce();

236-

const runParams = params.runEmbeddedPiAgentMock.mock.calls[0]?.[0] as

236+

const runParams = params.runEmbeddedPiAgentMock.mock.calls.at(0)?.[0] as

237237

| Record<string, unknown>

238238

| undefined;

239239

if (!runParams) {

@@ -473,7 +473,7 @@ describe("trigger handling", () => {

473473

expect(text, testCase.label).not.toMatch(/Thinking level set/i);

474474

expect(runEmbeddedPiAgentMock, testCase.label).toHaveBeenCalledOnce();

475475

if (testCase.assertPrompt) {

476-

const prompt = runEmbeddedPiAgentMock.mock.calls[0]?.[0]?.prompt ?? "";

476+

const prompt = runEmbeddedPiAgentMock.mock.calls.at(0)?.[0]?.prompt ?? "";

477477

expect(prompt).toContain("Give me the status");

478478

expect(prompt).not.toContain("/thinking high");

479479

expect(prompt).not.toContain("/think high");

@@ -515,7 +515,7 @@ describe("trigger handling", () => {

515515

testCase.setup(cfg);

516516

await getReplyFromConfig(BASE_MESSAGE, { isHeartbeat: true }, cfg);

517517
518-

const call = runEmbeddedPiAgentMock.mock.calls[0]?.[0];

518+

const call = runEmbeddedPiAgentMock.mock.calls.at(0)?.[0];

519519

expect(call?.provider).toBe(testCase.expected.provider);

520520

expect(call?.model).toBe(testCase.expected.model);

521521

}

@@ -573,7 +573,7 @@ describe("trigger handling", () => {

573573

const text = maybeReplyText(res);

574574

expect(text?.startsWith("⚙️ Compacted")).toBe(true);

575575

expect(getCompactEmbeddedPiSessionMock()).toHaveBeenCalledOnce();

576-

expect(getCompactEmbeddedPiSessionMock().mock.calls[0]?.[0]?.sessionFile).toContain(

576+

expect(getCompactEmbeddedPiSessionMock().mock.calls.at(0)?.[0]?.sessionFile).toContain(

577577

join("agents", "worker1", "sessions"),

578578

);

579579

});

Original file line numberDiff line numberDiff line change

@@ -454,9 +454,11 @@ describe("channelsAddCommand", () => {

454454

await channelsAddCommand({}, runtime, { hasFlags: false });

455455
456456

expect(channelWizardMocks.prompter.intro).toHaveBeenCalledWith("Channel setup");

457-

expect(channelWizardMocks.setupChannels.mock.calls[0]?.[0]).toBe(config);

458-

expect(channelWizardMocks.setupChannels.mock.calls[0]?.[1]).toBe(runtime);

459-

expect(channelWizardMocks.setupChannels.mock.calls[0]?.[2]).toBe(channelWizardMocks.prompter);

457+

expect(channelWizardMocks.setupChannels.mock.calls.at(0)?.[0]).toBe(config);

458+

expect(channelWizardMocks.setupChannels.mock.calls.at(0)?.[1]).toBe(runtime);

459+

expect(channelWizardMocks.setupChannels.mock.calls.at(0)?.[2]).toBe(

460+

channelWizardMocks.prompter,

461+

);

460462

expect(setupOptions().deferStatusUntilSelection).toBe(true);

461463

expect(setupOptions().skipStatusNote).toBe(true);

462464

expect(setupOptions().promptAccountIds).toBe(true);

@@ -1025,7 +1027,7 @@ describe("channelsAddCommand", () => {

10251027

expect(configMocks.writeConfigFile.mock.invocationCallOrder[0]).toBeLessThan(

10261028

afterAccountConfigWritten.mock.invocationCallOrder[0] ?? Number.POSITIVE_INFINITY,

10271029

);

1028-

const hookCall = requireRecord(afterAccountConfigWritten.mock.calls[0]?.[0], "hook call");

1030+

const hookCall = requireRecord(afterAccountConfigWritten.mock.calls.at(0)?.[0], "hook call");

10291031

expect(hookCall.previousCfg).toBe(baseConfigSnapshot.config);

10301032

expect(requireRecord(hookCall.cfg, "hook config").channels).toEqual({

10311033

signal: {

Original file line numberDiff line numberDiff line change

@@ -332,7 +332,10 @@ describe("runConfigureWizard", () => {

332332
333333

await runWebConfigureWizard();

334334
335-

const setupConfig = requireRecord(mocks.setupSearch.mock.calls[0]?.[0], "setupSearch config");

335+

const setupConfig = requireRecord(

336+

mocks.setupSearch.mock.calls.at(0)?.[0],

337+

"setupSearch config",

338+

);

336339

expect(getGateway(setupConfig).mode).toBe("local");

337340

const written = requireWriteConfig();

338341

const search = getWebSearch(written);

@@ -378,7 +381,7 @@ describe("runConfigureWizard", () => {

378381

await runWebConfigureWizard();

379382
380383

const ownersRequest = requireRecord(

381-

mocks.resolvePluginContributionOwners.mock.calls[0]?.[0],

384+

mocks.resolvePluginContributionOwners.mock.calls.at(0)?.[0],

382385

"plugin owner request",

383386

);

384387

expect(ownersRequest.contribution).toBe("contracts");

@@ -396,7 +399,7 @@ describe("runConfigureWizard", () => {

396399
397400

await runConfigureWizard({ command: "configure", sections: ["channels"] }, createRuntime());

398401
399-

const setupChannelsCall = mocks.setupChannels.mock.calls[0] as Array<unknown> | undefined;

402+

const setupChannelsCall = mocks.setupChannels.mock.calls.at(0) as Array<unknown> | undefined;

400403

const setupChannelsConfig = requireRecord(setupChannelsCall?.[0], "setupChannels config");

401404

expect(getGateway(setupChannelsConfig).mode).toBe("local");

402405

const setupChannelsOptions = requireRecord(setupChannelsCall?.[3], "setupChannels options");

@@ -594,7 +597,7 @@ describe("runConfigureWizard", () => {

594597

expect(mocks.readConfigFileSnapshot).toHaveBeenCalledTimes(3);

595598
596599

// Verify plugin-written nested config survived the retry merge.

597-

const retryCall = mocks.replaceConfigFile.mock.calls[1][0] as {

600+

const retryCall = mocks.replaceConfigFile.mock.calls.at(1)?.[0] as {

598601

nextConfig: Record<string, unknown>;

599602

};

600603

const agents = requireRecord(retryCall.nextConfig.agents, "agents config");

Original file line numberDiff line numberDiff line change

@@ -968,7 +968,7 @@ describe("gateway-status command", () => {

968968

await runGatewayStatus(runtime, { timeout: "1000", json: true, sshAuto: true });

969969
970970

expect(startSshPortForward).toHaveBeenCalledTimes(1);

971-

const call = startSshPortForward.mock.calls[0]?.[0] as { target: string };

971+

const call = startSshPortForward.mock.calls.at(0)?.[0] as { target: string };

972972

expect(call.target).toBe("steipete@goodhost:2222");

973973

});

974974

});

@@ -990,7 +990,7 @@ describe("gateway-status command", () => {

990990

await runGatewayStatus(runtime, { timeout: "1000", json: true });

991991
992992

expect(startSshPortForward).toHaveBeenCalledTimes(1);

993-

const call = startSshPortForward.mock.calls[0]?.[0] as {

993+

const call = startSshPortForward.mock.calls.at(0)?.[0] as {

994994

target: string;

995995

identity?: string;

996996

};

@@ -1010,7 +1010,7 @@ describe("gateway-status command", () => {

10101010

startSshPortForward.mockClear();

10111011

await runGatewayStatus(runtime, { timeout: "1000", json: true });

10121012
1013-

const call = startSshPortForward.mock.calls[0]?.[0] as {

1013+

const call = startSshPortForward.mock.calls.at(0)?.[0] as {

10141014

target: string;

10151015

};

10161016

expect(call.target).toBe("studio.example");

@@ -1037,7 +1037,7 @@ describe("gateway-status command", () => {

10371037

sshIdentity: "/tmp/explicit_id",

10381038

});

10391039
1040-

const call = startSshPortForward.mock.calls[0]?.[0] as {

1040+

const call = startSshPortForward.mock.calls.at(0)?.[0] as {

10411041

identity?: string;

10421042

};

10431043

expect(call.identity).toBe("/tmp/explicit_id");

Original file line numberDiff line numberDiff line change

@@ -914,7 +914,7 @@ describe("modelsListCommand forward-compat", () => {

914914
915915

await modelsListCommand({ all: true, provider: "openai", json: true }, runtime as never);

916916
917-

expect(mocks.loadModelRegistry.mock.calls[0]?.[0]).toBe(mocks.resolvedConfig);

917+

expect(mocks.loadModelRegistry.mock.calls.at(0)?.[0]).toBe(mocks.resolvedConfig);

918918

expect(modelRegistryOptions().providerFilter).toBe("openai");

919919

expect(modelRegistryOptions().normalizeModels).toBe(true);

920920

expectRowKeys(lastPrintedRows<{ key: string }>(), ["openai/gpt-5.4", "openai/gpt-5.5-pro"]);

@@ -976,7 +976,7 @@ describe("modelsListCommand forward-compat", () => {

976976
977977

await modelsListCommand({ all: true, json: true }, runtime as never);

978978
979-

expect(mocks.loadModelRegistry.mock.calls[0]?.[0]).toBe(mocks.resolvedConfig);

979+

expect(mocks.loadModelRegistry.mock.calls.at(0)?.[0]).toBe(mocks.resolvedConfig);

980980

expect(modelRegistryOptions().providerFilter).toBeUndefined();

981981

expect(modelRegistryOptions().normalizeModels).toBe(false);

982982

expect(mocks.loadProviderCatalogModelsForList).not.toHaveBeenCalled();

@@ -1006,7 +1006,7 @@ describe("modelsListCommand forward-compat", () => {

10061006

runtime as never,

10071007

);

10081008
1009-

expect(mocks.loadModelRegistry.mock.calls[0]?.[0]).toBe(mocks.resolvedConfig);

1009+

expect(mocks.loadModelRegistry.mock.calls.at(0)?.[0]).toBe(mocks.resolvedConfig);

10101010

expect(modelRegistryOptions().providerFilter).toBe("openai-codex");

10111011

expect(modelRegistryOptions().normalizeModels).toBe(true);

10121012

expect(mocks.loadProviderCatalogModelsForList).toHaveBeenNthCalledWith(1, {

@@ -1064,7 +1064,7 @@ describe("modelsListCommand forward-compat", () => {

10641064
10651065

await modelsListCommand({ all: true, provider: "anthropic", json: true }, runtime as never);

10661066
1067-

expect(mocks.loadModelRegistry.mock.calls[0]?.[0]).toBe(mocks.resolvedConfig);

1067+

expect(mocks.loadModelRegistry.mock.calls.at(0)?.[0]).toBe(mocks.resolvedConfig);

10681068

expect(modelRegistryOptions().providerFilter).toBe("anthropic");

10691069

expect(modelRegistryOptions().normalizeModels).toBe(false);

10701070

expect(modelRegistryOptions().loadAvailability).toBe(false);

Original file line numberDiff line numberDiff line change

@@ -90,7 +90,7 @@ describe("tasks commands", () => {

9090

const runtime = createRuntime();

9191

await tasksAuditCommand({ json: true }, runtime);

9292
93-

const payload = JSON.parse(String(vi.mocked(runtime.log).mock.calls[0]?.[0])) as {

93+

const payload = JSON.parse(String(vi.mocked(runtime.log).mock.calls.at(0)?.[0])) as {

9494

summary: {

9595

total: number;

9696

errors: number;

@@ -118,7 +118,9 @@ describe("tasks commands", () => {

118118

const limitedRuntime = createRuntime();

119119

await tasksAuditCommand({ json: true, limit: 1 }, limitedRuntime);

120120
121-

const limitedPayload = JSON.parse(String(vi.mocked(limitedRuntime.log).mock.calls[0]?.[0]));

121+

const limitedPayload = JSON.parse(

122+

String(vi.mocked(limitedRuntime.log).mock.calls.at(0)?.[0]),

123+

);

122124
123125

expect(limitedPayload.findings).toStrictEqual([

124126

{

@@ -151,7 +153,7 @@ describe("tasks commands", () => {

151153

const runtime = createRuntime();

152154

await tasksMaintenanceCommand({ json: true, apply: false }, runtime);

153155
154-

const payload = JSON.parse(String(vi.mocked(runtime.log).mock.calls[0]?.[0])) as {

156+

const payload = JSON.parse(String(vi.mocked(runtime.log).mock.calls.at(0)?.[0])) as {

155157

mode: string;

156158

maintenance: { taskFlows: { pruned: number } };

157159

auditBefore: {

@@ -258,7 +260,7 @@ describe("tasks commands", () => {

258260

const runtime = createRuntime();

259261

await tasksMaintenanceCommand({ json: true, apply: true }, runtime);

260262
261-

const payload = JSON.parse(String(vi.mocked(runtime.log).mock.calls[0]?.[0])) as {

263+

const payload = JSON.parse(String(vi.mocked(runtime.log).mock.calls.at(0)?.[0])) as {

262264

maintenance: {

263265

sessions: {

264266

pruned: number;

Original file line numberDiff line numberDiff line change

@@ -135,7 +135,7 @@ describe("runBootOnce", () => {

135135

});

136136
137137

expect(agentCommand).toHaveBeenCalledTimes(1);

138-

const call = agentCommand.mock.calls[0]?.[0];

138+

const call = agentCommand.mock.calls.at(0)?.[0];

139139

expect(call?.deliver).toBe(false);

140140

expect(call?.sessionKey).toBe(resolveMainSessionKey({}));

141141

expect(call?.message).toContain("BOOT.md:");

@@ -165,7 +165,7 @@ describe("runBootOnce", () => {

165165

});

166166
167167

expect(agentCommand).toHaveBeenCalledTimes(1);

168-

const perAgentCall = agentCommand.mock.calls[0]?.[0];

168+

const perAgentCall = agentCommand.mock.calls.at(0)?.[0];

169169

expect(perAgentCall?.sessionKey).toBe(resolveAgentMainSessionKey({ cfg, agentId }));

170170

});

171171

});

@@ -180,7 +180,7 @@ describe("runBootOnce", () => {

180180

});

181181
182182

expect(agentCommand).toHaveBeenCalledTimes(1);

183-

const call = agentCommand.mock.calls[0]?.[0];

183+

const call = agentCommand.mock.calls.at(0)?.[0];

184184
185185

// Verify a boot-style session ID was generated (format: boot-YYYY-MM-DD_HH-MM-SS-xxx-xxxxxxxx)

186186

expect(call?.sessionId).toMatch(

@@ -209,7 +209,7 @@ describe("runBootOnce", () => {

209209

});

210210
211211

expect(agentCommand).toHaveBeenCalledTimes(1);

212-

const call = agentCommand.mock.calls[0]?.[0];

212+

const call = agentCommand.mock.calls.at(0)?.[0];

213213
214214

expect(call?.sessionId).not.toBe(existingSessionId);

215215

expect(call?.sessionId).toMatch(

Original file line numberDiff line numberDiff line change

@@ -198,7 +198,7 @@ function expectSecurityConnectError(

198198

onConnectError: ReturnType<typeof vi.fn>,

199199

params?: { expectTailscaleHint?: boolean },

200200

) {

201-

const error = onConnectError.mock.calls[0]?.[0] as Error;

201+

const error = onConnectError.mock.calls.at(0)?.[0] as Error;

202202

expect(error.message).toContain("SECURITY ERROR");

203203

expect(error.message).toContain("openclaw doctor --fix");

204204

if (params?.expectTailscaleHint) {

@@ -905,7 +905,7 @@ describe("GatewayClient connect auth payload", () => {

905905

client.stop();

906906
907907

await vi.waitFor(() => {

908-

const error = onConnectError.mock.calls[0]?.[0] as Error | undefined;

908+

const error = onConnectError.mock.calls.at(0)?.[0] as Error | undefined;

909909

expect(error?.message).toBe("gateway client stopped");

910910

});

911911

expect(logDebugMock).toHaveBeenCalledWith(

@@ -1018,7 +1018,7 @@ describe("GatewayClient connect auth payload", () => {

10181018

emitConnectChallenge(ws);

10191019
10201020

const loadTokenParams = expectRecordFields(

1021-

loadDeviceAuthTokenMock.mock.calls[0]?.[0],

1021+

loadDeviceAuthTokenMock.mock.calls.at(0)?.[0],

10221022

{

10231023

role: "operator",

10241024

env,

@@ -1196,7 +1196,7 @@ describe("GatewayClient connect auth payload", () => {

11961196

failureDetails: { code: "AUTH_DEVICE_TOKEN_MISMATCH" },

11971197

});

11981198

const clearTokenParams = expectRecordFields(

1199-

clearDeviceAuthTokenMock.mock.calls[0]?.[0],

1199+

clearDeviceAuthTokenMock.mock.calls.at(0)?.[0],

12001200

{ role: "operator" },

12011201

"clear device token params",

12021202

);

Original file line numberDiff line numberDiff line change

@@ -634,7 +634,7 @@ type ReloaderHarness = ReturnType<typeof createReloaderHarness>;

634634
635635

function getOnlyRestartCall(harness: ReloaderHarness): [GatewayReloadPlan, OpenClawConfig] {

636636

expect(harness.onRestart).toHaveBeenCalledTimes(1);

637-

const call = harness.onRestart.mock.calls[0];

637+

const call = harness.onRestart.mock.calls.at(0);

638638

if (!call) {

639639

throw new Error("expected one restart call");

640640

}

@@ -643,7 +643,7 @@ function getOnlyRestartCall(harness: ReloaderHarness): [GatewayReloadPlan, OpenC

643643
644644

function getOnlyHotReloadCall(harness: ReloaderHarness): [GatewayReloadPlan, OpenClawConfig] {

645645

expect(harness.onHotReload).toHaveBeenCalledTimes(1);

646-

const call = harness.onHotReload.mock.calls[0];

646+

const call = harness.onHotReload.mock.calls.at(0);

647647

if (!call) {

648648

throw new Error("expected one hot reload call");

649649

}

@@ -958,7 +958,7 @@ describe("startGatewayConfigReloader", () => {

958958
959959

expect(readSnapshot).toHaveBeenCalledTimes(1);

960960

expect(harness.onHotReload).toHaveBeenCalledTimes(1);

961-

const [promotedSnapshot, promotionReason] = promoteSnapshot.mock.calls[0] ?? [];

961+

const [promotedSnapshot, promotionReason] = promoteSnapshot.mock.calls.at(0) ?? [];

962962

expect(promotedSnapshot?.hash).toBe("internal-1");

963963

expect(promotionReason).toBe("in-process-write");

964964

@@ -997,7 +997,7 @@ describe("startGatewayConfigReloader", () => {

997997

expect(harness.log.info).toHaveBeenCalledWith(

998998

"config reload skipped by writer intent (caller handles follow-up)",

999999

);

1000-

const [promotedSnapshot, promotionReason] = promoteSnapshot.mock.calls[0] ?? [];

1000+

const [promotedSnapshot, promotionReason] = promoteSnapshot.mock.calls.at(0) ?? [];

10011001

expect(promotedSnapshot?.hash).toBe("internal-none");

10021002

expect(promotionReason).toBe("in-process-write");

10031003
Original file line numberDiff line numberDiff line change

@@ -233,7 +233,7 @@ describe("update.run timeout normalization", () => {

233233

await invokeUpdateRun({ timeoutMs: 1 });

234234
235235

expect(runGatewayUpdateMock).toHaveBeenCalledTimes(1);

236-

const updateCall = runGatewayUpdateMock.mock.calls[0] as unknown as

236+

const updateCall = runGatewayUpdateMock.mock.calls.at(0) as unknown as

237237

| [{ timeoutMs?: number }]

238238

| undefined;

239239

const updateParams = updateCall?.[0];

@@ -328,7 +328,7 @@ describe("update.run restart scheduling", () => {

328328
329329

expect(runGatewayUpdateMock).toHaveBeenCalledTimes(1);

330330

expect(scheduleGatewaySigusr1RestartMock).toHaveBeenCalledTimes(1);

331-

const restartCall = scheduleGatewaySigusr1RestartMock.mock.calls[0] as unknown as

331+

const restartCall = scheduleGatewaySigusr1RestartMock.mock.calls.at(0) as unknown as

332332

| [{ delayMs?: number; reason?: string; skipCooldown?: boolean; skipDeferral?: boolean }]

333333

| undefined;

334334

const restartParams = restartCall?.[0];

@@ -385,10 +385,10 @@ describe("update.status", () => {

385385

} as never);

386386
387387

expect(respond).toHaveBeenCalledTimes(1);

388-

const response = respond.mock.calls[0]?.[1] as

388+

const response = respond.mock.calls.at(0)?.[1] as

389389

| { sentinel?: { kind?: string; status?: string } }

390390

| undefined;

391-

expect(respond.mock.calls[0]?.[0]).toBe(true);

391+

expect(respond.mock.calls.at(0)?.[0]).toBe(true);

392392

expect(response?.sentinel?.kind).toBe("update");

393393

expect(response?.sentinel?.status).toBe("ok");

394394

});