Expand description
Load-time authoring lints for semantic surfaces serde cannot check (SRD-83 follow-up). Runs once at workload load — before any phase dispatch, dryrun included — per the dryrun-as-validation-floor doctrine and “never ignore silently”.
Three checks:
- Error-router specs parse. Every
errors:spec — phase-level and op-level — goes through the real [ErrorRouter] parser, so a bad verb or regex is a load error naming its phase/op instead of a first-error-at-runtime surprise. Specs carrying{param}interpolation are skipped here (they resolve later and are parsed again at scope init). - Error-router catch-all lint. An error class matching no rule
falls through to
stopwith only an eprintln; a router without a literal.*rule therefore has a silent fall-through mode. One warning per such spec. - Metric-family lint.
metric('family, …', 'stat')andmetric_window(…)selectors insidestop_when,continue_if, and phasepoll.untilpredicates read 0.0 SILENTLY when the family never registers — a typo’d family makes a coordination gate pass instantly or hang to its timeout. Family tokens are checked against the built-in activity instrument namespace plus every phase-declaredmetrics:name. Unknown families WARN rather than fail: adapter counters and relevancy families are registered at runtime and are not statically knowable.
Hard failures come back as Err; warnings come back as strings for
the caller to route through diag! (keeps this module pure and
directly testable).
Functions§
- lint_
workload - Run every lint over the loaded workload.
Ok(warnings)— the run may proceed, with each warning routed to the operator;Err— a spec is malformed and the load fails.