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

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The GitHub Blog
The GitHub Blog
J
Java Code Geeks
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
罗磊的独立博客
MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
有赞技术团队
有赞技术团队
T
Tailwind CSS Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Vercel News
Vercel News
腾讯CDC
博客园 - 聂微东
The Cloudflare Blog
F
Fortinet All Blogs
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
Last Week in AI
Last Week in AI
B
Blog

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
fix(scripts): clamp boundary artifact timers · openclaw/o...
vincentkoc · 2026-06-22 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -18,6 +18,7 @@ const ROOT_SHIMS_MAX_OLD_SPACE_SIZE =

1818

const ROOT_SHIMS_NODE_OPTIONS =

1919

`${process.env.NODE_OPTIONS ?? ""} --max-old-space-size=${ROOT_SHIMS_MAX_OLD_SPACE_SIZE}`.trim();

2020

const NODE_STEP_ABORT_KILL_GRACE_MS = 1_000;

21+

const MAX_TIMER_TIMEOUT_MS = 2_147_000_000;

2122

const NODE_STEP_PARENT_SIGNALS = ["SIGHUP", "SIGINT", "SIGTERM"];

2223

const NODE_STEP_PARENT_SIGNAL_EXIT_CODES = new Map([

2324

["SIGHUP", 129],

@@ -469,10 +470,19 @@ function installNodeStepParentSignalForwarders() {

469470

});

470471

}

471472
473+

function resolveNodeStepTimerTimeoutMs(valueMs) {

474+

const value = Number(valueMs);

475+

if (!Number.isFinite(value)) {

476+

return MAX_TIMER_TIMEOUT_MS;

477+

}

478+

return Math.min(Math.max(Math.floor(value), 1), MAX_TIMER_TIMEOUT_MS);

479+

}

480+
472481

/**

473482

* Runs one artifact step with timeout, abort propagation, and prefixed output.

474483

*/

475484

export function runNodeStep(label, args, timeoutMs, params = {}) {

485+

const resolvedTimeoutMs = resolveNodeStepTimerTimeoutMs(timeoutMs);

476486

const abortController = params.abortController;

477487

const spawnImpl = params.spawnImpl ?? spawn;

478488

installNodeStepParentSignalForwarders();

@@ -555,8 +565,8 @@ export function runNodeStep(label, args, timeoutMs, params = {}) {

555565

stdoutWriter.flush();

556566

stderrWriter.flush();

557567

abortSiblingSteps(abortController);

558-

rejectPromise(new Error(`${label} timed out after ${timeoutMs}ms`));

559-

}, timeoutMs);

568+

rejectPromise(new Error(`${label} timed out after ${resolvedTimeoutMs}ms`));

569+

}, resolvedTimeoutMs);

560570

abortController?.signal.addEventListener("abort", abortStep, { once: true });

561571
562572

child.stdout.setEncoding("utf8");

Original file line numberDiff line numberDiff line change

@@ -7,6 +7,7 @@ import os from "node:os";

77

import path from "node:path";

88

import { setTimeout as delay } from "node:timers/promises";

99

import { pathToFileURL } from "node:url";

10+

import { MAX_TIMER_TIMEOUT_MS } from "@openclaw/normalization-core/number-coercion";

1011

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

1112

import { resolveWindowsTaskkillPath } from "../../scripts/lib/windows-taskkill.mjs";

1213

import {

@@ -317,6 +318,16 @@ describe("prepare-extension-package-boundary-artifacts", () => {

317318

expect(signals).toEqual(["SIGKILL"]);

318319

});

319320
321+

it("clamps oversized prep step timers before scheduling", async () => {

322+

await expect(

323+

runNodeStep(

324+

"slow-success",

325+

["--eval", "setTimeout(() => process.exit(0), 25);"],

326+

MAX_TIMER_TIMEOUT_MS + 1,

327+

),

328+

).resolves.toBeUndefined();

329+

});

330+
320331

it.runIf(process.platform !== "win32")("kills timed-out prep step process groups", async () => {

321332

const rootDir = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-boundary-timeout-group-"));

322333

tempRoots.add(rootDir);