Hwaro::Services::Doctor
Inherits Reference / Object
Constants
Delegate to ConfigSnippets for the single source of truth
Sections that are advanced/niche or low-value for most users. These are now treated as opt-in by default (not auto-suggested in normal doctor, and not added by plain --fix unless the user explicitly wants them).
Goal: Reduce config bloat and the "you should add all these things" pressure.
Mirrors MarkdownConfig#initialize defaults — only katex/mathjax
render math at runtime; other strings load nothing.
Constructors
Instance methods
Apply real fixes (Phase 1: value corrections like base_url trailing slash) and optionally approve/add recommended config sections (Phase 2).
- apply_value_fixes: Phase 1 value corrections.
--fixand--fullenable this; a bare--approvemust NOT edit real values — the documented model is "--fix normalizes, --approve adds sections". - approve_sections: When true, doctor will add the recommended/optional
config sections as commented documentation (
--approve/--full).
This separation makes --fix focused on corrections, while --approve / --full controls bringing in the larger set of recommendations.
Returns the list of config section keys missing from the user's config.toml.
On I/O or TOML parse failure, returns an empty array — those paths are
already reported by check_config as classified issues, so silent-empty
here lets the main run loop carry on without double-reporting. Callers
that need a clearer signal (e.g. fix_config) should probe the file
directly via readable_config_toml / parse_config_toml.