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

推荐订阅源

WordPress大学
WordPress大学
Vercel News
Vercel News
博客园_首页
Y
Y Combinator Blog
美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
阮一峰的网络日志
阮一峰的网络日志
aimingoo的专栏
aimingoo的专栏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MyScale Blog
MyScale Blog
GbyAI
GbyAI
人人都是产品经理
人人都是产品经理
T
Tailwind CSS Blog
MongoDB | Blog
MongoDB | Blog
D
DataBreaches.Net
博客园 - Franky
Engineering at Meta
Engineering at Meta
量子位
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
N
Netflix TechBlog - Medium

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: respect root options in startup guards (#86927) · op...
steipete · 2026-05-27 · via Recent Commits to openclaw:main

@@ -14,10 +14,10 @@ if (!isLinux && !isMac) {

1414

}

15151616

const repoRoot = process.cwd();

17-

const tmpHome = mkdtempSync(path.join(os.tmpdir(), "openclaw-startup-memory-"));

1817

const tmpDir = process.env.TMPDIR || process.env.TEMP || process.env.TMP || os.tmpdir();

19-

const rssHookPath = path.join(tmpHome, "measure-rss.mjs");

2018

const MAX_RSS_MARKER = "__OPENCLAW_MAX_RSS_KB__=";

19+

let tmpHome = null;

20+

let rssHookPath = null;

21212222

function parseArgs(argv) {

2323

const options = {

@@ -59,18 +59,6 @@ function parseArgs(argv) {

5959

return options;

6060

}

616162-

writeFileSync(

63-

rssHookPath,

64-

[

65-

"process.on('exit', () => {",

66-

" const usage = typeof process.resourceUsage === 'function' ? process.resourceUsage() : null;",

67-

` if (usage && typeof usage.maxRSS === 'number') console.error('${MAX_RSS_MARKER}' + String(usage.maxRSS));`,

68-

"});",

69-

"",

70-

].join("\n"),

71-

"utf8",

72-

);

73-7462

const DEFAULT_LIMITS_MB = {

7563

help: 100,

7664

statusJson: 400,

@@ -146,6 +134,9 @@ function formatCaseCommand(testCase) {

146134

}

147135148136

function buildBenchEnv() {

137+

if (!tmpHome) {

138+

throw new Error("temporary home is not initialized");

139+

}

149140

const env = {

150141

HOME: tmpHome,

151142

USERPROFILE: tmpHome,

@@ -181,6 +172,9 @@ function buildBenchEnv() {

181172

}

182173183174

function runCase(testCase) {

175+

if (!rssHookPath) {

176+

throw new Error("RSS hook path is not initialized");

177+

}

184178

const env = buildBenchEnv();

185179

const result = spawnSync(process.execPath, ["--import", rssHookPath, ...testCase.args], {

186180

cwd: repoRoot,

@@ -278,14 +272,29 @@ function writeReport(options, results) {

278272

}

279273280274

const options = parseArgs(process.argv.slice(2));

275+

tmpHome = mkdtempSync(path.join(os.tmpdir(), "openclaw-startup-memory-"));

276+

rssHookPath = path.join(tmpHome, "measure-rss.mjs");

277+

writeFileSync(

278+

rssHookPath,

279+

[

280+

"process.on('exit', () => {",

281+

" const usage = typeof process.resourceUsage === 'function' ? process.resourceUsage() : null;",

282+

` if (usage && typeof usage.maxRSS === 'number') console.error('${MAX_RSS_MARKER}' + String(usage.maxRSS));`,

283+

"});",

284+

"",

285+

].join("\n"),

286+

"utf8",

287+

);

281288

const results = [];

282289

try {

283290

for (const testCase of cases) {

284291

results.push(runCase(testCase));

285292

}

286293

} finally {

287294

writeReport(options, results);

288-

rmSync(tmpHome, { recursive: true, force: true });

295+

if (tmpHome) {

296+

rmSync(tmpHome, { recursive: true, force: true });

297+

}

289298

}

290299291300

const failure = results.find((result) => result.status !== "pass");