Skip to main content

Module doctor

Module doctor 

Source
Expand description

faucet doctor — preflight probes for every connector in a config (#126).

Expands the config, builds each root invocation’s source / sink / state store, and runs their non-mutating check() probes concurrently (bounded by a semaphore, each wrapped in a per-probe timeout). Prints a green/red checklist (or --json) and exits with the number of failed probes (clamped to 255).

Child invocations are listed but not probed: their configs depend on parent records that only exist at run time (same limitation as faucet preview).

Structs§

InvocationOut
One expanded invocation and its probes (the --json per-invocation shape).
LintFinding
One static-lint finding: a severity, a short stable code, a message, and a fix hint.
ProbeOut
A single probe enriched with the role + connector it came from. This is the --json shape for each probe.

Enums§

LintSeverity
Severity of a static config-lint finding.

Functions§

count_failures
Total number of failed probes across all invocations.
probe_invocation
Build the three connectors for one invocation and run their probes. When an sla: block is configured, sla carries the spec plus the invocation’s base state key so the persisted SLA history can be probed read-only (staleness vs max_staleness_secs, volume-baseline warm-up).
probe_lineagelineage
Probe the pipeline-wide lineage: transport reachability, returning a single-probe invocation (or None when no lineage: block is configured). A failed probe is diagnostic only — lineage emission never blocks a run.
probe_roots
Probe every root invocation’s source/sink/state concurrently (bounded). Child invocations are skipped — their configs need parent records. Reused by faucet doctor and serve’s doctor_first preflight. sla / pipeline_name come from the top-level config; when set, each root also gets read-only SLA staleness/baseline probes against its state store.
redact_invocations
Scrub resolved secrets out of every probe reason / hint.
run
Execute the doctor subcommand.