Module: Pangea::CLI::Reactivity

Defined in:
lib/pangea/cli/reactivity.rb

Overview

Reactivity graph — models typed “ask” relationships between workspaces in a constellation (e.g. pangea-architectures/workspaces/*).

arch-synthesizer emits a ‘reactivity:` block into each generated pangea.yml describing which upstream (layer, workspace, output) values this workspace asks for. This module parses those declarations across all sibling workspaces and exposes queries: upstream_of (workspaces this one asks from), downstream_of (workspaces that ask from this one), and `cascade_set` (the transitive closure in both directions — the set of workspaces that MUST plan/apply together when the user acts on one).

Topological ordering uses Kahn’s algorithm; cycles raise Reactivity::CycleError with the offending node set.

Defined Under Namespace

Classes: Ask, Graph, Workspace

Constant Summary collapse

CycleError =
Class.new(StandardError)
MissingWorkspaceError =
Class.new(StandardError)
ALLOWED_ACTIONS =

Orthogonal actions the workspace runs at every cascade visit. Restricted to the allowlist below to prevent conflict with the primary cascade command (plan/apply/destroy/deploy).

%w[synth output init].freeze
CONFLICTING_ACTIONS =
%w[plan apply destroy deploy].freeze
InvalidActionError =
Class.new(StandardError)