Skip to main content

Module doctor

Module doctor 

Source
Expand description

keel doctor — the honesty report (dx-spec §2).

Three questions, answered from files (no program run):

  1. Coverage. What’s wrapped (observed in .keel/discovery.db), what’s visible-but-unwrapped (found by the static scan, never seen at runtime), and what’s invisible (an effect library with no adapter — Keel can’t wrap what it can’t see).
  2. Adapters. A registry of the known adapter set, each pinned (contract- tested against a version) or best-effort, annotated with what was detected.
  3. Policy. keel.toml validated against the typed model (keel_core_api::policy::Policy); on error, the exact field path.
  4. Journal. Where the journal lives, resolved the way the engine resolves it at configure time (journal key, else .keel/journal.db). A location this build has no backend for (postgres://) is an error finding: the app will fail to configure with KEEL-E005.

Every finding carries a suggested action, and the whole thing has a --json twin. An invalid policy — or a journal backend this build cannot provide — exits EXIT_USAGE; otherwise 0.

Functions§

preflight_advisory
A one-line advisory for keel run’s pre-exec preflight step (dx-spec’s “before any calls fire” — a static scan of the whole source tree, run by the Rust CLI before the target process even starts, sees this more faithfully than hooking the Python/Node in-process bootstrap could: that bootstrap runs before the target script’s own imports execute, so it could not actually see them yet). None when there’s nothing to warn about — never runs keel doctor’s full report, just the one check that’s cheap and relevant at this point.
run
Run keel doctor for project.