delimit_heartbeat_check
Checks scheduled services by walking the heartbeat directory, classifying each as ok, stale, failed, or never seen to prevent silent daemon failures before they cause customer-visible incidents.
Instructions
Walk the heartbeat directory and report which scheduled services are stale (LED-1412).
When to use: as part of the session-start ritual to surface silent
daemon staleness before it becomes a customer-visible incident. The
2026-05-15 incident — delimit-reddit-proxy.service inactive for 13
days, all reddit scans 429-failing silently, founder noticing only
via "3 day old posts" — is the failure mode this prevents. Each
scheduled task writes ~/.delimit/heartbeats/<service>.json after
every run; this tool walks the dir and classifies each service.
When NOT to use: for one-off liveness checks (just read the file
yourself) or for full-host metrics (delimit_obs_status). Phase 2
will add an external deadman ping for full-host outages —
heartbeats here are local-only.
Sibling contrast: delimit_obs_status reports composed runtime observability metrics; this reports per-service liveness based on last_run timestamps written by each daemon. delimit_gov_health reports the kernel layer.
Side effects: read-only on the heartbeat directory. No network, no write, no ledger, no notification.
Classification (most-severe-first):
parse_error: heartbeat file unreadable
failed: status='failed' in the record
stale: last_run older than service-specific threshold
degraded: status='degraded' in the record
never_seen: configured service has no heartbeat file yet
unknown_age: heartbeat exists but timestamp won't parse
ok: status='ok' AND last_run within threshold
Per-service thresholds default to sensible values (reddit/social-loop
2h, inbox 30min, daily timers 36h). Override via
<dir>/_thresholds.json — JSON map of {service_name: seconds}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| heartbeat_dir | No | Override the heartbeat directory. Default: $DELIMIT_HEARTBEAT_DIR env var or ~/.delimit/heartbeats/. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||