-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
[Bug]: /health and /healthz can return Control UI HTML 200 instead of machine health payload #18446
Copy link
Copy link
Closed
Description
Summary
GET /health and GET /healthz can return Control UI HTML with 200 OK instead of machine-readable health JSON.
This makes deployment health probes (e.g. Render health checks) report healthy even when they are effectively checking the UI shell, not gateway/runtime dependency health.
Environment
- OpenClaw gateway running with Control UI enabled
- Observed on macOS Nimbus runtime during production audit
- Deployment config used
healthCheckPath: /health
Reproduction
- Run gateway with Control UI enabled.
- Probe endpoints directly:
curl -sS -D - http://127.0.0.1:18789/health -o /tmp/health.bodycurl -sS -D - http://127.0.0.1:18789/healthz -o /tmp/healthz.body
- Inspect headers/body.
Expected
/healthzreturns machine-parsable health payload (application/json) with meaningful status semantics./healthshould either alias to same JSON health payload or be explicitly documented/segregated from deployment probe paths.
Actual
Both /health and /healthz returned:
HTTP/1.1 200 OKContent-Type: text/html; charset=utf-8- Control UI HTML document (
<!doctype html> ... <title>OpenClaw Control</title> ...)
Evidence snippet
/health headers observed:
HTTP/1.1 200 OKContent-Type: text/html; charset=utf-8
/health body starts with:
<!doctype html>
<html lang="en">
<head>
<title>OpenClaw Control</title>Same behavior observed for /healthz.
Impact
- False-positive deployment health state.
- Operators cannot safely use
/health//healthzas runtime probes. - Monitoring semantics diverge from expected health contract.
Related
- [Bug]: Webhook health endpoints always return 200 without checking dependencies #11803 (adjacent health semantics discussion)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.