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

推荐订阅源

云风的 BLOG
云风的 BLOG
GbyAI
GbyAI
G
Google Developers Blog
Engineering at Meta
Engineering at Meta
月光博客
月光博客
腾讯CDC
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
SegmentFault 最新的问题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
阮一峰的网络日志
阮一峰的网络日志
博客园 - 【当耐特】
The GitHub Blog
The GitHub Blog
Last Week in AI
Last Week in AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
aimingoo的专栏
aimingoo的专栏
Google DeepMind News
Google DeepMind News
Y
Y Combinator Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Martin Fowler
Martin Fowler
A
About on SuperTechFans
博客园 - 叶小钗

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(release): bound GitHub API body reads · openclaw/open...
vincentkoc · 2026-06-19 · via Recent Commits to openclaw:main

@@ -12,6 +12,10 @@ import {

1212

validateWindowsSourceRelease,

1313

} from "../../scripts/release-candidate-checklist.mjs";

141415+

function jsonResponse(body: unknown, init: ResponseInit = {}): Response {

16+

return new Response(JSON.stringify(body), init);

17+

}

18+1519

describe("release candidate checklist", () => {

1620

it("infers validation profiles from candidate tags", () => {

1721

expect(parseArgs(["--tag", "v2026.5.14-beta.3"]).releaseProfile).toBe("beta");

@@ -201,16 +205,15 @@ describe("release candidate checklist", () => {

201205

digest: `sha256:${"b".repeat(64)}`,

202206

},

203207

];

204-

const fetchImpl = vi.fn(async () => ({

205-

ok: true,

206-

json: async () => ({

208+

const fetchImpl = vi.fn(async () => {

209+

return jsonResponse({

207210

tag_name: "v0.6.3",

208211

draft: false,

209212

prerelease: false,

210213

html_url: "https://github.com/openclaw/openclaw-windows-node/releases/tag/v0.6.3",

211214

assets,

212-

}),

213-

}));

215+

});

216+

});

214217215218

await expect(

216219

validateWindowsSourceRelease("v0.6.3", {

@@ -262,9 +265,8 @@ describe("release candidate checklist", () => {

262265

"asset OpenClawCompanion-Setup-x64.exe is missing its SHA-256 digest",

263266

],

264267

])("rejects an invalid stable Windows source release", async (override, message) => {

265-

const fetchImpl = vi.fn(async () => ({

266-

ok: true,

267-

json: async () => ({

268+

const fetchImpl = vi.fn(async () => {

269+

return jsonResponse({

268270

tag_name: "v0.6.3",

269271

draft: false,

270272

prerelease: false,

@@ -280,8 +282,8 @@ describe("release candidate checklist", () => {

280282

},

281283

],

282284

...override,

283-

}),

284-

}));

285+

});

286+

});

285287286288

await expect(

287289

validateWindowsSourceRelease("v0.6.3", {

@@ -357,10 +359,7 @@ describe("release candidate checklist", () => {

357359

Authorization: "Bearer test-token",

358360

"X-GitHub-Api-Version": "2022-11-28",

359361

});

360-

return {

361-

ok: true,

362-

json: async () => ({ workflow_runs: [] }),

363-

};

362+

return jsonResponse({ workflow_runs: [] });

364363

});

365364366365

await expect(

@@ -378,6 +377,42 @@ describe("release candidate checklist", () => {

378377

);

379378

});

380379380+

it("bounds GitHub API error bodies", async () => {

381+

const fetchImpl = vi.fn(async () => {

382+

return new Response("x".repeat(65), {

383+

headers: { "content-length": "65" },

384+

status: 500,

385+

});

386+

});

387+388+

await expect(

389+

githubApi("repos/openclaw/openclaw/actions/runs", {

390+

fetchImpl,

391+

maxBodyBytes: 64,

392+

timeoutMs: 1234,

393+

token: "test-token",

394+

}),

395+

).rejects.toThrow(

396+

"GitHub API repos/openclaw/openclaw/actions/runs response body exceeded 64 bytes",

397+

);

398+

});

399+400+

it("keeps GitHub API timeouts active while reading response bodies", async () => {

401+

const fetchImpl = vi.fn(async () => {

402+

return new Response(new ReadableStream<Uint8Array>({ start() {} }), {

403+

status: 200,

404+

});

405+

});

406+407+

await expect(

408+

githubApi("repos/openclaw/openclaw/actions/runs", {

409+

fetchImpl,

410+

timeoutMs: 25,

411+

token: "test-token",

412+

}),

413+

).rejects.toThrow("GitHub API repos/openclaw/openclaw/actions/runs timed out after 25ms");

414+

});

415+381416

it("includes the GitHub API path when a request times out", async () => {

382417

const fetchImpl = vi.fn(async () => {

383418

throw new DOMException("request timed out", "TimeoutError");