inspect: resource health verdict, distinct from drift (#26) - #39
Merged
Merged
Conversation
Drift answers "does live match source?"; health answers "is the live resource well?" — a node can be managed yet degraded (CFN ROLLBACK_COMPLETE, k8s CrashLoopBackOff). Classify the observed status (chant #862, already in 0.18.9) into healthy / progressing / degraded / unknown and show it, coloured, atop the observed section. - src/health.ts: classifyHealth(status) — substrate-agnostic token heuristic (degraded tested before healthy so ROLLBACK_COMPLETE isn't "complete"). Unit-tested across CFN/k8s states; unknown is never fabricated. - server: /api/diff/:node returns a derived `health`. - web: coloured health line in the observed section (+ --degraded theme colour). No chant release needed — reuses observed.status from #862. tsc + 42 tests (+4). Graph-level health badge (status on every overlay node + pinhole rendering) is a possible follow-up; this closes the inspect-level verdict.
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.
Closes #26 (epic #23).
Drift (managed/foreign/pending) answers "does live match source?"; health answers "is the live resource well?" — a node can be managed yet degraded (a CloudFormation
ROLLBACK_COMPLETE, a k8sCrashLoopBackOff).Classifies the observed
status(chant #862, already in 0.18.9) into healthy / progressing / degraded / unknown and shows it, coloured, atop the observed section — so a managed-but-unhealthy resource is visually distinct from a healthy one.src/health.ts—classifyHealth(status): substrate-agnostic token heuristic (degraded tested before healthy soROLLBACK_COMPLETE≠ "complete"). Unit-tested across CFN/k8s states;unknownis never fabricated (absent when the substrate reports no status)./api/diff/:nodereturns a derivedhealth.--degradedtheme colour).No chant release needed — reuses
observed.status. tsc + 42 tests (+4 health).Note
Graph-level health badge (status on every overlay node + pinhole rendering, without clashing with the drift colours) is a possible follow-up; this closes the inspect-level verdict per the acceptance criteria.