pub struct SelectionRequest {
pub project: String,
pub command: Option<String>,
pub command_priority: CommandPriority,
pub estimated_cores: u32,
pub disk_headroom_gib: u32,
pub preferred_workers: Vec<WorkerId>,
pub toolchain: Option<ToolchainInfo>,
pub required_runtime: RequiredRuntime,
pub classification_duration_us: Option<u64>,
pub job_mode: bool,
pub required_tools: Vec<String>,
pub hook_pid: Option<u32>,
}Expand description
Worker selection request sent from hook to daemon.
Fields§
§project: StringProject identifier (usually directory name or hash).
command: Option<String>Full command being executed (optional, for active build tracking).
command_priority: CommandPriorityPriority hint for this request.
estimated_cores: u32Estimated CPU cores needed for this compilation.
disk_headroom_gib: u32Additional free GiB required on the worker’s reported build filesystem. A positive value is a hard admission budget, retained by the daemon for this build’s lifetime; zero leaves disk admission to the ordinary policy.
preferred_workers: Vec<WorkerId>Preferred worker IDs (e.g., from project config).
toolchain: Option<ToolchainInfo>Rust toolchain information for the project.
required_runtime: RequiredRuntimeRequired runtime for command execution.
classification_duration_us: Option<u64>Classification decision latency in microseconds (for AGENTS.md compliance). This tracks how long the 5-tier classification took on the hook side.
job_mode: boolJob-mode admission (bd-g7rpy): set by rch exec --job only. When the
one-active-job-per-project-per-worker guard excludes every otherwise-
eligible worker, a job request may QUEUE on that exclusion instead of
failing over to local execution. Compilation requests never set it,
preserving their immediate NoAdmissibleWorkers behavior.
required_tools: Vec<String>Operator-declared named tools this work requires VERIFIED on the worker
(rch exec --job --require-tool NAME, or a project’s
jobs.required_tools).
Job mode only — the compilation classifier never sets it, so ordinary offloaded builds keep their existing admission behavior exactly. Empty means no gate; a name no worker has verified excludes every worker, because the caller asked for the gate precisely because the job cannot run without the tool.
hook_pid: Option<u32>Process ID of the hook (for active build tracking).