Skip to main content

Module execute

Module execute 

Source
Expand description

runtime/execute.rs — Kernel graph execution engine

Purpose:

  • Executes a validated expanded graph against registered primitive implementations (sources, computes, triggers, actions) within a supplied ExecutionContext.

Owns:

  • Topological execution ordering of nodes
  • Value propagation along wired edges
  • Type conversion between runtime value domains (trigger ↔ action)
  • Context key injection for source nodes
  • Parameter binding for compute and trigger nodes
  • Action skip/invoke gating (R.7)
  • Non-finite numeric output rejection (NUM-FINITE-1)

Does not own:

  • Graph validation (see validate.rs)
  • Primitive registration or catalog ownership (see catalog.rs)
  • Episode lifecycle or replay (see ergo-supervisor)

Connects to:

  • validate.rs — receives ValidatedGraph after validation
  • types.rs — uses ExecError, ExecutionReport, Registries
  • catalog.rs — queries primitive metadata for parameter binding

Safety notes:

  • All execution paths must remain deterministic for replay integrity
  • R.7: NotEmitted triggers must be caught by should_skip_action before reaching action value conversion; violation returns ExecError::ActionSkipViolation instead of panicking

Functions§

execute
execute_with_metadata