Skip to main content

Module doctor

Module doctor 

Source
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§

DoctorFailure
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.
DoctorReport
The outcome of a doctor run: every failed check, in check order.

Constants§

REPORT_SCHEMA
The schema field of the fz doctor --json object (harness #140): consumers branch on it, so it only ever grows.

Functions§

doctor
Runs every doctor check. allow_no_captcha downgrades the production-captcha failure to a printed warning for the stated reason (issue #13).
doctor_json
Runs every doctor check under --json discipline (harness #140): prints exactly one JSON object to stdout — schema, ok, failures with their stable codes — and nothing else, then reports the verdict as the exit code.
doctor_report_json
The doctor’s checks under --json discipline, without printing — the exact report doctor_json serializes, for tests and future consumers. Operator warnings are suppressed, as --json promises.