Expand description
fz doctor (issue #8): harness validity, lockfile consistency and the
portable-SQL lint. It re-asserts the contract-version rule (issue #17)
and the production abuse-port rules (issues #13/#102/#133) — the same
checks Harness::build enforces at initialization, kept visible here
for operator tooling.
Output comes in two disciplines (harness #140). Without --json the
doctor is prose: warnings on stderr, every failure joined into one
message, byte-for-byte as it has always been. With --json it prints
exactly one JSON object to stdout — schema, ok and the failures,
each with its stable code from crate::codes — and nothing else,
so an agent can parse the verdict without screen-scraping.
Structs§
- Doctor
Failure - One failed doctor check: its stable code from the catalogue
(
crate::codes) plus the human message, which is byte-identical to the prose path’s. - Doctor
Report - The outcome of a doctor run: every failed check, in check order.
Constants§
- REPORT_
SCHEMA - The
schemafield of thefz doctor --jsonobject (harness #140): consumers branch on it, so it only ever grows.
Functions§
- doctor
- Runs every doctor check.
allow_no_captchadowngrades the production-captcha failure to a printed warning for the stated reason (issue #13). - doctor_
json - Runs every doctor check under
--jsondiscipline (harness #140): prints exactly one JSON object to stdout —schema,ok,failureswith their stable codes — and nothing else, then reports the verdict as the exit code. - doctor_
report_ json - The doctor’s checks under
--jsondiscipline, without printing — the exact reportdoctor_jsonserializes, for tests and future consumers. Operator warnings are suppressed, as--jsonpromises.