Skip to main content

Module validate

Module validate 

Source
Expand description

Shape validators for WorkloadSpec.

Called by clients (desktop, agent, CLI) before sending a spec over RPC. Sync, no I/O. Returns Ok(warnings) on pass or Err(ShapeError) on the first hard constraint violation.

Layers: shape (this file, no I/O) → semantic (yubaba-side, R090-F3) → environment (deploy-time, R090-F4).

Structs§

ContextError
Transient error from a ValidationContext lookup.
ShapeWarning
A soft check that passed but may indicate misconfiguration.

Enums§

FieldPath
Identifies the field that caused a shape error or warning.
MeshError
Failure surface for MeshResolver lookups.
SemanticError
A semantic constraint violation: the spec references a resource that is not known to the cluster at validation time.
ShapeError
A hard constraint violation that makes a spec impossible to deploy.
WorkloadValidationError
Top-level validation error spanning both shape and semantic layers.

Traits§

MeshResolver
Resolve crate::EnvValue::FromMesh references to literal env values.
ValidationContext
Read-only view of yubaba state used for semantic validation.

Functions§

all
Run shape then semantic validation in the correct order.
resolve_env_from_mesh
Render every EnvValue::FromMesh entry in env to a EnvValue::Literal using resolver; pass through Literal and FromSecret values unchanged.
semantic
Run semantic validation — requires yubaba state via ValidationContext.
shape
Run shape validation — sync, no I/O.
shape_static_asset
Shape-validate a kind = "static-asset" workload.