Docket.Runtime.Graph (docket v0.1.0-dev)

Copy Markdown View Source

Internal executable graph materialization produced by Docket.Graph.Compiler.

A runtime graph is ephemeral node-local derived state, never a durable graph format. Backend execution vehicles fetch the effective canonical Docket.Graph, compile it on the executing node, and may reuse this structure through a generation-scoped cache. Every runtime ID maps back to public graph intent through lowering.

Summary

Types

Runtime edge descriptor.

Output projection over a committed input or state channel.

t()

Types

edge_descriptor()

@type edge_descriptor() :: %{
  id: String.t(),
  channel_id: String.t(),
  from: [String.t()],
  to: String.t(),
  guard: Docket.Guard.t() | nil,
  barrier: boolean()
}

Runtime edge descriptor.

from is a list of public node IDs or ["$start"]; to is a public node ID or "$finish". barrier is true for edges declared with a list-form from (which may contain a single source). The descriptor is a private map so edge lowering can evolve without adding a public document type.

output_projection()

@type output_projection() :: %{
  id: String.t(),
  runtime_id: String.t(),
  source_channel: String.t(),
  schema: Docket.Schema.t() | nil
}

Output projection over a committed input or state channel.

t()

@type t() :: %Docket.Runtime.Graph{
  channels: %{optional(String.t()) => Docket.Runtime.Graph.Channel.t()},
  edges: %{optional(String.t()) => edge_descriptor()},
  graph_hash: String.t() | nil,
  graph_id: String.t(),
  id: String.t(),
  lowering: Docket.Runtime.Graph.Lowering.t(),
  nodes: %{optional(String.t()) => Docket.Runtime.Graph.Node.t()},
  outputs: %{optional(String.t()) => output_projection()},
  policies: map()
}