Guide - Operations

Health, readiness, and liveness for safe deploys

Use this page as the single contract for health checks. Two checks ship only. Liveness is public and answers whether the process responds, with build version and no dependency detail. Readiness is signed in for an owner or manager and answers whether the process can serve the workspace, with binding names and present yes or no only. This page controls where the defaults health check guide differs.

Audit of the pack

Every health, readiness, and liveness mention in pack app-chauffeur.site.1 was read. The table below states what was found and what this page changes.

Found in defaults-health-check

One section states liveness with no dependencies, readiness signed in with DB and FILES rows, and deep health signed in with sign-in and vault rows. No route name and no version field are stated in the pack. Routes are verified by name in locked Worker configuration before deploy. This page adds no route and changes no locked file.

Gap 1: two readiness descriptions

The defaults guide requires sign-in for readiness, while an earlier version of this page added an anonymous deploy readiness. A deploy probe that follows one description fails the other. This page removes the anonymous deploy check. Deploy gating uses liveness only, and dependency readiness is checked signed in after deploy.

Gap 2: shared 503 language and no version

Liveness and readiness both used 503 in earlier wording, and neither payload stated a version. This page keeps 503 for readiness failure only, keeps liveness at 200 when the process responds even when a dependency is down, and adds version as the build version string only.

Gap 3: deep health widens disclosure

Deep health added sign-in and vault presence rows. This page removes deep health. Readiness reports DB and FILES by name only, because those are the bindings the site pack names. Sign-in, session, vault, workspace, and token presence are never reported by a health check.

Two checks, in depth order

Run liveness first, then readiness. Do not run readiness to prove liveness, and do not run any deeper probe.

1 Liveness: process and version only, public

Access: without sign-in. Checks: the process responds to a read. No database query, no FILES check, no workspace check, and no vault check. Method: GET, and HEAD with the same headers and no body. Payload: ok true, status live, and version as the build version string from locked configuration, or the word unknown when no build version is configured. Version is a build label only and never a config value, secret, or connection value. Codes: 200 when live. Any other code means the process is not live. On failure: the platform may restart the process. Liveness stays 200 when a dependency is down.

2 Readiness: signed in, bindings by name only

Access: signed in with a MAJIC account, workspace confirmed, owner or manager only. Signed out returns 401 with no dependency detail. A role that cannot open the check, including chauffeur, relief chauffeur, and customer, returns 403 with no dependency detail. Checks: DB present by name and answers a no-data probe, and FILES present by name. No booking, customer, or file data is read. Payload: ok, status ready or unavailable, version as in liveness, and one row per binding with name and present yes or no only. Codes: 200 when ready and 503 when a required binding is missing. On failure: remove the process from rotation. Do not restart the process for a readiness failure alone.

Payload examples with only non-sensitive status

Use these shapes in locked core. Do not add fields to either shape.

Liveness and readiness shapes

Liveness success: ok true, status live, version as build version or unknown. Liveness failure: no payload is required, the code alone means not live. Readiness success: ok true, status ready, version as in liveness, and rows for DB and FILES with present yes only. Readiness failure: ok false, status unavailable, version as in liveness, and rows for DB and FILES with present yes or no only. No other field appears in either payload.

What never appears

No binding value, connection string, database or bucket identifier, vault reference value, sign-in endpoint or token name, session detail, workspace identifier, or customer, booking, chauffeur, vehicle, or file data. No driver error text, stack trace, latency, or amount. Error wording in the signed-in readiness view states one plain sentence naming the missing binding name only. The public liveness payload never names a missing binding.

  • Version never carries a secret, token, key, card number, or environment value
  • Each readiness row shows present yes or no with no value in the row
  • A signed-out or wrong-role readiness response contains no dependency name in the payload

Caching, logging, and safe defaults

Safe defaults already stated in the pack apply to both checks.

Caching and headers

Cache-Control private, no-store for both checks, with no ETag and no stored body in a shared cache. Content type is JSON for a payload. No cookie is set by a check. A shared cache must not store a payload.

Logging

Log check name, result, and time, with actor only in the signed-in readiness view. No secret or personal note in the log detail. Do not copy a payload row into a page or log with a value added.

Bindings and config

DB is required for the workspace database. FILES is required when file or photo use is enabled. No environment variable name, vault reference value, or connection value is stated in the site pack. Verify each name in locked Worker configuration and record present yes or no with no value in the row.

Timeouts

Liveness answers without a dependency wait. Readiness uses a short no-data probe with a timeout set in locked configuration. A timeout on readiness returns 503 with status unavailable. The signed-in payload states present no for the timed out binding and no error text.

Acceptance checks before you ship

Run each check after deploy, in depth order. Record present yes or no with no value in the row.

  • Anonymous liveness returns 200 with ok true, status live, and version only, and still returns 200 when a binding is missing, with no DB, FILES, sign-in, or vault name in the payload
  • Signed-out readiness returns 401 with no dependency name, version, or row in the payload
  • Chauffeur readiness returns 403 with no dependency name, version, or row in the payload
  • Owner or manager readiness returns rows with present yes or no only and no value in the row, with version matching liveness
  • A missing binding returns 503 on readiness, not 200 with error text, and liveness does not restart on that 503
  • Every payload shows no ETag, Cache-Control private with no-store, and no workspace identifier, secret, or driver error text

Gate on liveness, confirm readiness signed in

Run public liveness for deploy gating, then signed-in readiness as owner or manager with present yes or no by binding name only.