Skip to main content

Module dev

Module dev 

Source
Available on crate feature cli-dev only.
Expand description

faucet dev — a watch-and-diff authoring loop (#283, cli-dev feature).

Re-runs a bounded sample through the offline pipeline harness (pipeline_test::run_case — transforms → quality → contract, zero real sink writes) on every config save and prints the resulting schema, quality/DLQ counts, errors, and a diff vs the previous run. Fast and offline by default (--sample <fixture>); --live --limit N pulls a capped, read-only sample from the real source instead.

Only the filesystem-watch glue touches the OS; the decision logic (diff_records, referenced_paths, should_refire) is pure and unit-tested.

Structs§

RecordDiff
A record-level diff between two runs’ output.

Functions§

diff_records
Diff two output record sets by their canonical JSON (order-insensitive).
referenced_paths
Shallowly extract the paths a config references so we can watch them too: extends: targets (string or list) and !include <path> tags. Relative paths resolve against dir. Pure over (dir, text).
run
Execute the dev subcommand.
should_refire
Leading-edge debounce: fire only if at least min_gap has elapsed since the last fire. Pure.