vps-health-api/docs
le king fu b740f221af
All checks were successful
CI / verification (pull_request) Successful in 59s
feat(health): 24 h load history and a "saturated" state
GET /health only gave a snapshot, so the monitoring missed the 2026-11-03
saturation and the nights before it. A one-minute tick, armed in the
require.main block, now records host load, CPU by /proc/stat difference
and, when TLS_PROBE_HOSTS is set, the TLS handshake time of each listed
host into an in-memory buffer of 1440 samples (load-history.js, pure).

- /health gains `saturation` ({state: ok|saturated|unknown, since,
  coverageMinutes, load1, cores}) and `tls`, appended after the existing
  keys. Saturated = the last five samples of an unbroken series all have
  load1 > cores; unknown under five samples, after a gap over 3 minutes,
  or when the last sample is over 3 minutes old. No sample at start-up,
  so the state stays unknown for the first five minutes after a deploy.
- GET /health/history (read token) serves {since, coverageMinutes, cores,
  samples}. The buffer restarts from zero at every deploy.
- probeTls() verifies the certificate, times out after 3 s and reports an
  error code only. TLS_PROBE_HOSTS is empty by default: no network call in
  the tests, the CI or boot-from-copy.sh.
- Dockerfile COPY, REVIEW.md Haut table (and review-levels.py), CLAUDE.md,
  docs and .env.example updated.

Refs #73

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 20:26:05 -05:00
..
endpoints.md feat(health): 24 h load history and a "saturated" state 2026-11-04 20:26:05 -05:00
mounts.md docs: slim CLAUDE.md below 30k characters, move details to docs/ (#67) 2026-10-20 20:30:39 -04:00
tests.md feat(health): 24 h load history and a "saturated" state 2026-11-04 20:26:05 -05:00