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

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
H
Help Net Security
云风的 BLOG
云风的 BLOG
Apple Machine Learning Research
Apple Machine Learning Research
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
D
Docker
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
GbyAI
GbyAI
博客园 - Franky
B
Blog RSS Feed
Stack Overflow Blog
Stack Overflow Blog
L
LangChain Blog
量子位
V
Visual Studio Blog
Y
Y Combinator Blog
小众软件
小众软件
N
Netflix TechBlog - Medium
博客园 - 三生石上(FineUI控件)
Microsoft Security Blog
Microsoft Security Blog
雷峰网
雷峰网

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 OpenWebUI probe statuses · openclaw...
vincentkoc · 2026-06-17 · via Recent Commits to openclaw:main

File tree

  • scripts/e2e/lib/openwebui

Original file line numberDiff line numberDiff line change

@@ -6,7 +6,15 @@ if (!url) {

66

throw new Error("usage: http-probe.mjs <url> [status|lt500]");

77

}

88
9+

function parseExpectedStatus(raw) {

10+

if (!/^[1-5]\d\d$/u.test(raw)) {

11+

throw new Error(`expected status must be lt500 or a decimal HTTP status. Got: ${raw}`);

12+

}

13+

return Number(raw);

14+

}

15+
916

const timeoutMs = readPositiveIntEnv("OPENCLAW_HTTP_PROBE_TIMEOUT_MS", 30_000);

17+

const expectedStatus = expectedRaw === "lt500" ? undefined : parseExpectedStatus(expectedRaw);

1018

const controller = new AbortController();

1119

const timer = setTimeout(() => controller.abort(), timeoutMs);

1220

@@ -17,9 +25,7 @@ try {

1725

}

1826

const res = await fetch(url, { headers, signal: controller.signal }).catch(() => null);

1927

const ok =

20-

expectedRaw === "lt500"

21-

? Boolean(res && res.status < 500)

22-

: res?.status === Number(expectedRaw);

28+

expectedRaw === "lt500" ? Boolean(res && res.status < 500) : res?.status === expectedStatus;

2329

process.exit(ok ? 0 : 1);

2430

} finally {

2531

clearTimeout(timer);

Original file line numberDiff line numberDiff line change

@@ -170,6 +170,15 @@ describe("e2e helper numeric env limits", () => {

170170

expect(result.stderr).toContain("invalid OPENCLAW_HTTP_PROBE_TIMEOUT_MS: 8000ms");

171171

});

172172
173+

it("rejects loose Open WebUI HTTP probe expected statuses", () => {

174+

const result = runScript(httpProbePath, ["http://127.0.0.1:9", "2e2"]);

175+
176+

expect(result.status).not.toBe(0);

177+

expect(result.stderr).toContain(

178+

"expected status must be lt500 or a decimal HTTP status. Got: 2e2",

179+

);

180+

});

181+
173182

it("keeps Open WebUI HTTP probe status checks working with strict timeouts", async () => {

174183

const server = createServer((_request, response) => {

175184

response.writeHead(204).end();

@@ -185,4 +194,20 @@ describe("e2e helper numeric env limits", () => {

185194

server.close();

186195

}

187196

});

197+
198+

it("keeps Open WebUI HTTP probe lt500 status checks working", async () => {

199+

const server = createServer((_request, response) => {

200+

response.writeHead(404).end();

201+

});

202+

const url = await listen(server);

203+

try {

204+

const result = await runScriptAsync(httpProbePath, [url, "lt500"], {

205+

OPENCLAW_HTTP_PROBE_TIMEOUT_MS: "500",

206+

});

207+
208+

expect(result.status).toBe(0);

209+

} finally {

210+

server.close();

211+

}

212+

});

188213

});