Skip to main content

Module substrate

Module substrate 

Source
Expand description

Substrate Pass — orchestrates the Data layer’s self-maintenance work.

Per CLAD’s enriched doctrine, the Substrate Pass runs around the command path (Control → Agent → Lane → Data), not inside it. It is invoked by the Scheduler at well-defined points in the tick:

  • [khora_data::ecs::TickPhase::PreSimulation] before any agent simulates,
  • [khora_data::ecs::TickPhase::PostSimulation] before extraction,
  • [khora_data::ecs::TickPhase::PreExtract] right before Flows project,
  • [khora_data::ecs::TickPhase::Maintenance] at the end of the tick.

The pass discovers DataSystemRegistration entries via inventory, orders them by runs_after (topological sort) with order_hint as a tie-breaker, and invokes them sequentially.

Re-exports§

pub use flow_runner::run_flows;

Modules§

flow_runner
Flow runner — executes every registered Flow during the Substrate Pass and publishes their Views into the LaneBus.

Functions§

run_data_systems
Runs every [DataSystemRegistration] declared for the given phase, in a stable order: topological by runs_after, then by order_hint, then by name for full determinism.