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

推荐订阅源

Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
D
DataBreaches.Net
罗磊的独立博客
博客园 - 司徒正美
Last Week in AI
Last Week in AI
The Cloudflare Blog
大猫的无限游戏
大猫的无限游戏
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog RSS Feed
The GitHub Blog
The GitHub Blog
宝玉的分享
宝玉的分享
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
小众软件
小众软件
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hugging Face - Blog
Hugging Face - Blog
B
Blog
博客园 - 【当耐特】
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell

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): reject loose memory fd limits · openclaw/op...
vincentkoc · 2026-05-29 · via Recent Commits to openclaw:main

@@ -60,34 +60,48 @@ Options:

6060

`.trim();

6161

}

626263-

function readNumber(value, label) {

64-

const parsed = Number(value);

65-

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

66-

throw new Error(`${label} must be a non-negative number`);

63+

const NON_NEGATIVE_INTEGER_PATTERN = /^(0|[1-9]\d*)$/u;

64+65+

export function readNumber(value, label) {

66+

const raw = String(value).trim();

67+

if (!NON_NEGATIVE_INTEGER_PATTERN.test(raw)) {

68+

throw new Error(`${label} must be a non-negative integer`);

69+

}

70+

const parsed = Number(raw);

71+

if (!Number.isSafeInteger(parsed)) {

72+

throw new Error(`${label} must be a safe integer`);

6773

}

68-

return Math.floor(parsed);

74+

return parsed;

6975

}

707671-

function readPositiveNumber(value, label) {

77+

export function readPositiveNumber(value, label) {

7278

const parsed = readNumber(value, label);

7379

if (parsed <= 0) {

7480

throw new Error(`${label} must be greater than 0`);

7581

}

7682

return parsed;

7783

}

788479-

function parseArgs(argv) {

85+

function readNumberEnv(name, fallback) {

86+

const raw = process.env[name];

87+

return raw == null || raw.trim() === "" ? fallback : readNumber(raw, name);

88+

}

89+90+

function readPositiveNumberEnv(name, fallback) {

91+

const raw = process.env[name];

92+

return raw == null || raw.trim() === "" ? fallback : readPositiveNumber(raw, name);

93+

}

94+95+

export function parseArgs(argv) {

8096

const stamp = new Date().toISOString().replace(/[:.]/g, "-");

8197

const options = {

82-

fileCount: Number(process.env.OPENCLAW_MEMORY_FD_REPRO_FILES || DEFAULT_FILE_COUNT),

98+

fileCount: undefined,

8399

mode: process.env.OPENCLAW_MEMORY_FD_REPRO_MODE || "fixed",

84-

maxWorkspaceRegFds: Number(

85-

process.env.OPENCLAW_MEMORY_FD_REPRO_MAX_WORKSPACE_REG_FDS || DEFAULT_MAX_WORKSPACE_REG_FDS,

86-

),

100+

maxWorkspaceRegFds: undefined,

87101

minLeakedFds: undefined,

88-

invokeTimeoutMs: Number(process.env.OPENCLAW_MEMORY_FD_REPRO_TIMEOUT_MS || 30_000),

89-

sampleDelayMs: Number(process.env.OPENCLAW_MEMORY_FD_REPRO_SAMPLE_DELAY_MS || 1_000),

90-

settleDelayMs: Number(process.env.OPENCLAW_MEMORY_FD_REPRO_SETTLE_DELAY_MS || 5_000),

102+

invokeTimeoutMs: undefined,

103+

sampleDelayMs: undefined,

104+

settleDelayMs: undefined,

91105

outputDir: path.resolve(".artifacts", "memory-fd-repro", stamp),

92106

keep: process.env.OPENCLAW_MEMORY_FD_REPRO_KEEP === "1",

93107

allowNonDarwin: process.env.OPENCLAW_MEMORY_FD_REPRO_ALLOW_NON_DARWIN === "1",

@@ -157,6 +171,14 @@ function parseArgs(argv) {

157171

if (!["fixed", "leak", "report"].includes(options.mode)) {

158172

throw new Error('--mode must be "fixed", "leak", or "report"');

159173

}

174+

options.fileCount ??= readPositiveNumberEnv("OPENCLAW_MEMORY_FD_REPRO_FILES", DEFAULT_FILE_COUNT);

175+

options.maxWorkspaceRegFds ??= readNumberEnv(

176+

"OPENCLAW_MEMORY_FD_REPRO_MAX_WORKSPACE_REG_FDS",

177+

DEFAULT_MAX_WORKSPACE_REG_FDS,

178+

);

179+

options.invokeTimeoutMs ??= readPositiveNumberEnv("OPENCLAW_MEMORY_FD_REPRO_TIMEOUT_MS", 30_000);

180+

options.sampleDelayMs ??= readNumberEnv("OPENCLAW_MEMORY_FD_REPRO_SAMPLE_DELAY_MS", 1_000);

181+

options.settleDelayMs ??= readNumberEnv("OPENCLAW_MEMORY_FD_REPRO_SETTLE_DELAY_MS", 5_000);

160182

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

161183

throw new Error("file count must be greater than 0");

162184

}