You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
api: validate manifests with k8s declarative validation #726
Manifest validation is hand-written in internal/apivalidation: each rule is Go code plus test rows, kept apart from the field it checks. Agent Substrate uses Kubernetes declarative validation instead: most of its rules are +k8s: tags on the proto fields, and validation-gen generates the checks (guide).
Why change it:
A simple rule (required, name format, range, list size) becomes one line next to the field. Many input fields have no check today, for example metadata.labels, spec.env, spec.commands, and the MCP and Model fields, and no list has a size limit.
Gateway egress rules are Substrate's types and already carry its tags, so the rules Substrate declares that way can be generated instead of copied by hand (TODO: Validate everything that Substrate validates in ValidateGateway).
A request gets every problem back with its field path, not only the first one.
Proposal: declare validation rules as tags in the .proto files and generate the checks with validation-gen. Rules a tag cannot express stay hand-written.
Error messages change format, and their field paths use proto names (ate_template, not ateTemplate).
Activity
api: validate resource names with k8s declarative validation (#762)