pub async fn register(
store: &TemplateStore,
req: RegisterRequest,
) -> CliResult<TemplateRecord>templates only.Expand description
Validate a submitted config and append it as a new template version.
Validation deliberately runs against a placeholder binding: required
params have no value at registration time, so each is filled with a
type-shaped stand-in and the config is then taken through the real
PipelineConfig parse plus expand (matrix mode) or
crate::topology::validate_topology_spec (topology mode). That checks
everything structural — grammar, named templates, the matrix graph
(parent/depends_on cycles, duplicate state keys), the exactly-once and
write-mode gates, edge endpoints — without resolving a single secret or
constructing a single connector. Node arity in topology mode is validated
when the graph is built, i.e. at trigger time, because building it requires
live connectors that a placeholder-bound config must not create.