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

推荐订阅源

F
Full Disclosure
Recorded Future
Recorded Future
T
Tenable Blog
S
Securelist
C
CERT Recently Published Vulnerability Notes
T
Threatpost
S
Schneier on Security
A
Arctic Wolf
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Register - Security
The Register - Security
Cisco Talos Blog
Cisco Talos Blog
AWS News Blog
AWS News Blog
K
Kaspersky official blog
T
True Tiger Recordings
T
Threat Research - Cisco Blogs
V
Vulnerabilities – Threatpost
P
Palo Alto Networks Blog
T
The Exploit Database - CXSecurity.com
小众软件
小众软件
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog
Cyberwarzone
Cyberwarzone
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tor Project blog
Spread Privacy
Spread Privacy
Malwarebytes
Malwarebytes
P
Proofpoint News Feed
F
Fox-IT International blog
F
Fortinet All Blogs
P
Privacy & Cybersecurity Law Blog
G
GRAHAM CLULEY
量子位
Latest news
Latest news
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
Project Zero
Project Zero
T
Tailwind CSS Blog
N
Netflix TechBlog - Medium
Martin Fowler
Martin Fowler
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
I
Intezer
博客园_首页
腾讯CDC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
Darknet – Hacking Tools, Hacker News & Cyber Security

Recent Commits to openclaw:main

test(e2e): preserve macos smoke entrypoint path · openclaw/openclaw@5eba765 fix(test): await mcp timeout cleanup · openclaw/openclaw@109ba23 fix(test): harden mcp channel ws timeout · openclaw/openclaw@a4a75a8 fix(test): harden gateway network ws timeout · openclaw/openclaw@e50b20f fix(agents/harness): validate forced plugin harness support before pi… · openclaw/openclaw@730ac1a fix(test): bound codex media path log polling · openclaw/openclaw@40a2600 test: align extension inbound context assertions · openclaw/openclaw@98c0ad8 fix(install): skip Homebrew until macOS packages need it · openclaw/openclaw@527b7c2 fix(ci): bound additional boundary checks · openclaw/openclaw@351aac9 fix(release): reject empty beta smoke runs · openclaw/openclaw@4dfc2cf fix(docker): skip declarations in runtime packages · openclaw/openclaw@cc662ba fix(package): omit unpacked test helpers from inventory · openclaw/openclaw@6c42fea fix(crabbox): reinitialize invalid changed-gate git dirs · openclaw/openclaw@ecdc925 fix(lint): shard core lint checks · openclaw/openclaw@1ba4448 fix(lint): cap oxlint helper memory locally · openclaw/openclaw@8caa44f fix(lint): split source lint shards · openclaw/openclaw@158bc69 fix(crabbox): full-sync local sparse container runs · openclaw/openclaw@b3e3b1b fix(test): enable live cache script gates · openclaw/openclaw@72c6813 fix(test): reject unknown live media providers · openclaw/openclaw@51dd548 fix(cli): reject loose model and gateway numeric options · openclaw/openclaw@6b391ef refactor: centralize inbound supplemental context · openclaw/openclaw@1507a97 fix(test): reject empty gateway cpu runs · openclaw/openclaw@ad3d197 fix(test): fail empty plugin gauntlet runs · openclaw/openclaw@b460ee4 fix: load Claude CLI OAuth for PI auth profiles (#87167) · openclaw/openclaw@cc704ca fix(agents): ignore failed subagent placeholders fix(agents): report approval resolutions in bridge mode · openclaw/openclaw@88bbc5b fix(qa): keep fallback delivery on latest targets fix(agents): preserve bridge hook context · openclaw/openclaw@2c3190d fix(qa): close remaining mock qa e2e regressions · openclaw/openclaw@14198a1 fix(qa): isolate mock bridge hook state · openclaw/openclaw@35248be fix(qa): stabilize mock QA scenario contracts · openclaw/openclaw@81c1892 fix(agents): classify direct fallback targets by channel grammar · openclaw/openclaw@79f7b93 fix(qa): scope mock image prompts to latest turn · openclaw/openclaw@c2d059d fix(agents): suppress Write/Edit failed warning on response-timeout f… · openclaw/openclaw@7e702bb fix(cron): surface classified run failure causes · openclaw/openclaw@3104f36 fix(test): fail empty extension test requests · openclaw/openclaw@57b1c0b fix(cli): reject loose numeric options · openclaw/openclaw@c95d348 docs(providers/openai): clarify OpenAI Realtime Platform credits · openclaw/openclaw@717003a fix(codex): keep attempt watchdog for queued terminal turns · openclaw/openclaw@ca990f2 fix(qqbot): gate fallback approval buttons (#87154) · openclaw/openclaw@08a73db fix(test): fail explicit empty vitest runs · openclaw/openclaw@7615c31 ci: fall back from stale workflow dispatch refs · openclaw/openclaw@8d99037 fix(lint): serialize oxlint shards on constrained hosts · openclaw/openclaw@c93b7d8 fix: reject partial numeric CLI options fix(agents): avoid duplicate Claude CLI skill prompts · openclaw/openclaw@f4e20f8 test: harden e2e instance package fixture fix(codex): preserve raw reasoning source-reply guard · openclaw/openclaw@284098d test(codex): verify completion idle watch arms after non-assistant ra… · openclaw/openclaw@4d6bcf9 fix(codex): keep raw assistant release path intact · openclaw/openclaw@4314ead test(codex): mirror raw reasoning event order · openclaw/openclaw@e718d47 fix(codex): arm completion idle watch after rawResponseItem/completed… · openclaw/openclaw@a36c82b fix(node-host): restart stale node host on version mismatch · openclaw/openclaw@819fd9f fix(e2e): bound tool search gateway proof · openclaw/openclaw@761c802 fix(discord): harden requester checks for guild actions · openclaw/openclaw@9ed1b02 fix: let skills JSON output flush naturally · openclaw/openclaw@84b1123 fix: support plugin generated help targets · openclaw/openclaw@ec377dd fix: route generated help targets to subcommands · openclaw/openclaw@1de9848 fix: validate gateway call timeouts · openclaw/openclaw@f407e4e fix: mark plugin command groups in root help · openclaw/openclaw@482018e fix: route nested root help targets · openclaw/openclaw@2bbef6c fix: keep root help plugin descriptor loading quiet · openclaw/openclaw@ef2ebee fix: preserve root options in generated help · openclaw/openclaw@b31c9e9 fix: route root help targets to command help · openclaw/openclaw@5f6293a fix: normalize generated help self-help · openclaw/openclaw@9015d0c perf(secrets): propagate snapshots and eliminate esm side-effects in … test: stabilize main ci lanes · openclaw/openclaw@f327df8 perf(gateway): keep agent session working store active-only · openclaw/openclaw@54eca3f test(e2e): harden shell helper env assertions · openclaw/openclaw@e6937f9 fix(doctor): warn on unsupported active tool schemas · openclaw/openclaw@4976851 test: fix main ci expectations · openclaw/openclaw@3684696 fix(e2e): bound Telegram credential setup · openclaw/openclaw@9b28603 perf(gateway): borrow agent session lookup safely · openclaw/openclaw@3b9fa16 fix(crabbox): prefer Azure for Windows targets (#87186) · openclaw/openclaw@6afe3e8 test(e2e): isolate shell helper env · openclaw/openclaw@b28f9e0 fix(e2e): bound MCP channel connect · openclaw/openclaw@aa40174 perf(gateway): borrow read-only session metadata · openclaw/openclaw@8c8162f fix(gateway): persist model auth profile suffixes · openclaw/openclaw@152f68d fix(googlechat): suppress thread sends in DMs · openclaw/openclaw@da822dd Fix embedded session file ownership race (#87159) · openclaw/openclaw@3349fe2 ci(ui): refresh raw copy baseline · openclaw/openclaw@ebe09be fix(pi-embedded): route Codex OAuth compaction through OpenAI-Codex · openclaw/openclaw@1710dac fix(commands): enforce /allowlist configWrites origin policy · openclaw/openclaw@ce64d74 fix(plugin-sdk): stop exporting vitest test helpers (#87120) · openclaw/openclaw@780bc79 perf(gateway): borrow session reads on turn hot paths · openclaw/openclaw@9c2a6a8 fix(reply): keep visible turn admission unbounded (#87044) · openclaw/openclaw@455d5e8 fix(e2e): bound Telegram proof Bot API calls · openclaw/openclaw@4b40197 fix(agents): quarantine unsupported tool schemas · openclaw/openclaw@8c644ee test(core): isolate provider and approval tests · openclaw/openclaw@e7214ef fix(agents): preserve sessions fallback errors · openclaw/openclaw@7986917 fix(prompt): route untrusted group prompts outside system prompt [AI]… · openclaw/openclaw@2c88547 feat: expose plugin approval action metadata · openclaw/openclaw@0c867ee docs(changelog): refresh 2026.5.26 notes · openclaw/openclaw@e74a039 fix: bind plugin command llm auth to host agent · openclaw/openclaw@b9f6abf fix(e2e): bound kitchen sink RPC probes · openclaw/openclaw@96bd939 ci: support native Windows Crabbox daemon hydration (#87175) · openclaw/openclaw@95c8fc9 fix: handle sessions_send active fallback failures (#86638) · openclaw/openclaw@81e7e8e fix(gateway): enable default auth rate limiting (#87148) · openclaw/openclaw@ae972fe test(media): isolate generation provider registry mocks (#87173) · openclaw/openclaw@9772cf2 perf(gateway): skip lifecycle session cache clone · openclaw/openclaw@0762aca fix(e2e): backstop Parallels update jobs · openclaw/openclaw@fdf58c1
fix(build): cap tsdown heap in containers · openclaw/openclaw@e8dde30
vincentkoc · 2026-05-27 · via Recent Commits to openclaw:main

@@ -20,8 +20,14 @@ const DEPENDENCY_PATH_MARKERS = ["node_modules/", "openclaw-pnpm-node-modules/"]

2020

const HASHED_ROOT_JS_RE = /^(?<base>.+)-[A-Za-z0-9_-]+\.js$/u;

2121

const DEFAULT_CAPTURE_BYTES = 8 * 1024 * 1024;

2222

const DEFAULT_HEARTBEAT_MS = 30_000;

23-

const DEFAULT_TSDOWN_NODE_OPTIONS = "--max-old-space-size=8192";

2423

const DEFAULT_TSDOWN_MAX_OLD_SPACE_MB = 8192;

24+

const MIN_TSDOWN_MAX_OLD_SPACE_MB = 2048;

25+

const TSDOWN_CGROUP_MEMORY_HEADROOM_MB = 768;

26+

const CGROUP_MEMORY_LIMIT_PATHS = [

27+

"/sys/fs/cgroup/memory.max",

28+

"/sys/fs/cgroup/memory/memory.limit_in_bytes",

29+

];

30+

const PROC_MEMINFO_PATH = "/proc/meminfo";

2531

const TERMINATION_GRACE_MS = 5_000;

2632

const TSDOWN_OUTPUT_ROOTS = ["dist", "dist-runtime"];

2733

const GENERATED_SOURCE_DECLARATION_PATHSPEC = ":(glob)extensions/**/*.d.ts";

@@ -202,7 +208,100 @@ function parseNonNegativeInteger(value) {

202208

return Math.trunc(parsed);

203209

}

204210205-

function normalizeTsdownNodeOptions(nodeOptions) {

211+

function parseCgroupMemoryLimitBytes(value) {

212+

if (typeof value !== "string") {

213+

return null;

214+

}

215+

const trimmed = value.trim();

216+

if (trimmed === "" || trimmed === "max" || !/^\d+$/u.test(trimmed)) {

217+

return null;

218+

}

219+

const parsed = BigInt(trimmed);

220+

if (parsed <= 0n || parsed > BigInt(Number.MAX_SAFE_INTEGER)) {

221+

return null;

222+

}

223+

return Number(parsed);

224+

}

225+226+

function readCgroupMemoryLimitBytes(params = {}) {

227+

if (Number.isFinite(params.cgroupMemoryLimitBytes) && params.cgroupMemoryLimitBytes > 0) {

228+

return Math.trunc(params.cgroupMemoryLimitBytes);

229+

}

230+231+

const fsImpl = params.fs ?? fs;

232+

const paths = params.cgroupMemoryLimitPaths ?? CGROUP_MEMORY_LIMIT_PATHS;

233+

for (const limitPath of paths) {

234+

try {

235+

const limitBytes = parseCgroupMemoryLimitBytes(fsImpl.readFileSync(limitPath, "utf8"));

236+

if (limitBytes !== null) {

237+

return limitBytes;

238+

}

239+

} catch {

240+

// Missing cgroup files are expected outside Linux containers.

241+

}

242+

}

243+244+

return null;

245+

}

246+247+

function parseProcMemTotalBytes(value) {

248+

if (typeof value !== "string") {

249+

return null;

250+

}

251+

const match = value.match(/^MemTotal:\s+(\d+)\s+kB$/imu);

252+

if (!match) {

253+

return null;

254+

}

255+

const parsed = BigInt(match[1]) * 1024n;

256+

if (parsed <= 0n || parsed > BigInt(Number.MAX_SAFE_INTEGER)) {

257+

return null;

258+

}

259+

return Number(parsed);

260+

}

261+262+

function readProcMemTotalBytes(params = {}) {

263+

if (Number.isFinite(params.procMemTotalBytes) && params.procMemTotalBytes > 0) {

264+

return Math.trunc(params.procMemTotalBytes);

265+

}

266+267+

const fsImpl = params.fs ?? fs;

268+

try {

269+

return parseProcMemTotalBytes(

270+

fsImpl.readFileSync(params.procMeminfoPath ?? PROC_MEMINFO_PATH, "utf8"),

271+

);

272+

} catch {

273+

return null;

274+

}

275+

}

276+277+

function resolveTsdownMaxOldSpaceMb(params = {}) {

278+

const limitBytes = readCgroupMemoryLimitBytes(params) ?? readProcMemTotalBytes(params);

279+

if (limitBytes === null) {

280+

return DEFAULT_TSDOWN_MAX_OLD_SPACE_MB;

281+

}

282+283+

const limitMb = Math.floor(limitBytes / 1024 / 1024);

284+

if (limitMb <= 0) {

285+

return DEFAULT_TSDOWN_MAX_OLD_SPACE_MB;

286+

}

287+288+

const cgroupCap = Math.max(

289+

MIN_TSDOWN_MAX_OLD_SPACE_MB,

290+

limitMb - TSDOWN_CGROUP_MEMORY_HEADROOM_MB,

291+

);

292+

return Math.min(DEFAULT_TSDOWN_MAX_OLD_SPACE_MB, cgroupCap);

293+

}

294+295+

function parseMaxOldSpaceSizeMb(value, fallbackMb) {

296+

const parsed = Number(value);

297+

if (!Number.isFinite(parsed) || parsed <= 0) {

298+

return fallbackMb;

299+

}

300+

return Math.trunc(parsed);

301+

}

302+303+

function normalizeTsdownNodeOptions(nodeOptions, params = {}) {

304+

const maxOldSpaceMb = resolveTsdownMaxOldSpaceMb(params);

206305

const parts = nodeOptions.trim().split(/\s+/u).filter(Boolean);

207306

const normalized = [];

208307

let foundMaxOldSpaceSize = false;

@@ -212,18 +311,15 @@ function normalizeTsdownNodeOptions(nodeOptions) {

212311

const inlineMatch = part.match(/^--max-old-space-size=(\d+)$/u);

213312

if (inlineMatch) {

214313

foundMaxOldSpaceSize = true;

215-

const value = Math.max(Number(inlineMatch[1]), DEFAULT_TSDOWN_MAX_OLD_SPACE_MB);

314+

const value = Math.min(parseMaxOldSpaceSizeMb(inlineMatch[1], maxOldSpaceMb), maxOldSpaceMb);

216315

normalized.push(`--max-old-space-size=${value}`);

217316

continue;

218317

}

219318220319

if (part === "--max-old-space-size") {

221320

foundMaxOldSpaceSize = true;

222321

const next = parts[index + 1];

223-

const parsed = next === undefined ? Number.NaN : Number(next);

224-

const value = Number.isFinite(parsed)

225-

? Math.max(Math.trunc(parsed), DEFAULT_TSDOWN_MAX_OLD_SPACE_MB)

226-

: DEFAULT_TSDOWN_MAX_OLD_SPACE_MB;

322+

const value = Math.min(parseMaxOldSpaceSizeMb(next, maxOldSpaceMb), maxOldSpaceMb);

227323

normalized.push(`--max-old-space-size=${value}`);

228324

if (next !== undefined) {

229325

index += 1;

@@ -235,17 +331,17 @@ function normalizeTsdownNodeOptions(nodeOptions) {

235331

}

236332237333

if (!foundMaxOldSpaceSize) {

238-

normalized.push(DEFAULT_TSDOWN_NODE_OPTIONS);

334+

normalized.push(`--max-old-space-size=${maxOldSpaceMb}`);

239335

}

240336241337

return normalized.join(" ");

242338

}

243339244-

function resolveTsdownEnv(env) {

340+

function resolveTsdownEnv(env, params = {}) {

245341

const nodeOptions = env.NODE_OPTIONS?.trim() ?? "";

246342

return {

247343

...env,

248-

NODE_OPTIONS: normalizeTsdownNodeOptions(nodeOptions),

344+

NODE_OPTIONS: normalizeTsdownNodeOptions(nodeOptions, params),

249345

};

250346

}

251347

@@ -292,7 +388,7 @@ export function createTsdownOutputScanner(params = {}) {

292388

}

293389294390

export function resolveTsdownBuildInvocation(params = {}) {

295-

const env = resolveTsdownEnv(params.env ?? process.env);

391+

const env = resolveTsdownEnv(params.env ?? process.env, params);

296392

const tsdownArgs = [

297393

"--config-loader",

298394

"unrun",