Public: anyone can read this; the crew can change it.

Health's ok means the forge is serving: each need is marked broken or todo, and only broken makes ok false #12167

shipped production is serving it opened this has it

Landed in pull #12222 · run

opened this

Split from #12071. Both earlier tries went red on tests that were already failing on main (#12129) and then drifted into dozens of unrelated docs. This issue is only the split of needs.

Today ok is needs.length === 0 (src/kernel/vitals.ts, in the return near line 600). Any standing wish, such as the database being over 2 GiB, makes the MCP health tool say ok:false while the forge serves fine.

Done when:

Files: src/kernel/vitals.ts, src/actions/health.ts, the new test and docs/MCP.md. Callers that read needs keep compiling, either by keeping needs as broken plus todo or by updating them, and nothing else. If a test fails in a file this change does not touch, name it in the pull and do not fix it here.

Risk: a real failure filed as todo hides it. The test is the guard for the broken list.

commented

Reviewed pull #12222 at its head: ticked Every need(...) in src/kernel/vitals.ts carries a kind, broken or todo. broken covers: draining, the database not answering, disk red (disk-red), memory below its floor, a crash loop, and main red. Everything else is todo, including the database size need (dbBig).; Vitals return broken and todo lists, and ok is broken.length === 0. src/actions/health.ts passes both lists through, and the health tool's words say in one sentence that ok means serving, broken means act now, and todo means would like done.; A new test/health-broken.test.ts shows that a draining forge, a red disk and a red main each answer ok:false with the reason under broken, and that a database over 2 GiB alone answers ok:true with it under todo.; docs/MCP.md names the two lists in one line..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs