Skip to content

lifecycle.mdx names two of the three health-check entry names — the exception path's "health-check" is missing #11823

Description

@os-steve

Found while implementing #11811 (the sibling TypeScript example in the same
section). Out of that card's scope — its dispatch ruled the PluginHealthReport
block byte-frozen, since PR #11812 had just corrected it field by field, so this
is filed rather than fixed.

What was measured

content/docs/protocol/kernel/lifecycle.mdx:745, in the paragraph below the
PluginHealthReport JSON block, makes an enumeration that presents itself as
exhaustive:

Each entry is named after the plugin's configured checkMethod, or
"plugin-loaded" when a plugin configures none.

packages/core/src/health-monitor.ts pushes a check entry from three places,
not two:

#sourceentry namewhen
1:119 / :121config.checkMethodthe custom check returned
2:125'plugin-loaded'no checkMethod configured, or it does not resolve to a function
3:173'health-check'the check threw — including a timeout overrun, which raceCheckTimeout surfaces as a throw

The doc covers 1 and 2. The third is the literal 'health-check' at :173,
inside the catch (error) at :166:

checks.push({name: 'health-check',status: 'failed',message: message});

It is not a variant spelling of either documented name — it is a fixed string
that matches neither the configured checkMethod nor 'plugin-loaded'.

Why it is worth a card

The exception path is the one a reader is most likely to be staring at a report
from: it is what a timeout and any throwing check produce. Its entry is also the
only one accompanied by the report's status: 'failed' (set at :167 with no
failureThreshold accumulation, unlike returned failures, which pass through
degraded first at :150-164). So the reader debugging the most alarming report
the monitor emits finds an entry name the page says cannot occur.

The paragraph is accurate about everything else it claims, and this is one
missing row rather than a wrong one — hence finding rather than a defect
report.

Not asserting more than was checked

Only the checks[].name enumeration in that one paragraph was compared against
health-monitor.ts. The rest of the paragraph (the passed | failed | warning
vocabulary, metrics.uptime in milliseconds, the absent version field, the
unset schema fields) was verified correct in PR #11812 and is not in question
here. No other page was examined.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions