Skippr is now Manifold.

Skip to content

mfd doctor ​

mfd doctor checks your configuration before you run anything long. It loads mfd.yml, resolves every ${NAME} reference, and checks that each pipeline has a source and that every reference between pipelines and entries resolves. It does not connect to your source or destination, so it is fast and safe to run anywhere: after editing the config, in CI on every change, or as the first step of a deploy. Omit --pipeline to check every pipeline in the file. Pass --pipeline <name> to check that pipeline only. PIPELINE_NAME does not change the default.

Usage ​

python
import mfd

session = mfd.Session(mfd.Config.discover().get_pipeline("bikehire"))
result = session.doctor()
print(result["ok"])
bash
mfd doctor [--pipeline <name>] [--output text|json] [--config <path>]

Options ​

FlagDefaultDescription
--pipeline <NAME>every pipelineCheck this pipeline only. Omit to check the whole file.
--output <MODE>texttext prints one line per check. json prints {"ok": bool, "checks": [...]} for scripts.
--config <PATH>./mfd.ymlConfig file to check.
--log [LEVEL]OffPrint logs to stderr.

See CLI overview for the other global flags.

What doctor checks ​

CheckPasses when
Config loadsmfd.yml parses and every ${NAME} reference has a value. If not, doctor stops with [mfd] config failed: ... before running other checks.
PipelinesAt least one pipeline is configured.
Sourcesdata_sources is not empty.
DestinationsAlways passes. A pipeline without a data_sink is valid: its data stays in the WAL.
Each pipelineIts data_source, data_sink, and other references point at entries that exist, and the source format and mode are legal.
Whole configNo two ManifoldLake or DuckDB destinations write the same namespace.
Storage modeReports mfd_el_storage_mode for each pipeline.

Doctor validates configuration only. To test credentials and connectivity, run mfd discover, which reads the source but never writes to the destination.

A missing ${NAME} variable fails while the config loads, before doctor runs: the CLI prints [mfd] config failed: ... and exits 1. Python raises ValueError when you construct Session, so doctor() never runs. A dangling data_sources.foo is a failed doctor check on the CLI; in Python it is also ValueError at Session(...), because a Session is bound to one pipeline that must already resolve.

Examples ​

Check the config in the current directory ​

bash
mfd doctor
text
  [ok]   1 pipeline(s) configured
  [ok]   data_sources configured
  [ok]   data_sinks configured (optional)
  [ok]   pipeline 'bikehire' (source+sink)
  [ok]   mfd_el_storage_mode=local

All checks passed.

A failing check is marked [FAIL] and the summary reads Some checks failed.

Check one pipeline ​

bash
mfd doctor --pipeline bikehire

Omit --pipeline to check every pipeline in the file.

JSON for CI ​

bash
mfd doctor --output json
json
{
  "ok": true,
  "checks": [
    { "ok": true, "severity": "info", "message": "1 pipeline(s) configured" },
    { "ok": true, "severity": "info", "message": "data_sources configured" },
    { "ok": true, "severity": "info", "message": "no data_sink; WAL is the dataset" },
    { "ok": true, "severity": "info", "message": "pipeline 'rides' (source, WAL-only)" },
    { "ok": true, "severity": "info", "message": "mfd_el_storage_mode=local" }
  ]
}

Each check has ok, severity (info or error), and message. A check may also include suggested_fix_command.

Fail a CI job on a bad config ​

bash
mfd --config deploy/mfd.yml doctor --output json > doctor.json || {
  jq -r '.checks[] | select(.ok == false) | .message' doctor.json
  exit 1
}

Doctor needs every ${NAME} variable to be set, so export your secrets (or test placeholders) in the CI job first.

Troubleshooting ​

OutputCauseFix
[mfd] config failed: ... references ${NAME} at ... but that environment variable is not setA secret reference has no value.export NAME=..., or add it to a .env file next to mfd.yml.
[FAIL] no pipelines configured and [FAIL] data_sources is emptyDoctor found no config file, or the file is empty.Run from the folder that contains mfd.yml, or pass --config.
[mfd] config failed: Invalid Manifold configuration in ...mfd.yml has a YAML error or an unknown key.Fix the line named in the message.

Exit codes ​

CodeMeaning
0All checks passed.
1At least one check failed, or the config could not be loaded.

Next steps ​