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

推荐订阅源

雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
V
V2EX
T
The Blog of Author Tim Ferriss
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Hugging Face - Blog
Hugging Face - Blog
Stack Overflow Blog
Stack Overflow Blog
I
InfoQ
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Last Week in AI
Last Week in AI
Recent Announcements
Recent Announcements
Vercel News
Vercel News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tailwind CSS Blog
美团技术团队
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
Blog — PlanetScale
Blog — PlanetScale
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
J
Java Code Geeks

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): release docker health probe bodies · openclaw/op...
vincentkoc · 2026-06-20 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -183,6 +183,7 @@ describe("runQaDockerUp", () => {

183183

it("falls back to the container IP when the host gateway port is unreachable", async () => {

184184

const calls: string[] = [];

185185

const fetchCalls: string[] = [];

186+

const hostGatewayCancel = vi.fn(async () => {});

186187

const outputDir = await mkdtemp(path.join(os.tmpdir(), "qa-docker-up-"));

187188

const repoRoot = path.resolve("/repo/openclaw");

188189

const composeFile = path.join(outputDir, "docker-compose.qa.yml");

@@ -214,6 +215,9 @@ describe("runQaDockerUp", () => {

214215

},

215216

fetchImpl: vi.fn(async (input: string) => {

216217

fetchCalls.push(input);

218+

if (input === "http://127.0.0.1:18889/healthz") {

219+

return { ok: false, body: { cancel: hostGatewayCancel } };

220+

}

217221

return {

218222

ok:

219223

input === "http://127.0.0.1:43124/healthz" ||

@@ -237,6 +241,7 @@ describe("runQaDockerUp", () => {

237241

"http://192.168.165.4:18789/healthz",

238242

]);

239243

expect(result.gatewayUrl).toBe("http://192.168.165.4:18789/");

244+

expect(hostGatewayCancel).toHaveBeenCalledTimes(1);

240245

} finally {

241246

await rm(outputDir, { recursive: true, force: true });

242247

}

Original file line numberDiff line numberDiff line change

@@ -25,6 +25,20 @@ function resolveDefaultQaDockerDir(repoRoot: string) {

2525

return path.resolve(repoRoot, ".artifacts/qa-docker");

2626

}

2727
28+

async function isQaLabDockerHealthReachable(url: string, fetchImpl: FetchLike) {

29+

let response: Awaited<ReturnType<FetchLike>> | undefined;

30+

try {

31+

response = await fetchImpl(url);

32+

return response.ok;

33+

} catch {

34+

return false;

35+

} finally {

36+

try {

37+

await response?.body?.cancel?.();

38+

} catch {}

39+

}

40+

}

41+
2842

export async function runQaDockerUp(

2943

params: {

3044

repoRoot?: string;

@@ -114,11 +128,7 @@ export async function runQaDockerUp(

114128

sleepImpl,

115129

);

116130

let gatewayUrl = hostGatewayUrl;

117-

if (

118-

!(await fetchImpl(`${hostGatewayUrl}healthz`)

119-

.then((response) => response.ok)

120-

.catch(() => false))

121-

) {

131+

if (!(await isQaLabDockerHealthReachable(`${hostGatewayUrl}healthz`, fetchImpl))) {

122132

const containerGatewayUrl = await resolveComposeServiceUrl(

123133

"openclaw-qa-gateway",

124134

18789,

Original file line numberDiff line numberDiff line change

@@ -156,6 +156,18 @@ describe("matrix harness runtime", () => {

156156

);

157157

});

158158
159+

it("cancels Matrix versions probe response bodies", async () => {

160+

const cancel = vi.fn(async () => {});

161+

const fetchImpl = vi.fn(async () => ({ ok: true, body: { cancel } }));

162+
163+

await expect(

164+

testing.isMatrixVersionsReachable("http://127.0.0.1:28008/", fetchImpl),

165+

).resolves.toBe(true);

166+
167+

expect(fetchImpl).toHaveBeenCalledWith("http://127.0.0.1:28008/_matrix/client/versions");

168+

expect(cancel).toHaveBeenCalledTimes(1);

169+

});

170+
159171

it("falls back to the container IP when the host port is unreachable", async () => {

160172

const calls: string[] = [];

161173
Original file line numberDiff line numberDiff line change

@@ -51,9 +51,17 @@ function buildVersionsUrl(baseUrl: string) {

5151

}

5252
5353

async function isMatrixVersionsReachable(baseUrl: string, fetchImpl: FetchLike) {

54-

return await fetchImpl(buildVersionsUrl(baseUrl))

55-

.then((response) => response.ok)

56-

.catch(() => false);

54+

let response: Awaited<ReturnType<FetchLike>> | undefined;

55+

try {

56+

response = await fetchImpl(buildVersionsUrl(baseUrl));

57+

return response.ok;

58+

} catch {

59+

return false;

60+

} finally {

61+

try {

62+

await response?.body?.cancel?.();

63+

} catch {}

64+

}

5765

}

5866
5967

async function withMatrixQaHarnessTimeout<T>(