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

推荐订阅源

M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
GbyAI
GbyAI
S
SegmentFault 最新的问题
量子位
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MyScale Blog
MyScale Blog
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
aimingoo的专栏
aimingoo的专栏
V
Visual Studio Blog
U
Unit 42
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The Cloudflare Blog
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
J
Java Code Geeks
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
IT之家
IT之家
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
雷峰网
雷峰网

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(scripts): harden kitchen sink timer proof · openclaw...
vincentkoc · 2026-06-22 · via Recent Commits to openclaw:main

@@ -175,16 +175,18 @@ describe("kitchen-sink RPC isolated state", () => {

175175

});

176176177177

it("clamps timer env values before they reach Node timers", () => {

178-

expect(readPositiveTimerMs(String(MAX_KITCHEN_SINK_TIMER_TIMEOUT_MS + 1), 60_000)).toBe(

178+

const oversizedTimerMs = String(Number.MAX_SAFE_INTEGER);

179+180+

expect(readPositiveTimerMs(oversizedTimerMs, 60_000)).toBe(

179181

MAX_KITCHEN_SINK_TIMER_TIMEOUT_MS,

180182

);

181183182184

const config = resolveKitchenSinkRpcConfig({

183-

OPENCLAW_KITCHEN_SINK_RPC_CALL_MS: String(MAX_KITCHEN_SINK_TIMER_TIMEOUT_MS + 1),

184-

OPENCLAW_KITCHEN_SINK_RPC_COMMAND_MS: String(MAX_KITCHEN_SINK_TIMER_TIMEOUT_MS + 1),

185-

OPENCLAW_KITCHEN_SINK_RPC_FETCH_MS: String(MAX_KITCHEN_SINK_TIMER_TIMEOUT_MS + 1),

186-

OPENCLAW_KITCHEN_SINK_RPC_INSTALL_MS: String(MAX_KITCHEN_SINK_TIMER_TIMEOUT_MS + 1),

187-

OPENCLAW_KITCHEN_SINK_RPC_READY_MS: String(MAX_KITCHEN_SINK_TIMER_TIMEOUT_MS + 1),

185+

OPENCLAW_KITCHEN_SINK_RPC_CALL_MS: oversizedTimerMs,

186+

OPENCLAW_KITCHEN_SINK_RPC_COMMAND_MS: oversizedTimerMs,

187+

OPENCLAW_KITCHEN_SINK_RPC_FETCH_MS: oversizedTimerMs,

188+

OPENCLAW_KITCHEN_SINK_RPC_INSTALL_MS: oversizedTimerMs,

189+

OPENCLAW_KITCHEN_SINK_RPC_READY_MS: oversizedTimerMs,

188190

});

189191190192

expect(config.rpcTimeoutMs).toBe(MAX_KITCHEN_SINK_TIMER_TIMEOUT_MS);

@@ -712,6 +714,26 @@ describe("kitchen-sink RPC command output capture", () => {

712714

expect(result.stderrTruncatedChars).toBe(3);

713715

});

714716717+

it("clamps oversized command timeout env values before scheduling timers", async () => {

718+

const previousTimeout = process.env.OPENCLAW_KITCHEN_SINK_RPC_COMMAND_MS;

719+

process.env.OPENCLAW_KITCHEN_SINK_RPC_COMMAND_MS = String(Number.MAX_SAFE_INTEGER);

720+

try {

721+

await expect(

722+

runCommand(process.execPath, [

723+

"--input-type=module",

724+

"--eval",

725+

"setTimeout(() => process.exit(0), 25);",

726+

]),

727+

).resolves.toMatchObject({ stdout: "", stderr: "" });

728+

} finally {

729+

if (previousTimeout === undefined) {

730+

delete process.env.OPENCLAW_KITCHEN_SINK_RPC_COMMAND_MS;

731+

} else {

732+

process.env.OPENCLAW_KITCHEN_SINK_RPC_COMMAND_MS = previousTimeout;

733+

}

734+

}

735+

});

736+715737

posixIt("kills timed command process groups", async () => {

716738

const root = mkdtempSync(path.join(tmpdir(), "openclaw-kitchen-rpc-timeout-"));

717739

const scriptPath = path.join(root, "trap-term.mjs");

@@ -2241,6 +2263,22 @@ describe("kitchen-sink RPC process sampling", () => {

22412263

});

22422264

});

224322652266+

it("clamps oversized HTTP probe timeouts before scheduling timers", async () => {

2267+

const fetchImpl = vi.fn(async () => {

2268+

await delay(25);

2269+

return new Response('{"status":"live"}', { status: 200 });

2270+

});

2271+2272+

await expect(

2273+

fetchJson("http://127.0.0.1:19680/healthz", {

2274+

attempts: 1,

2275+

fetchImpl,

2276+

timeoutMs: Number.MAX_SAFE_INTEGER,

2277+

}),

2278+

).resolves.toEqual({ ok: true, status: 200, body: { status: "live" } });

2279+

expect(fetchImpl).toHaveBeenCalledOnce();

2280+

});

2281+22442282

it("rejects oversized HTTP probe responses before reading declared large bodies", async () => {

22452283

let canceled = false;

22462284

const response = new Response(