Ruling: does monitoring re-run each service's declared health check on a schedule? #422

Closed
opened 2026-08-10 21:14:58 +00:00 by ben · 3 comments
Owner

The declared health checks (servicehealth.go) run at provisioning, at update rollout (internal/update/rollout.go), and at rescue rehome — never on a schedule. Monitoring (internal/monitor/monitor.go) reads heartbeats plus the same registry, so a service that degrades after its deploy-time check passed is invisible until a member complains. ADR 0071 rules absence-of-signal is never silently healthy; an app serving its error page with HTTP 200 is the inverse — presence of signal that is silently unhealthy — and no rung of the ladder catches it today (the mauke fleet's standing probe suite exists precisely because of a days-long invisible outage of this class; docs/GOTCHAS.md #8).

The question for Ben: should monitoring re-run each service's declared health check on its own schedule (making three signal sources where ADR 0070 defines two)?

This is a ruling, not a ticket, because it crosses the ADR 0061 line — health checks are provisioning's; steady-state watching is monitoring's. Options:

  • (a) Yes, monitoring re-runs the declared checks on a per-service interval; failures raise through the existing alert path (ADR 0153). Amends 0070's signal-source list.
  • (b) No, but the drive/rehearsal harness runs them against standing communities on its own cadence — no product change, weaker for real operators.
  • (c) No — deploy-time checks + heartbeats stay the whole story; accept the gap and record it.

Related implementation ticket (independent, already ready-for-agent): broken-app signature scan + body floors in the checks themselves.

Source: the clan-community (mauke reference fleet) lessons review, docs/research/2026-08-10-clan-community-lessons.md (lands on main this sitting), lesson 6.

The declared health checks (`servicehealth.go`) run at provisioning, at update rollout (`internal/update/rollout.go`), and at rescue rehome — never on a schedule. Monitoring (`internal/monitor/monitor.go`) reads heartbeats plus the same registry, so a service that degrades *after* its deploy-time check passed is invisible until a member complains. ADR 0071 rules absence-of-signal is never silently healthy; an app serving its error page with HTTP 200 is the inverse — presence of signal that is silently unhealthy — and no rung of the ladder catches it today (the mauke fleet's standing probe suite exists precisely because of a days-long invisible outage of this class; `docs/GOTCHAS.md` #8). **The question for Ben:** should monitoring re-run each service's declared health check on its own schedule (making three signal sources where ADR 0070 defines two)? This is a ruling, not a ticket, because it crosses the ADR 0061 line — health checks are provisioning's; steady-state watching is monitoring's. Options: - **(a) Yes, monitoring re-runs the declared checks** on a per-service interval; failures raise through the existing alert path (ADR 0153). Amends 0070's signal-source list. - **(b) No, but the drive/rehearsal harness runs them** against standing communities on its own cadence — no product change, weaker for real operators. - **(c) No** — deploy-time checks + heartbeats stay the whole story; accept the gap and record it. Related implementation ticket (independent, already `ready-for-agent`): broken-app signature scan + body floors in the checks themselves. _Source: the clan-community (mauke reference fleet) lessons review, `docs/research/2026-08-10-clan-community-lessons.md` (lands on main this sitting), lesson 6._
Author
Owner

The independent implementation half (broken-app signature scan + body floors + not-asserted outcome in the checks themselves) is #417, already ready-for-agent — this ruling is only about when the checks run.

The independent implementation half (broken-app signature scan + body floors + not-asserted outcome in the checks themselves) is #417, already ready-for-agent — this ruling is only about *when* the checks run.
Author
Owner

Ruled by Ben 2026-08-10: yes, option (a) — every 5 minutes. Recorded as ADR 0161 (docs/adr/0161-monitoring-reruns-declared-health-checks.md, pushed 9d75fe9): monitoring re-runs every declared health check on a 5-minute cadence as a third signal source beside ADR 0070's two; the ADR 0061 boundary holds (one check implementation, two callers — provisioning at activation, monitoring read-only in steady state); failures raise through the ADR 0153 alert path on state transition, not every failing tick; not-asserted honesty (ADR 0071, #417) rides along; ungated services stay skipped (ADR 0112). Flipping to ready-for-agent — build against ADR 0161. Coordinate with #417 (check content) if it is still open: shared implementations, no monitoring-only check definitions.

**Ruled by Ben 2026-08-10: yes, option (a) — every 5 minutes.** Recorded as **ADR 0161** (`docs/adr/0161-monitoring-reruns-declared-health-checks.md`, pushed `9d75fe9`): monitoring re-runs every declared health check on a 5-minute cadence as a third signal source beside ADR 0070's two; the ADR 0061 boundary holds (one check implementation, two callers — provisioning at activation, monitoring read-only in steady state); failures raise through the ADR 0153 alert path on state *transition*, not every failing tick; not-asserted honesty (ADR 0071, #417) rides along; ungated services stay skipped (ADR 0112). Flipping to `ready-for-agent` — build against ADR 0161. Coordinate with #417 (check content) if it is still open: shared implementations, no monitoring-only check definitions.
Author
Owner

Implemented ADR 0161 (Ben's option-a ruling) in commit 5f7a1f7, on origin/main.

What changed: the correctness signal was already re-run in monitor.Tick (#80), but on every 30-second aggregation pass — a real HTTP probe against every service, far hotter than the ruled cadence. It is now paced to monitor.CheckInterval (5m): a checkResult cache holds each service's last verdict, reused on ticks inside the window and re-run only past it. The cheap folds (heartbeats, gaps, provisioning faults, mail-readiness) still settle every 30s tick.

  • checkMu guards the cache separately from o.mu, since Tick runs concurrently from Run and Apply and the probe must never run under a lock (verified with -race).
  • Apply invalidates the fixed service's cached verdict before its verify tick, so an operator's heal is still seen on the loop's own next tick rather than after the cadence (ADR 0161 paces steady-state watching, not fix verification).
  • ADR 0061 boundary held: one check impl, provisioning gates at activation, monitoring re-runs read-only — no monitoring-only check definitions (coordinates with #417's check content, still open). Ungated services still contribute nothing; failures still raise on state transition.

Evidence: two new seam tests in internal/monitor/monitor_test.go — the paced probe count under a fake clock, and a degrade-after-deploy surfacing within one cadence (GOTCHAS #8). Existing tick-by-tick classifier/ladder/re-raise tests drive checks per-tick (checkEvery = 0) to stay deterministic. Full go test ./... green (incl. -race on monitor); pre-push gate passed. STATUS.md updated (header + milestone log).

Implemented ADR 0161 (Ben's option-a ruling) in commit `5f7a1f7`, on `origin/main`. **What changed:** the correctness signal was already re-run in `monitor.Tick` (#80), but on every 30-second aggregation pass — a real HTTP probe against every service, far hotter than the ruled cadence. It is now paced to `monitor.CheckInterval` (5m): a `checkResult` cache holds each service's last verdict, reused on ticks inside the window and re-run only past it. The cheap folds (heartbeats, gaps, provisioning faults, mail-readiness) still settle every 30s tick. - `checkMu` guards the cache separately from `o.mu`, since `Tick` runs concurrently from `Run` and `Apply` and the probe must never run under a lock (verified with `-race`). - `Apply` invalidates the fixed service's cached verdict before its verify tick, so an operator's heal is still seen on the loop's own next tick rather than after the cadence (ADR 0161 paces steady-state watching, not fix verification). - ADR 0061 boundary held: one check impl, provisioning gates at activation, monitoring re-runs read-only — **no monitoring-only check definitions** (coordinates with #417's check content, still open). Ungated services still contribute nothing; failures still raise on state transition. **Evidence:** two new seam tests in `internal/monitor/monitor_test.go` — the paced probe count under a fake clock, and a degrade-after-deploy surfacing within one cadence (GOTCHAS #8). Existing tick-by-tick classifier/ladder/re-raise tests drive checks per-tick (`checkEvery = 0`) to stay deterministic. Full `go test ./...` green (incl. `-race` on monitor); pre-push gate passed. STATUS.md updated (header + milestone log).
ben closed this issue 2026-08-10 22:50:39 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#422
No description provided.