pub enum ResolveSource {
Manifest,
Path,
EnvVar,
PathLookup,
AutoBuilt,
NotFound,
}Expand description
Provenance of a scheduler binary returned by resolve_scheduler.
Each variant identifies the resolution branch that produced the path, so downstream tooling (sidecar, cache-key construction, log lines) can distinguish “we located an existing binary whose git hash we don’t control” from “we just built this binary in the declaring crate’s workspace and therefore know its source commit matches that workspace’s HEAD.”
Only the AutoBuilt variant carries an in-child
source-commit guarantee. A manifest artifact was elected by the parent and
can represent either a workspace build or the global operator override, so
the child records that fact without guessing its source commit.
Eevdf / KernelBuiltin / Path resolutions do not go through
the Discover flow:
Eevdf/KernelBuiltin→NotFound(no user-space binary involved; the tuple’sOption<PathBuf>isNone).Path(p)→Path(the caller named the binary explicitly in the test entry — no env-var or filesystem search runs).
The variant ordering in the enum mirrors the resolution order in
resolve_scheduler so a reviewer can scan both lists in lockstep.
Variants§
Manifest
Resolved through the authoritative parent-written scheduler artifact manifest. No per-child search or Cargo invocation ran.
Path
Resolved via the literal path the caller supplied as
SchedulerSpec::Path(p). No env-var or filesystem search
involved — the path arrived in the test entry directly.
Trusted to the extent the caller trusts the argument; git-
hash provenance is UNKNOWN to this process.
EnvVar
Resolved via the KTSTR_SCHEDULER environment variable on the
SchedulerSpec::Discover arm. Trusted to the extent the
caller trusts the variable; git-hash provenance is UNKNOWN
to this process.
PathLookup
Resolved via a $PATH lookup. Only produced when
KTSTR_CARGO_TEST_MODE is active and a binary by the
requested name was found on the user’s $PATH ahead of the
on-demand workspace build. Git-hash provenance UNKNOWN — the
binary on PATH may be a system-wide install, a prior build,
or a custom one the user staged for this run.
AutoBuilt
Built on demand by crate::build_and_find_binary inside this
process, in the declaring crate’s workspace. The build targets
that workspace’s HEAD by construction — the ONLY variant where
the source commit is known to match the workspace tree the
tests run from.
NotFound
No user-space binary path was produced. Returned for
SchedulerSpec::Eevdf and SchedulerSpec::KernelBuiltin (the
kernel supplies the scheduler — no binary to locate). The
tuple’s Option<PathBuf> is always None for this variant.
Implementations§
Source§impl ResolveSource
impl ResolveSource
Sourcepub const fn as_str(&self) -> &'static str
pub const fn as_str(&self) -> &'static str
Stable snake_case tag for the sidecar resolve_source field and
the stats --resolve-source filter — the string analog of the
variant, mirroring the run_source tag convention so the
persisted JSON shape does not depend on this enum’s Rust
representation. Variant order matches the resolution order.
Trait Implementations§
Source§impl Clone for ResolveSource
impl Clone for ResolveSource
Source§fn clone(&self) -> ResolveSource
fn clone(&self) -> ResolveSource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResolveSource
impl Debug for ResolveSource
Source§impl PartialEq for ResolveSource
impl PartialEq for ResolveSource
impl Copy for ResolveSource
impl Eq for ResolveSource
impl StructuralPartialEq for ResolveSource
Auto Trait Implementations§
impl Freeze for ResolveSource
impl RefUnwindSafe for ResolveSource
impl Send for ResolveSource
impl Sync for ResolveSource
impl Unpin for ResolveSource
impl UnwindSafe for ResolveSource
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more