慣性聚合 高效追讀感興趣之博客、新聞、科技資訊
閱原文 以慣性聚合開啟

推薦訂閱源

The GitHub Blog
The GitHub Blog
T
ThreatConnect
C
Check Point Blog
T
The Exploit Database - CXSecurity.com
U
Unit 42
云风的 BLOG
云风的 BLOG
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tenable Blog
博客园 - 叶小钗
D
Docker
T
Threatpost
WordPress大学
WordPress大学
腾讯CDC
I
Intezer
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Hugging Face - Blog
Hugging Face - Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Register - Security
The Register - Security
Stack Overflow Blog
Stack Overflow Blog
PCI Perspectives
PCI Perspectives
S
Security Archives - TechRepublic
Simon Willison's Weblog
Simon Willison's Weblog
A
Arctic Wolf
MongoDB | Blog
MongoDB | Blog
小众软件
小众软件
Hacker News: Ask HN
Hacker News: Ask HN
O
OpenAI News
博客园 - 【当耐特】
L
LINUX DO - 最新话题
C
Comments on: Blog
S
Securelist
月光博客
月光博客
S
Secure Thoughts
Security Latest
Security Latest
MyScale Blog
MyScale Blog
NISL@THU
NISL@THU
F
Full Disclosure
M
Microsoft Research Blog - Microsoft Research
T
True Tiger Recordings
SecWiki News
SecWiki News
aimingoo的专栏
aimingoo的专栏
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LINUX DO - 热门话题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
AWS News Blog
AWS News Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
L
Lohrmann on Cybersecurity
H
Help Net Security

Recent Commits to openclaw:main

Deprecate memory-specific embedding provider registration (#85072) · openclaw/openclaw@c9d4f7e fix(ci): bound real behavior proof API waits · openclaw/openclaw@4a8d89f fix(gateway): reject no-auth tailscale exposure · openclaw/openclaw@dc5954b fix(agents): avoid false Codex runtime live switches perf(gateway): trust current metadata lifecycle cache chore(release): update appcast for 2026.5.26 · openclaw/openclaw@c95b51f refactor: move channel message sdk compat into core · openclaw/openclaw@8e5183c ci(release): accept main full-validation proof · openclaw/openclaw@1e67af7 ci(release): harden postpublish verification · openclaw/openclaw@ef17bba fix(dev): bound issue labeler OpenAI waits fix(openai): normalize responses replay tool ids fix(status): keep default status fast path bounded · openclaw/openclaw@7121f67 feat(embeddings): add OpenAI-compatible core provider (#85269) · openclaw/openclaw@4d89e00 Make Telegram sendMessage actions durable (#87261) · openclaw/openclaw@f3fe48e fix(dev): bound gh-read API waits · openclaw/openclaw@5fb57b5 fix(vllm): wire configured thinking params · openclaw/openclaw@e153ece fix(agents): separate heartbeat runtime template (#85416) · openclaw/openclaw@75221e0 fix(agents): honor OpenAI-compatible cache retention · openclaw/openclaw@3e351b7 fix: require admin for node device approvals · openclaw/openclaw@517ce3d fix(qa): create Matrix mention progress target · openclaw/openclaw@983759b fix(dev): bound Claude usage debug fetches · openclaw/openclaw@d09eb43 fix(cli): validate message numeric options · openclaw/openclaw@5fdaf6b perf(gateway): cache current plugin metadata fingerprints · openclaw/openclaw@7efbaf7 fix(dev): bound realtime smoke HTTP waits · openclaw/openclaw@e2cebe8 fix(qa): accept Matrix tool error final races · openclaw/openclaw@a275ce8 fix(qa): cap Matrix readiness polling · openclaw/openclaw@099b0f8 fix(cli): reject loose webhook and directory numeric options · openclaw/openclaw@0889106 fix(cli): validate directory limits before resolution · openclaw/openclaw@513a223 fix(agents): keep runtime context before active user turns · openclaw/openclaw@0503853 fix(qa): stop Matrix phases after run timeout · openclaw/openclaw@f4b9d24 fix(agents): strip stale Anthropic thinking · openclaw/openclaw@66965f5 fix(doctor): validate bundled MCP tool schemas · openclaw/openclaw@a02fe52 fix(qa): kill timed out Matrix CLI runs · openclaw/openclaw@b8fc2f6 fix(dev): bound discord smoke waits · openclaw/openclaw@545ad7f feat(pixverse): add api region selection · openclaw/openclaw@b3083de chore(pixverse): publish as external plugin · openclaw/openclaw@5366209 feat(pixverse): add video generation provider · openclaw/openclaw@c183705 fix(qa): tolerate fast Matrix tool replies · openclaw/openclaw@a46e839 refactor: remove channel turn runtime aliases · openclaw/openclaw@6c37402 fix(test): bound qa otel receiver bodies · openclaw/openclaw@83ab0ba fix(lint): clean manifest registry installed checks · openclaw/openclaw@fd648ed fix(scripts): resolve npm package candidates through npm runner · openclaw/openclaw@7a7d9de fix(qa): hide Matrix tool progress marker in workspace · openclaw/openclaw@42f3550 fix(usage): forward cached token usage in chat completions (#82062) · openclaw/openclaw@12e5876 test(codex): align provider claim expectation · openclaw/openclaw@42387af perf(gateway): cache stable plugin index fingerprints · openclaw/openclaw@2babe03 fix(test): scan kitchen rpc readiness logs incrementally · openclaw/openclaw@1d4537a fix(test): fail startup bench on bad samples · openclaw/openclaw@8c6da93 fix(onboard): preserve agents.list and bindings on rerun · openclaw/openclaw@bbdff39 fix: send bare direct Anthropic model ids · openclaw/openclaw@aa0a290
修cli:拒形非 gateway timeouts · openclaw/openclaw@e61f175
steipete · 2026-05-27 · via Recent Commits to openclaw:main

@@ -0,0 +1,56 @@

1+

import { beforeEach, describe, expect, it, vi } from "vitest";

2+3+

const callGatewayMock = vi.fn(async () => ({ ok: true }));

4+

vi.mock("../gateway/call.js", () => ({

5+

callGateway: callGatewayMock,

6+

}));

7+8+

vi.mock("./progress.js", () => ({

9+

withProgress: async (_options: unknown, action: () => Promise<unknown>) => await action(),

10+

}));

11+12+

const { callGatewayFromCliRuntime } = await import("./gateway-rpc.runtime.js");

13+14+

describe("callGatewayFromCliRuntime", () => {

15+

beforeEach(() => {

16+

callGatewayMock.mockClear().mockResolvedValue({ ok: true });

17+

});

18+19+

it.each([

20+

["cron status", "cron.status"],

21+

["cron list", "cron.list"],

22+

["cron add", "cron.add"],

23+

["cron update", "cron.update"],

24+

["cron remove", "cron.remove"],

25+

["cron get", "cron.get"],

26+

["cron runs", "cron.runs"],

27+

["cron run", "cron.run"],

28+

["logs", "logs.tail"],

29+

["secrets reload", "secrets.reload"],

30+

])("rejects malformed shared --timeout before gateway call for %s", async (_name, method) => {

31+

await expect(callGatewayFromCliRuntime(method, { timeout: "10ms" })).rejects.toThrow(

32+

'Invalid --timeout. Use a positive millisecond value, e.g. --timeout 30000. Received: "10ms".',

33+

);

34+35+

expect(callGatewayMock).not.toHaveBeenCalled();

36+

});

37+38+

it.each(["0", "-1", "1.5"])("rejects invalid shared --timeout value %j", async (timeout) => {

39+

await expect(callGatewayFromCliRuntime("cron.status", { timeout })).rejects.toThrow(

40+

`Received: "${timeout}"`,

41+

);

42+43+

expect(callGatewayMock).not.toHaveBeenCalled();

44+

});

45+46+

it("passes strict integer timeouts to the gateway call", async () => {

47+

await callGatewayFromCliRuntime("cron.status", { timeout: "15000" });

48+49+

expect(callGatewayMock).toHaveBeenCalledWith(

50+

expect.objectContaining({

51+

method: "cron.status",

52+

timeoutMs: 15_000,

53+

}),

54+

);

55+

});

56+

});