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

推荐订阅源

IT之家
IT之家
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
美团技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园_首页
MyScale Blog
MyScale Blog
N
Netflix TechBlog - Medium
I
InfoQ
Jina AI
Jina AI
Martin Fowler
Martin Fowler
Recent Announcements
Recent Announcements
量子位
月光博客
月光博客
罗磊的独立博客
雷峰网
雷峰网
The Cloudflare Blog
V
V2EX
小众软件
小众软件
人人都是产品经理
人人都是产品经理
博客园 - Franky
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题

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 Windows sampler metrics · openclaw/...
vincentkoc · 2026-06-17 · via Recent Commits to openclaw:main

@@ -1740,7 +1740,7 @@ function parsePosixProcessRows(stdout) {

17401740

const processId = Number.parseInt(pidRaw, 10);

17411741

const parentProcessId = Number.parseInt(ppidRaw, 10);

17421742

const rssKb = Number.parseInt(rssKbRaw, 10);

1743-

const cpuPercent = parsePosixCpuPercent(cpuRaw);

1743+

const cpuPercent = parseStrictNonNegativeDecimal(cpuRaw);

17441744

if (

17451745

!Number.isInteger(processId) ||

17461746

!Number.isInteger(parentProcessId) ||

@@ -1759,7 +1759,7 @@ function parsePosixProcessRows(stdout) {

17591759

.filter(Boolean);

17601760

}

176117611762-

function parsePosixCpuPercent(raw) {

1762+

function parseStrictNonNegativeDecimal(raw) {

17631763

const text = String(raw ?? "").trim();

17641764

if (!/^(?:0|[1-9]\d*)(?:\.\d+)?$/u.test(text)) {

17651765

return null;

@@ -1768,6 +1768,15 @@ function parsePosixCpuPercent(raw) {

17681768

return Number.isFinite(parsed) ? parsed : null;

17691769

}

177017701771+

function parseStrictUnsignedInteger(raw) {

1772+

const text = String(raw ?? "").trim();

1773+

if (!/^(?:0|[1-9]\d*)$/u.test(text)) {

1774+

return null;

1775+

}

1776+

const parsed = Number(text);

1777+

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

1778+

}

1779+17711780

function collectPosixProcessTree(rows, rootPid) {

17721781

const byParent = new Map();

17731782

for (const row of rows) {

@@ -1949,24 +1958,24 @@ async function sampleWindowsProcess(pid, run, commandLineNeedles = []) {

19491958

const [workingSetBytesRaw, cpuSecondsRaw, processIdRaw, aggregateWorkingSetBytesRaw] = stdout

19501959

.trim()

19511960

.split(/\s+/u);

1952-

const workingSetBytes = Number.parseInt(workingSetBytesRaw ?? "", 10);

1953-

const aggregateWorkingSetBytes = Number.parseInt(

1961+

const workingSetBytes = parseStrictUnsignedInteger(workingSetBytesRaw);

1962+

const aggregateWorkingSetBytes = parseStrictUnsignedInteger(

19541963

aggregateWorkingSetBytesRaw ?? workingSetBytesRaw ?? "",

1955-

10,

19561964

);

1957-

const cpuSeconds = Number.parseFloat(cpuSecondsRaw ?? "");

1958-

const processId = Number.parseInt(processIdRaw ?? "", 10);

1959-

if (!Number.isFinite(workingSetBytes)) {

1965+

const cpuSeconds = parseStrictNonNegativeDecimal(cpuSecondsRaw);

1966+

const processId = parseStrictUnsignedInteger(processIdRaw);

1967+

if (workingSetBytes === null) {

19601968

return null;

19611969

}

19621970

return {

19631971

rssMiB: Math.round((workingSetBytes / 1024 / 1024) * 10) / 10,

1964-

aggregateRssMiB: Number.isFinite(aggregateWorkingSetBytes)

1965-

? Math.round((aggregateWorkingSetBytes / 1024 / 1024) * 10) / 10

1966-

: Math.round((workingSetBytes / 1024 / 1024) * 10) / 10,

1972+

aggregateRssMiB:

1973+

aggregateWorkingSetBytes !== null

1974+

? Math.round((aggregateWorkingSetBytes / 1024 / 1024) * 10) / 10

1975+

: Math.round((workingSetBytes / 1024 / 1024) * 10) / 10,

19671976

cpuPercent: null,

1968-

cpuSeconds: Number.isFinite(cpuSeconds) ? cpuSeconds : null,

1969-

processId: Number.isFinite(processId) ? processId : safePid,

1977+

cpuSeconds,

1978+

processId: processId ?? safePid,

19701979

};

19711980

} catch {

19721981

// Try the next Windows PowerShell command name.