Skip to main content

Module doctor

Module doctor 

Source
Expand description

mushroomdb doctor — verify an install end to end: the config entry, the store, the hooks, and a real stdio handshake with the configured MCP command.

§Design

Every check reads what is actually on disk — the same files install wrote — rather than recomputing what an install should look like, so doctor catches drift (a hand-edited config, a stale command) that a run_install_with re-derivation would paper over. Checks run in a fixed order and each prints exactly one line: ok|warn|fail <name> <message>, with a trailing fix: … when there is something to run. The same store state always produces the same output.

fail on any check is the only thing that sets the process exit code; warn is informational.

Structs§

DoctorOpts
Options parsed from mushroomdb doctor [flags].
DoctorReport
Outcome of mushroomdb doctor: the rendered report and whether to exit 1.

Functions§

run_doctor
Run doctor against the real environment: HOME and the process PATH.
run_doctor_with
Like run_doctor, with the external environment (PATH) supplied by the caller. Tests use this to stay deterministic and to point npx lookups at a directory of stand-ins.