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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
The Blog of Author Tim Ferriss
博客园 - 司徒正美
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
有赞技术团队
有赞技术团队
量子位
S
SegmentFault 最新的问题
博客园 - 聂微东
博客园 - 【当耐特】
J
Java Code Geeks
美团技术团队
Hugging Face - Blog
Hugging Face - Blog
H
Help Net Security
V
V2EX
人人都是产品经理
人人都是产品经理
博客园 - Franky
罗磊的独立博客
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research

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: tighten parser edge cases (#86999) · openclaw/opencl...
steipete · 2026-05-27 · via Recent Commits to openclaw:main

@@ -253,6 +253,97 @@ describeUnix("inspectPortUsage", () => {

253253

});

254254

});

255255256+

it("deduplicates repeated lsof listener records for one process address", async () => {

257+

runCommandWithTimeoutMock.mockImplementation(async (argv: string[]) => {

258+

const command = argv[0];

259+

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

260+

return { stdout: "", stderr: "", code: 1 };

261+

}

262+

if (command.includes("lsof")) {

263+

return {

264+

stdout: "p111\ncnode\nnTCP *:18789 (LISTEN)\nnTCP *:18789 (LISTEN)\n",

265+

stderr: "",

266+

code: 0,

267+

};

268+

}

269+

if (command === "ps") {

270+

if (argv.includes("command=")) {

271+

return {

272+

stdout: "node /tmp/openclaw/dist/index.js gateway run\n",

273+

stderr: "",

274+

code: 0,

275+

};

276+

}

277+

if (argv.includes("user=")) {

278+

return { stdout: "tester\n", stderr: "", code: 0 };

279+

}

280+

if (argv.includes("ppid=")) {

281+

return { stdout: "1\n", stderr: "", code: 0 };

282+

}

283+

}

284+

return { stdout: "", stderr: "", code: 1 };

285+

});

286+287+

const result = await inspectPortUsage(18789);

288+289+

expect(result.listeners).toHaveLength(1);

290+

expect(result.listeners[0]).toMatchObject({

291+

pid: 111,

292+

address: "TCP *:18789 (LISTEN)",

293+

});

294+

});

295+296+

it("reports multiple lsof socket records for one process", async () => {

297+

runCommandWithTimeoutMock.mockImplementation(async (argv: string[]) => {

298+

const command = argv[0];

299+

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

300+

return { stdout: "", stderr: "", code: 1 };

301+

}

302+

if (command.includes("lsof")) {

303+

return {

304+

stdout:

305+

"p111\ncnode\n" +

306+

"nTCP 127.0.0.1:50123->127.0.0.1:18789 (ESTABLISHED)\n" +

307+

"nTCP 127.0.0.1:50124->127.0.0.1:18789 (ESTABLISHED)\n",

308+

stderr: "",

309+

code: 0,

310+

};

311+

}

312+

if (command === "ps") {

313+

if (argv.includes("command=")) {

314+

return {

315+

stdout: "node /tmp/newer-openclaw/dist/index.js logs --follow\n",

316+

stderr: "",

317+

code: 0,

318+

};

319+

}

320+

if (argv.includes("user=")) {

321+

return { stdout: "tester\n", stderr: "", code: 0 };

322+

}

323+

if (argv.includes("ppid=")) {

324+

return { stdout: "1\n", stderr: "", code: 0 };

325+

}

326+

}

327+

return { stdout: "", stderr: "", code: 1 };

328+

});

329+330+

const result = await inspectPortConnections(18789);

331+332+

expect(result.connections).toHaveLength(2);

333+

expect(result.connections).toEqual([

334+

expect.objectContaining({

335+

pid: 111,

336+

direction: "client",

337+

address: "TCP 127.0.0.1:50123->127.0.0.1:18789 (ESTABLISHED)",

338+

}),

339+

expect.objectContaining({

340+

pid: 111,

341+

direction: "client",

342+

address: "TCP 127.0.0.1:50124->127.0.0.1:18789 (ESTABLISHED)",

343+

}),

344+

]);

345+

});

346+256347

it("falls back to ss for established gateway client connections", async () => {

257348

runCommandWithTimeoutMock.mockImplementation(async (argv: string[]) => {

258349

const command = argv[0];