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

推荐订阅源

WordPress大学
WordPress大学
L
LangChain Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
罗磊的独立博客
J
Java Code Geeks
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 叶小钗
小众软件
小众软件
博客园 - Franky
D
Docker
Google DeepMind News
Google DeepMind News
Microsoft Azure Blog
Microsoft Azure Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
U
Unit 42
宝玉的分享
宝玉的分享
C
Check Point Blog
B
Blog
V
V2EX
博客园 - 三生石上(FineUI控件)
MyScale Blog
MyScale Blog
The Cloudflare Blog
博客园 - 聂微东
博客园_首页
Engineering at Meta
Engineering at Meta

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(qa): reject loose gateway RSS samples · openclaw/open...
vincentkoc · 2026-06-17 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -899,8 +899,17 @@ function readProcessRssMb(pid: number | undefined): number | null {

899899

if (result.status !== 0) {

900900

return null;

901901

}

902-

const rssKb = Number.parseInt(result.stdout.trim(), 10);

903-

return Number.isFinite(rssKb) && rssKb > 0 ? rssKb / 1024 : null;

902+

const rssKb = parseProcessRssKb(result.stdout);

903+

return rssKb === null ? null : rssKb / 1024;

904+

}

905+
906+

function parseProcessRssKb(raw: string): number | null {

907+

const value = raw.trim();

908+

if (!/^[1-9][0-9]*$/u.test(value)) {

909+

return null;

910+

}

911+

const rssKb = Number(value);

912+

return Number.isSafeInteger(rssKb) ? rssKb : null;

904913

}

905914
906915

function readProcessFdCount(pid: number | undefined): number | null {

@@ -1783,6 +1792,7 @@ export const testing = {

17831792

parseNonNegativeInt,

17841793

parseOptions,

17851794

parsePositiveInt,

1795+

parseProcessRssKb,

17861796

resolveRestartDeadlineFailure,

17871797

resolveEntry,

17881798

resolvePhaseDeadlineAt,

Original file line numberDiff line numberDiff line change

@@ -774,8 +774,17 @@ function readProcessRssMb(pid: number | undefined): number | null {

774774

if (result.status !== 0) {

775775

return null;

776776

}

777-

const rssKb = Number.parseInt(result.stdout.trim(), 10);

778-

return Number.isFinite(rssKb) && rssKb > 0 ? rssKb / 1024 : null;

777+

const rssKb = parseProcessRssKb(result.stdout);

778+

return rssKb === null ? null : rssKb / 1024;

779+

}

780+
781+

function parseProcessRssKb(raw: string): number | null {

782+

const value = raw.trim();

783+

if (!/^[1-9][0-9]*$/u.test(value)) {

784+

return null;

785+

}

786+

const rssKb = Number(value);

787+

return Number.isSafeInteger(rssKb) ? rssKb : null;

779788

}

780789
781790

function parsePsCpuTimeMs(raw: string): number | null {

@@ -1103,6 +1112,7 @@ export const testing = {

11031112

parseOptions,

11041113

parseNonNegativeInt,

11051114

parsePositiveInt,

1115+

parseProcessRssKb,

11061116

resolveEntry,

11071117

sanitizedEnv,

11081118

stopChild,

Original file line numberDiff line numberDiff line change

@@ -173,6 +173,14 @@ node 1234 user 12u IPv4 0t0 TCP localhost:1234

173173

).toBe(3);

174174

});

175175
176+

it("rejects malformed ps RSS samples", () => {

177+

expect(testing.parseProcessRssKb("4096\n")).toBe(4096);

178+

expect(testing.parseProcessRssKb("4096kb\n")).toBeNull();

179+

expect(testing.parseProcessRssKb("4096 8192\n")).toBeNull();

180+

expect(testing.parseProcessRssKb("0\n")).toBeNull();

181+

expect(testing.parseProcessRssKb("")).toBeNull();

182+

});

183+
176184

it("enables both startup and restart trace in the child gateway environment", () => {

177185

const env = testing.sanitizedEnv("/tmp/openclaw-bench", "/tmp/openclaw-bench/config.json", {

178186

config: {},

Original file line numberDiff line numberDiff line change

@@ -94,6 +94,14 @@ describe("gateway startup benchmark script", () => {

9494

expect(env.OPENCLAW_GATEWAY_STARTUP_TRACE).toBe("1");

9595

});

9696
97+

it("rejects malformed ps RSS samples", () => {

98+

expect(testing.parseProcessRssKb("2048\n")).toBe(2048);

99+

expect(testing.parseProcessRssKb("2048kb\n")).toBeNull();

100+

expect(testing.parseProcessRssKb("2048 4096\n")).toBeNull();

101+

expect(testing.parseProcessRssKb("0\n")).toBeNull();

102+

expect(testing.parseProcessRssKb("")).toBeNull();

103+

});

104+
97105

it("classifies HTTP listen and gateway ready logs separately", () => {

98106

expect(

99107

testing.classifyGatewayReadyLog("[gateway] http server listening (0 plugins, 0.8s)"),