Skip to main content

Module validation

Module validation 

Source
Expand description

Result validation and relevancy measurement (SRD 47).

Provides ValidatingDispenser, a composable op dispenser wrapper that verifies operation results against expected values and computes information retrieval metrics (recall@k, precision@k, etc.).

Applied only to templates that declare verify: or relevancy: blocks — zero overhead for templates without validation.

Structs§

AssertionSpec
A single field assertion from a verify: block.
RelevancyConfig
Configuration for relevancy measurement on a single op template.
RelevancyLive
Live snapshot of a relevancy metric: window mean, all-time mean, how many scores have been recorded, and the current window size.
RunningAgg
Running aggregate per relevancy metric. Holds both the all-time running mean and a bounded sliding window so progress views can show recent trend alongside the cumulative average.
ValidatingDispenser
Op dispenser wrapper that validates results after execution.
ValidationMetrics
Metrics for result validation, shared across fibers.

Enums§

AssertionPredicate
Predicate for field assertion checks.

Constants§

CORE_OP_PARAMS
Closed vocabulary of op-template params: keys the runtime itself consumes (validation, batching, polling, op weighting, adapter selection). Joined at validation time with [crate::runner::KNOWN_PARAMS] (workload/CLI-level keys that get blast-merged into every op’s params during parse) and the adapter’s crate::adapter::DriverAdapter::known_op_params declarations to form the full allow-list. Unknown keys are rejected at op setup time so silent-ignore traps like evaluations: { relevancy: ... } (a wrapper key the runtime never reads) cannot hide a misconfigured op. Core op-template params consumed directly by the runtime or the adapter layer that are NOT owned by any wrapper. Wrapper fields (verify, poll, memo, readout, errors, tries, while, rate, fields, …) are deliberately absent: the op closed-vocabulary guard accepts them via crate::wrapper_registry::WrapperRegistry::owns_field, which derives the wrapper vocabulary structurally from each wrapper’s owned_fields declaration. Keeping them out of this list is the point — one source of truth per field, so adding a wrapper never requires editing here. The drift-guard test core_op_params_disjoint_from_owned_fields fails if a wrapper field creeps back in.
DEFAULT_RECALL_WINDOW
Default size of the moving-average window. Chosen to match the common recall@10 “last 10” semantic the user’s workloads expect.
WRAPPER_NAME
SRD-32a wrapper name for the validation layer. Exposed at the module level so other wrappers’ forbids_outer / requires_inner slices can reference it without depending on wrapper_registrations for the constant.