Skip to content

Consolidated multi-source checks view (spec B)#386

Open
passcod wants to merge 14 commits into
mainfrom
spec-b
Open

Consolidated multi-source checks view (spec B)#386
passcod wants to merge 14 commits into
mainfrom
spec-b

Conversation

@passcod

@passcod passcod commented Jul 21, 2026

Copy link
Copy Markdown
Member

🤖 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

  • One classifier. HealthState::from_results is the single rollup rule (worst-of over effective results); health_from_check_state and both consolidated readers route through it. The dead single-source Status::health_state / health_state_ignoring and their raw/legacy branch are removed.
  • Consolidated read, two entry points. issues::consolidated_checks_latest builds a server's current checks across all sources from the issues table (the live server-detail table + headline consume this); consolidated_checks_at reconstructs the same shape as of a point in time from status history, re-grading each source's most-recent report through current policy.
  • Silences cap to skipped. A scoped silence is a ceiling of 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.
  • Wire shape. servers/get_detail gains checks: ConsolidatedChecks; the single-source healthy / health fields leave ServerLastStatusData. statuses/snapshot returns the consolidated shape, and its raw-payload panel is now keyed by source ({ [source]: { … } }) rather than one source's blob.
  • Frontend. ServerDetail and StatusSnapshot render 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.

passcod added 14 commits July 21, 2026 14:09
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant