Squidie.Runs.GraphInspection (squidie v0.3.3)

Copy Markdown View Source

Compatibility graph inspection struct for workflow runs.

Squidie.Inspection.GraphInspection is the canonical inspection namespace. This module preserves the original Squidie.Runs.* return shape for existing callers while delegating projection logic to the canonical implementation.

Summary

Functions

Converts a canonical inspection graph into the compatibility struct.

Builds compatibility graph inspection data from a run snapshot.

Converts a compatibility graph into the canonical inspection struct.

Converts graph inspection data into a stable map for host UI serializers.

Types

source()

@type source() :: :read_model

t()

@type t() :: %Squidie.Runs.GraphInspection{
  anomalies: [map()],
  child_links: [map()],
  child_runs: [map()],
  current_node_id: String.t() | nil,
  current_node_ids: [String.t()],
  definition_version: String.t() | nil,
  dynamic_work: [map()],
  dynamic_work_overlays: [map()],
  edges: [Squidie.Runs.GraphInspection.Edge.t()],
  nodes: [Squidie.Runs.GraphInspection.Node.t()],
  run_id: String.t(),
  source: source(),
  status: atom(),
  terminal?: boolean(),
  workflow: module() | String.t() | nil
}

Functions

from_inspection_graph(graph)

@spec from_inspection_graph(Squidie.Inspection.GraphInspection.t()) :: t()

Converts a canonical inspection graph into the compatibility struct.

from_snapshot(snapshot, opts)

@spec from_snapshot(
  Squidie.ReadModel.Inspection.Snapshot.t(),
  keyword()
) :: t()

Builds compatibility graph inspection data from a run snapshot.

to_inspection_graph(graph)

@spec to_inspection_graph(t()) :: Squidie.Inspection.GraphInspection.t()

Converts a compatibility graph into the canonical inspection struct.

to_map(graph)

@spec to_map(t()) :: map()

Converts graph inspection data into a stable map for host UI serializers.