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

推荐订阅源

J
Java Code Geeks
Google DeepMind News
Google DeepMind News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
小众软件
小众软件
Blog — PlanetScale
Blog — PlanetScale
腾讯CDC
A
About on SuperTechFans
Vercel News
Vercel News
I
InfoQ
阮一峰的网络日志
阮一峰的网络日志
月光博客
月光博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
S
SegmentFault 最新的问题
V
Visual Studio Blog
T
Tailwind CSS Blog
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
博客园 - 【当耐特】
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
美团技术团队

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
test: tighten proxy validation assertions · openclaw/open...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -199,23 +199,19 @@ describe("proxy validation", () => {

199199

targetUrl: DEFAULT_PROXY_VALIDATION_ALLOWED_URLS[0],

200200

timeoutMs: 5000,

201201

});

202-

const deniedCall = fetchCheck.mock.calls[1]?.[0];

203-

expect(deniedCall).toMatchObject({

204-

proxyUrl: "http://127.0.0.1:3128",

205-

timeoutMs: 5000,

206-

});

202+

const deniedCall = fetchCheck.mock.calls[1]?.[0] as

203+

| { proxyUrl?: unknown; targetUrl?: string; timeoutMs?: unknown }

204+

| undefined;

205+

expect(deniedCall?.proxyUrl).toBe("http://127.0.0.1:3128");

206+

expect(deniedCall?.timeoutMs).toBe(5000);

207207

expect(deniedCall?.targetUrl).toMatch(/^http:\/\/127\.0\.0\.1:\d+\/$/);

208208

expect(result.ok).toBe(true);

209-

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

210-

kind: "allowed",

211-

url: DEFAULT_PROXY_VALIDATION_ALLOWED_URLS[0],

212-

ok: true,

213-

});

214-

expect(result.checks[1]).toMatchObject({

215-

kind: "denied",

216-

ok: true,

217-

error: "loopback blocked",

218-

});

209+

expect(result.checks[0]?.kind).toBe("allowed");

210+

expect(result.checks[0]?.url).toBe(DEFAULT_PROXY_VALIDATION_ALLOWED_URLS[0]);

211+

expect(result.checks[0]?.ok).toBe(true);

212+

expect(result.checks[1]?.kind).toBe("denied");

213+

expect(result.checks[1]?.ok).toBe(true);

214+

expect(result.checks[1]?.error).toBe("loopback blocked");

219215

expect(result.checks[1]?.url).toMatch(/^http:\/\/127\.0\.0\.1:\d+\/$/);

220216

});

221217

@@ -238,12 +234,12 @@ describe("proxy validation", () => {

238234239235

expect(result.ok).toBe(false);

240236

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

241-

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

242-

kind: "denied",

243-

ok: false,

244-

status: 204,

245-

error: "Denied loopback canary returned HTTP 204 without the validation token",

246-

});

237+

expect(result.checks[0]?.kind).toBe("denied");

238+

expect(result.checks[0]?.ok).toBe(false);

239+

expect(result.checks[0]?.status).toBe(204);

240+

expect(result.checks[0]?.error).toBe(

241+

"Denied loopback canary returned HTTP 204 without the validation token",

242+

);

247243

expect(result.checks[0]?.url).toMatch(/^http:\/\/127\.0\.0\.1:\d+\/$/);

248244

});

249245

@@ -260,11 +256,9 @@ describe("proxy validation", () => {

260256261257

expect(result.ok).toBe(true);

262258

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

263-

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

264-

kind: "denied",

265-

ok: true,

266-

status: 403,

267-

});

259+

expect(result.checks[0]?.kind).toBe("denied");

260+

expect(result.checks[0]?.ok).toBe(true);

261+

expect(result.checks[0]?.status).toBe(403);

268262

expect(result.checks[0]?.url).toMatch(/^http:\/\/127\.0\.0\.1:\d+\/$/);

269263

});

270264

@@ -505,14 +499,11 @@ describe("proxy validation", () => {

505499

});

506500507501

expect(result.ok).toBe(false);

508-

expect(result.checks).toEqual([

509-

{

510-

kind: "apns",

511-

url: "https://api.sandbox.push.apple.com",

512-

ok: false,

513-

error: expect.stringContaining("InvalidProviderToken"),

514-

},

515-

]);

502+

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

503+

expect(result.checks[0]?.kind).toBe("apns");

504+

expect(result.checks[0]?.url).toBe("https://api.sandbox.push.apple.com");

505+

expect(result.checks[0]?.ok).toBe(false);

506+

expect(result.checks[0]?.error).toContain("InvalidProviderToken");

516507

});

517508518509

it("fails APNs reachability when non-403 response has no apns-id (proxy intercept)", async () => {

@@ -529,14 +520,11 @@ describe("proxy validation", () => {

529520

});

530521531522

expect(result.ok).toBe(false);

532-

expect(result.checks).toEqual([

533-

{

534-

kind: "apns",

535-

url: "https://api.sandbox.push.apple.com",

536-

ok: false,

537-

error: expect.stringContaining("apns-id"),

538-

},

539-

]);

523+

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

524+

expect(result.checks[0]?.kind).toBe("apns");

525+

expect(result.checks[0]?.url).toBe("https://api.sandbox.push.apple.com");

526+

expect(result.checks[0]?.ok).toBe(false);

527+

expect(result.checks[0]?.error).toContain("apns-id");

540528

});

541529542530

it("fails APNs reachability when the proxy blocks CONNECT", async () => {