Skip to main content

run_workload_headless

Function run_workload_headless 

Source
pub async fn run_workload_headless(
    args: &[String],
) -> (ExecutionOutcome, Result<(), String>)
Expand description

Run ONE workload headless inside its own ExecutionContext: route the run’s lifecycle + log through a HeadlessObserver (no display surface), then return the captured ExecutionOutcome alongside the run result.

This is the building block that proves the de-globalized run path works inside a scoped context — the run’s observer/scene-tree/stop resolve to the execution’s own (task-local), and the propagated per-cycle fibers (SRD-88 fiber propagation) carry the context end-to-end.

Single-execution headless helper: lets run_with_observer create its own session. To run N executions CONCURRENTLY against ONE shared session, use crate::runner::run_executions (the session-tier harness: one SessionHost, forked under a ScheduleSpec/semaphore, each execution deriving its own exec_id under the shared session). The bespoke task-based run_executions_concurrent that used to live here was a DUPLICATE concurrency path (SRD-02 One Concurrency Path) and has been retired in favour of run_executions.