Skip to main content

assert_portable_component_graph

Function assert_portable_component_graph 

Source
pub fn assert_portable_component_graph(
    ir: &Value,
) -> Result<(), PortabilityError>
Expand description

Portability Guard for a component-graph IR (scp-ir-architecture.md §5), operating on the raw serde_json::Value IR (P0-2). Enforces, fail-closed:

  1. component (componentRef / map) is a string catalog reference only.
  2. every Expression-IR node in ports / output / map.over / cond uses only the known operator closed set (PORTABLE_EXPR_OPERATORS).
  3. any type annotation (outType / outputType, bc#44 B0) matches the portable type-notation closed set (§5.2). Annotations are additive: an IR without them validates identically to before B0.