pub enum CanaryVerdict {
Reproduced,
ToolchainDrift,
Miscompile,
MissingMarker,
}Expand description
The verdict of a self-test canary build, distinguishing a healthy worker whose toolchain merely differs from the orchestrator’s (an advisory PASS) from a genuine miscompile or corruption (a FAIL).
Background (bd-784xt): the original canary criterion was pure bit-for-bit
equivalence (binaries_equivalent) between a LOCAL reference build on the
orchestrator and the REMOTE build on the worker. On a heterogeneous fleet a
worker whose rustc nightly differs even slightly produces different codegen,
so a perfectly healthy worker was marked FAILED and disabled. This classifier
makes byte-identity advisory when toolchains differ (or parity is unknown),
while still catching the two real failures: a build that does not contain the
injected marker (corruption / wrong binary), and a byte mismatch on a
confirmed-identical toolchain (a genuine miscompile).
Variants§
Reproduced
Marker present and binaries byte-equivalent — strong reproducibility. PASS.
ToolchainDrift
Marker present, binaries differ, but the worker’s toolchain differs from (or could not be confirmed equal to) the orchestrator’s — legitimate codegen drift. Advisory PASS.
Miscompile
Marker present, binaries differ, and the toolchains are confirmed identical — the same compiler produced different code, a genuine miscompile. FAIL.
MissingMarker
The remote binary does not contain the injected test marker — the build is not the one we asked for, or it is corrupt. FAIL.
Implementations§
Source§impl CanaryVerdict
impl CanaryVerdict
Sourcepub const fn passed(self) -> bool
pub const fn passed(self) -> bool
Whether this verdict counts as a passing self-test (the worker stays
schedulable). Self::ToolchainDrift passes with an advisory.
Sourcepub const fn is_advisory(self) -> bool
pub const fn is_advisory(self) -> bool
Whether this verdict is an advisory (a pass that nonetheless warrants a note in the trace), as opposed to a clean pass or a hard fail.
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Stable lowercase token for logs / JSONL (matches the serde representation).
Sourcepub const fn reason_code(self) -> Option<&'static str>
pub const fn reason_code(self) -> Option<&'static str>
A distinct incident reason-code token for the non-clean verdicts, so toolchain drift is never conflated with a real mismatch:
RCH-I018toolchain drift (advisory;crate::incident::IncidentReasonCode::ToolchainDrift),RCH-I014artifact miss (the marker-absent corruption case),RCH-E203worker self-test failed (a genuine same-toolchain miscompile).
None for Self::Reproduced (a clean pass carries no reason).
Trait Implementations§
Source§impl Clone for CanaryVerdict
impl Clone for CanaryVerdict
impl Copy for CanaryVerdict
Source§impl Debug for CanaryVerdict
impl Debug for CanaryVerdict
Source§impl<'de> Deserialize<'de> for CanaryVerdict
impl<'de> Deserialize<'de> for CanaryVerdict
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for CanaryVerdict
Source§impl PartialEq for CanaryVerdict
impl PartialEq for CanaryVerdict
Source§impl Serialize for CanaryVerdict
impl Serialize for CanaryVerdict
impl StructuralPartialEq for CanaryVerdict
Auto Trait Implementations§
impl Freeze for CanaryVerdict
impl RefUnwindSafe for CanaryVerdict
impl Send for CanaryVerdict
impl Sync for CanaryVerdict
impl Unpin for CanaryVerdict
impl UnsafeUnpin for CanaryVerdict
impl UnwindSafe for CanaryVerdict
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.