shwrk harness

/health Contract

Every harnessed site exposes GET /health. This is the single source of truth for the contract; harness.shwrk.com publishes this file byte-for-byte.

Response

GET /health returns HTTP 200 with a JSON body:

{
  "status": "ok",
  "service": "<name matching wrangler.toml>",
  "commit": "<git SHA stamped at deploy time>",
  "version": "<package/app version>",
  "timestamp": "<ISO 8601>",
  "checks": { "<dependency>": "ok" }
}
FieldTypeMeaning
status"ok" \"degraded" \"down"overall health
servicestringmust match the name in wrangler.toml
commitstringgit SHA stamped at deploy time (see below)
versionstringpackage/app version
timestampstringISO 8601 time the response was generated
checksobjectper-dependency "ok" \"fail" (KV, D1, upstream APIs); {} if none

Rules

Status → HTTP code

statusHTTP
ok200
degraded503
down503

See templates/health/typescript.ts for the reference implementation.