Expand description
Workflow primitive-structure projection: the graph model and bounded Gleam regeneration (a projection of the typed source, never authoritative). Workflow structure projection: a graph model derived from the typed source.
A workflow is a typed function over a small, known vocabulary
(run / all / race / map / spawn / receive / sleep / timers), so
its primitive structure can be projected from the entry-module Gleam source
into an ordered node/edge graph automatically (C21, C23). Each node carries a
CorrelationKey so a consumer (the dashboard canvas, RM-007) can overlay a
run’s recorded events onto the graph (C22). A bounded structural delta
regenerates Gleam that still type-checks (C24).
The graph model is a projection, never the authoritative artifact: the typed Gleam module remains the single source of truth (ADR-014, CN6). This module delivers the data model and the regeneration only — the rendered canvas UI and the live overlay are deferred to RM-007.
Structs§
- Graph
Edge - A directed edge between two nodes.
- Graph
Node - A single node in the workflow graph.
- NodeId
- Stable identifier for a node within one extracted graph.
- Violation
- A single flagged non-deterministic call site reachable from workflow code.
- Workflow
Facts - The facts the test-scaffold generator derives from a workflow’s source.
- Workflow
Graph - A workflow’s primitive structure as an ordered node/edge graph.
Enums§
- ArmLabel
- Which arm of a
Branchnode a branch edge belongs to. - Correlation
Key - The per-node identity a consumer maps recorded events onto.
- Determinism
Error - Errors raised before analysis can run.
- Edge
Kind - The relationship a directed edge expresses between two nodes.
- Facts
Error - Errors raised while reading workflow facts from source.
- Node
Primitive - The workflow primitive a node represents.
- Structural
Delta - A bounded structural edit to a workflow graph.
- Structure
Error - Errors produced while extracting a workflow graph model from a package or regenerating Gleam from a bounded structural delta.
- Violation
Kind - Whether a flagged call reads the wall clock or draws entropy.
Functions§
- analyze_
determinism - Analyses
sourcefor wall-clock and entropy calls reachable fromentry_function, following local helper calls. - extract_
structure - Extracts the workflow graph model from a loaded package.
- extract_
workflow_ facts - Reads the
WorkflowFactsfrom a workflow’s entry-module Gleamsource. - regenerate_
gleam - Applies a bounded structural delta to
graphand regenerates a complete, self-contained Gleam workflow module that still type-checks againstaion_flow(C24).