Skip to main content

Module structure

Module structure 

Source
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§

GraphEdge
A directed edge between two nodes.
GraphNode
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.
WorkflowFacts
The facts the test-scaffold generator derives from a workflow’s source.
WorkflowGraph
A workflow’s primitive structure as an ordered node/edge graph.

Enums§

ArmLabel
Which arm of a Branch node a branch edge belongs to.
CorrelationKey
The per-node identity a consumer maps recorded events onto.
DeterminismError
Errors raised before analysis can run.
EdgeKind
The relationship a directed edge expresses between two nodes.
FactsError
Errors raised while reading workflow facts from source.
NodePrimitive
The workflow primitive a node represents.
StructuralDelta
A bounded structural edit to a workflow graph.
StructureError
Errors produced while extracting a workflow graph model from a package or regenerating Gleam from a bounded structural delta.
ViolationKind
Whether a flagged call reads the wall clock or draws entropy.

Functions§

analyze_determinism
Analyses source for wall-clock and entropy calls reachable from entry_function, following local helper calls.
extract_structure
Extracts the workflow graph model from a loaded package.
extract_workflow_facts
Reads the WorkflowFacts from a workflow’s entry-module Gleam source.
regenerate_gleam
Applies a bounded structural delta to graph and regenerates a complete, self-contained Gleam workflow module that still type-checks against aion_flow (C24).