Scheduling & runs
Once a pipeline is deployed, the control plane executes it — on demand or on a schedule — over a durable, Postgres-backed job queue with a multi-worker pool.
Serving the control plane
Section titled “Serving the control plane”valved serve runs the supervisor: the FastAPI app, the cron scheduler, the crash-recovery reaper, the archiver, and a worker pool.
valved serve # everything in one processvalved worker # or run standalone workers that drain the queueWorkers claim jobs with optimistic-claim semantics, emit heartbeats (so the reaper can reclaim a crashed worker’s jobs after a missed-heartbeat threshold), retry transient failures with backoff, and write structured per-run logs. Supervisor-loop intervals are tunable in valved/runtime.toml.
On-demand runs
Section titled “On-demand runs”valved run <pipeline> --watch # enqueue a run and stream logs until it finishesvalved runs # recent runs (--limit, --pipeline)valved runs --recovery <run_id> # render a run's recovery-attempt chainvalved logs <run_id> # logs for a specific runYou can also run just the extract-load (dlt) half of a pipeline:
valved el run <name> --watchvalved el verify <name> # schema + smoke test, no data loadScheduling is data, not code
Section titled “Scheduling is data, not code”The live schedule lives in the schedules table, and valved schedule changes it instantly — no code change, no PR. Every change is audited in schedule_changes and takes effect on the next scheduler tick.
valved schedule listvalved schedule show <pipeline>valved schedule set-cron daily_revenue "0 3 * * *" --timezone America/New_Yorkvalved schedule pause daily_revenue --reason "investigating upstream outage"valved schedule resume daily_revenueset-cron upserts: if the pipeline has no schedule row yet it creates one (at the prod target unless you pass --target-pipeline), so a schedule is stood up end to end from the CLI. Bad cron expressions and unknown IANA timezones are rejected up front, before anything is written.
Load plausibility
Section titled “Load plausibility”A load that succeeds but is implausibly small never silently finalizes as a success. On every run, the runtime records per-resource actuals — rows loaded and each resource’s write disposition (replace / merge / append) — onto the run. After each successful load, it judges those actuals against an expectation:
- First successful run — actuals are compared against the plan’s own row estimates (the ones
valved planprinted). - Subsequent runs — actuals are compared against the previous successful run, disposition-aware:
replace/mergeresources are comparable run-over-run, but anappend/incremental resource is never compared against prior totals — an incremental run legitimately loads a tiny fraction of the first load. Once it has history, an incremental resource is judged only by an explicitly declaredmin_rowsfloor. - Graceful degradation — no estimates and no history means the actuals are recorded but no judgment is made. Missing inputs never block a run.
The consequence is graduated:
- Suspect — a moderate deviation (by default, actuals below half the expectation). The run still finalizes
success, but it’s marked with a⚠ suspectbadge invalved runsand a durablerun.suspectevent is emitted per tripped resource. - Implausible — a high-confidence trip (by default, a ≥10× collapse in a
replace/mergeresource, or first-run actuals far below the estimate). The run finalizesfailedwith an error carrying the stableImplausible loadprefix, and flows through the normal failure path: the schedule auto-pauses, an investigation records the diagnosis, and recovery classifies it as data-shaped — no automated code fix is attempted; check the source or extraction.
Thresholds, per-pipeline overrides, and the explicit opt-out live under [runner.plausibility] — see the configuration reference.
Observing
Section titled “Observing”Every run, log line, status transition, and cost number is queryable from any surface — CLI, REST, MCP, or the static UI. External agents can subscribe to run-completion webhooks. Roll up cost and success/failure with:
valved metrics ... # token→USD cost, run success/failure, per-agent usageWhen a scheduled run fails after exhausting retries, Valved’s recovery engine steps in — see Recovery.