Conversation
HealthState::from_results (commons-types) is the single worst-of rollup over effective results; health_from_check_state now routes through it instead of its own inline match.
ConsolidatedCheck / ConsolidatedChecks (source, observed, effective, silenced, detail + rolled-up HealthState) shared by the live and snapshot presentation paths.
Returns a server's current checks across every source with observed/ effective results, detail, and silenced flag (most urgent first), excluding decommissioned checks; the health rollup reuses health_from_check_state so it matches the headline. The live side of the consolidated checks view.
consolidated_checks_at reconstructs each source's most recent report at- or-before a time and re-grades every check through current policy. The snapshot endpoint returns this consolidated shape (health_state + per- source graded checks with silenced flags) in place of the single-source health[]/check_results/health_state. StatusSnapshot panel rewritten to render it (source column, effective-result icons, per-source extras). Snapshot tests updated + a multi-source merge test.
get_detail returns ConsolidatedChecks (all sources, graded/silenced/ detail) alongside the health rollup; ServerLastStatusData drops the single-source healthy/health fields. The React checks table renders every source's checks, coloured by effective result, with a source column and per-source detail — matching the snapshot panel.
The consolidated readers are now the only health rollup; the per-status Status::health_state / health_state_ignoring methods (and their test) had no remaining callers.
A scoped silence is a ceiling of skipped; the live consolidated reader now applies it so the effective result matches the health rollup (which excludes silenced checks) and the snapshot path (which re-grades through apply_scoped). Observed keeps the reported result.
The issues detail column stores the full health entry, so rendering it raw surfaced check/result/healthy as key-value noise. Route both the server-detail table and the snapshot panel through checkEntryExtras, as the old single-source table did.
Cover multi-source merge (each check labelled with its source) and keep the existing sort/silence/extras/documentation assertions green against the consolidated ConsolidatedChecks shape.
consolidated_checks_at now returns each source's status-level extra keyed
by source ({[source]:{…}}), so the snapshot's raw-payload panel stays
attributed across a multi-source snapshot instead of showing one source's
blob. Empty payloads are omitted.
Silences clippy's type-complexity lint on the two check-state selects added/edited in this PR, as the lint itself suggests.
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.
🤖 Implements the CHK "Presentation" requirement: wherever a server's checks are shown — live or as of a past time — every source's checks appear together, graded and rolled into the server's health by the same rules used everywhere else.
What changes
HealthState::from_resultsis the single rollup rule (worst-of over effective results);health_from_check_stateand both consolidated readers route through it. The dead single-sourceStatus::health_state/health_state_ignoringand their raw/legacy branch are removed.issues::consolidated_checks_latestbuilds a server's current checks across all sources from theissuestable (the live server-detail table + headline consume this);consolidated_checks_atreconstructs the same shape as of a point in time from status history, re-grading each source's most-recent report through current policy.skipped; the live reader now caps a silenced check's effective result accordingly, so the checks table, the health rollup, and the snapshot all agree even before the next push re-grades.servers/get_detailgainschecks: ConsolidatedChecks; the single-sourcehealthy/healthfields leaveServerLastStatusData.statuses/snapshotreturns the consolidated shape, and its raw-payload panel is now keyed by source ({ [source]: { … } }) rather than one source's blob.ServerDetailandStatusSnapshotrender the consolidated list — source column, coloured by effective result, per-check detail (reserved keys stripped), silence controls per(source, check).Tests
Consolidated-latest merge + silence-capping (DB), get_detail/snapshot endpoint shape, multi-source snapshot with per-source extras (private-server it), and Playwright coverage for the server-detail table (multi-source) and the issue-row snapshot panel.