Health, readiness and request correlation
Small unauthenticated system endpoints distinguish a running process from a deployment ready to accept database-backed work.
| Path | Purpose | Success |
|---|---|---|
/system/health | Process liveness | {"status":"ok"} |
/system/ready | Database and migration readiness | {"status":"ready"} |
/system/version | Build and platform identity | Version, commit, date, Go, OS and architecture |
Container probes
livenessProbe:
httpGet: {path: /system/health, port: 8090}
readinessProbe:
httpGet: {path: /system/ready, port: 8090}A process can be healthy while readiness returns 503 not_ready, for example during migration failure or database initialization problems.
Authenticated operations summary
/admin/v1/operations reports the configured provider, bounded object counts and an audit boundary note. Database size is reported for both providers: SQLite uses page-based size and PostgreSQL uses pg_database_size(current_database()).
Request IDs
curl -i "$TRESTLE_URL/system/ready" -H "X-Request-ID: deploy-check-42"Every response receives an X-Request-ID. Reuse it across your frontend, domain service and Trestle call so audit facts and structured logs can be correlated without logging credentials or request bodies.
Shutdown
SIGINT and SIGTERM remove readiness, stop accepting new work and allow in-flight requests to finish within the configured timeout. Job workers run under the same shutdown context and recover expired leases after restart.
CP22 provides verified archives and proxy guidance. Trestle remains pre-release until CP23 completes the stable-release hardening campaign.