pub fn classify_canary(
local: &BinaryHashResult,
remote: &BinaryHashResult,
marker_present: bool,
toolchains_match: Option<bool>,
) -> CanaryVerdictExpand description
Classify a self-test canary outcome (bd-784xt). Pure and total, so the verdict logic is unit-tested without a live daemon.
Inputs:
local/remote: the orchestrator and worker binary hashes,marker_present: whether the remote binary contains the injected test marker (proving it is the build we asked for, not a stale/corrupt artifact),toolchains_match:Some(true)if the worker’srustcis confirmed equal to the orchestrator’s,Some(false)if confirmed different,Noneif parity could not be determined.
Verdict precedence:
- marker absent ->
CanaryVerdict::MissingMarker(corruption — FAIL), - byte-equivalent ->
CanaryVerdict::Reproduced(PASS), - byte mismatch + toolchains confirmed identical ->
CanaryVerdict::Miscompile(FAIL), - byte mismatch + toolchains differ/unknown ->
CanaryVerdict::ToolchainDrift(advisory PASS).