Skip to main content

Module authoring

Module authoring 

Source
Expand description

Authoring-time validation: checking a workflow definition before it reaches EngineBuilder::build.

The engine’s own enforcement — parse, Workflow::validate, and LoopConfig::validate — all fires when the engine is built. For a host that stores definitions and builds one engine over many of them, that is the wrong time (one bad row aborts the whole build, at reload, for every workflow in the process), the wrong shape (one stringly error, so an authoring API cannot point a 400 at tasks[1].tasks[0].id), and the wrong cardinality (fail-fast, so the author fixes one violation per round trip).

Workflow::validate_authored answers all three, and carries one guarantee:

It returns empty if and only if the JSON parses into a Workflow and that workflow validates.

That biconditional is true by construction, not by keeping a rule list in sync — see the stages below.

Structs§

WorkflowIssue
One problem with a workflow definition.

Enums§

IssueCode
What a check found wrong with a workflow definition.
Severity
When an issue bites: at build, at the first message, or never.