Skip to main content

Module runner

Module runner 

Source
Expand description

The run orchestrator (TECH-SPEC §1, §12; ADR-0007): scenario-per-OS-thread, --jobs-bounded, cooperative cancellation at batch boundaries, and a heartbeat watchdog that abandons over-budget scenario threads (recording a System failure and detaching — the process reaps them at exit).

Scenarios prepare lazily at dispatch time: ${global:key} reads happen at lower time of the scenario (ADR-0005), so lowering + emission run inside the scenario thread against a snapshot of the shared global store; saveAs: global promotions merge back through the store lock when the scenario ends.

Clock note: the pipeline stays clock-free (core purity); the orchestrator’s monotonic-clock use is confined to budget enforcement and never enters events (durations are engine-measured).

Structs§

Prepared
A scenario ready to execute.
RunConfig
Run-level configuration.
RunSummary
Aggregate result of a run.
ScenarioOutcome
One scenario’s outcome.
ScenarioSpec
Everything a scenario needs at dispatch time. Built by the CLI edge from owned/Arced data so scenario threads are 'static (abandonable).

Enums§

Fault
A non-test fault attributed per ADR-0009.

Functions§

run
Execute specs and return the summary. Emits the full event stream on events (RunStartedRunFinished — ADR-0008).

Type Aliases§

PrepareFn
The dispatch-time preparation: World snapshot in, batches + artifact out.