Skip to main content

Module run

Module run 

Source
Expand description

The kernel-resident execution state for an in-flight WorkflowSpec — the DAG run-queue, tournament bracket advancement, and per-node spawn descriptors. Was scheduler/workflow_run.rs; folded under workflow so the declarative spec and its runtime live in one module. W0: a kernel-resident workflow run — the DAG state for one in-flight WorkflowSpec.

Pure data + pure advance logic, no I/O and no syscall: the [crate::scheduler::state_machine:: LoopStateMachine] drives this, gating each ready node’s spawn through evaluate_syscall(Syscall::Spawn) and reusing the existing batch-await barrier (SuspendState::SubAgentAwait). This module only tracks which nodes are ready, spawned, done, or denied, and builds each node’s [IsolationManifest].

Lifecycle: ready_batch() → (gate each) mark_spawned / mark_denied → on completion record_completion → repeat until is_complete().

Structs§

JudgeMatch
A pairwise judge assignment carried to the SDK on a tournament judge’s WorkflowSpawnInfo: the two entrant agent ids whose produced outputs are to be compared. The SDK maps each id back to that entrant’s candidate and asks the judge which is better.
WorkflowBudget
G4 budget-as-signal: a snapshot of the workflow’s remaining headroom under the active resource quota, carried to the SDK on every WorkflowBatchSpawned. A coordinator/submitter node reads it to scale its next submission to what is actually available — the analogue of the host-side budget.remaining() in the code-orchestration model — instead of blindly hitting the cap and eating a Deny. None remaining fields mean that dimension is unbounded (no quota set).
WorkflowRun
The state of one in-flight workflow execution.
WorkflowSpawnInfo
Enough to run one spawned workflow node, carried to the SDK in the WorkflowBatchSpawned observation. Role/isolation/inheritance are canonical snake_case strings (serde names) so the host SDK can rebuild an agent run spec — the kernel generates these specs internally, so this is how the goal reaches the SDK that actually executes the node.

Functions§

node_agent_id
Deterministic kernel agent id for a workflow node (stable across resume / audit).