feat(seedling): doctor healthcheck via the OI API (SDH)#689
Open
dannash100 wants to merge 6 commits into
Open
Conversation
- read the daemon's key strictly read-only instead of load_or_generate, which could create a fresh key at the daemon's path if the file vanished between the existence check and the load - report missing fields in daemon responses as broken per SDH, instead of failing (proxy/resolver "unknown") or silently passing (apps defaulting to zero total) - pin seedling-protocol to the v0.3.0 tag it was already locked at
dannash100
marked this pull request as ready for review
July 16, 2026 22:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TAM-6872. On a seedling host,
bestool tamanu doctorgathers seedling-specific health from the local seedling daemon's OI control interface and folds it into the sweep, so it rides to Canopy like every other check.Spec
SDH(.workhorse/specs/seedling/healthchecks.md): when the seedling checks apply, that the daemon is the source of truth (OI, not the DB), and the subsystems reported — reverse proxy, DNS resolver, managed apps. Cross-refsDOCfor the shared doctor mechanics.Implementation
Three host checks in
crates/alertd/src/doctor/checks/seedling.rs—seedling_proxy,seedling_resolver,seedling_apps— sharing a single OI query resolved once per sweep:SEEDLING_DATA_DIR+ the daemon'soi.keypresent), skips otherwise;oi.fingerprintfile (falling back to a strictly read-only parse ofoi.keyfor daemons that predate it) and connects to127.0.0.1:7891over the OI (QUIC + raw-key mTLS, viaseedling-protocol, pinned atv0.3.0);/infra/status(proxy/resolver) +/server/status(apps): proxy/resolver down → fail, apps partially up → warning, daemon unreachable/unauthorised or response missing expected fields → broken, no seedling → skip.cargo check/fmt/clippyclean; alertd test suite passes.