Add passive bounded zara-healthcheck service #496

Open
nsaspy wants to merge 8 commits from rage/19-healthcheck into main
Owner

Implements #19.

Adds a strictly passive/read-only health state engine over configured probe adapters. Probe results normalize to healthy/degraded/unhealthy/unknown with bounded evidence and history. Exceptions fail to unknown without leaking exception text.

State changes use configurable hysteresis and emit deduplicated structured health.state_changed events; repeated same-state samples do not spam events. health.export_facts provides structured evidence for expert consumers such as zara-sysadmin without putting remediation in this plugin.

There is no required watcher/daemon: polling is explicit and externally schedulable. An install with no probes degrades honestly as health-probes-not-configured.

Published through plugins.json, so pinned-Zara compatibility, temporary-home load/tool registration, per-plugin unit tests, install layout, Nix packaging, and aggregate flake checks exercise the public surface. The branch also carries the exact canonical timer-recovery blob so the earlier stacked timer bug cannot be reintroduced.

Implements #19. Adds a strictly passive/read-only health state engine over configured probe adapters. Probe results normalize to healthy/degraded/unhealthy/unknown with bounded evidence and history. Exceptions fail to `unknown` without leaking exception text. State changes use configurable hysteresis and emit deduplicated structured `health.state_changed` events; repeated same-state samples do not spam events. `health.export_facts` provides structured evidence for expert consumers such as zara-sysadmin without putting remediation in this plugin. There is no required watcher/daemon: polling is explicit and externally schedulable. An install with no probes degrades honestly as `health-probes-not-configured`. Published through `plugins.json`, so pinned-Zara compatibility, temporary-home load/tool registration, per-plugin unit tests, install layout, Nix packaging, and aggregate flake checks exercise the public surface. The branch also carries the exact canonical timer-recovery blob so the earlier stacked timer bug cannot be reintroduced.
Some checks failed
CI / test (pull_request) Failing after 17s
This pull request has changes conflicting with the target branch.
  • plugins.json
  • plugins/zara-healthcheck/lib/zara_healthcheck/domain.py
  • plugins/zara-healthcheck/test/test_healthcheck.py
  • plugins/zara-timers/lib/zara_timers/domain.py
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin rage/19-healthcheck:rage/19-healthcheck
git switch rage/19-healthcheck

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff rage/19-healthcheck
git switch rage/19-healthcheck
git rebase main
git switch main
git merge --ff-only rage/19-healthcheck
git switch rage/19-healthcheck
git rebase main
git switch main
git merge --no-ff rage/19-healthcheck
git switch main
git merge --squash rage/19-healthcheck
git switch main
git merge --ff-only rage/19-healthcheck
git switch main
git merge rage/19-healthcheck
git push origin main
Sign in to join this conversation.
No description provided.