pub struct SecondOpinionAvailability {
pub trigger: SecondOpinionTrigger,
pub scaling_retry_enabled: bool,
pub mu_retry_enabled: bool,
pub perturbed_start_retry_enabled: bool,
pub already_mc64: bool,
pub already_adaptive: bool,
pub already_perturbed: bool,
pub increase_quality_retry_enabled: bool,
pub already_no_increase_quality: bool,
pub baseline_quality_escalations: u64,
pub baseline_scaling: Option<&'static str>,
}Expand description
What the baseline options already provide, so a rung that would be a no-op can be dropped instead of burning a solve to re-derive the same answer.
Fields§
§trigger: SecondOpinionTrigger§scaling_retry_enabled: bool§mu_retry_enabled: bool§perturbed_start_retry_enabled: bool§already_mc64: bool§already_adaptive: bool§already_perturbed: boolThe baseline already displaces the start, so there is no displacement left for the third rung to add that the failing solve did not have.
increase_quality_retry_enabled: boolferal_increase_quality_retry (gh#857), rung 4’s own enable.
already_no_increase_quality: boolThe baseline already ran with feral_increase_quality=no, so rung 4
would re-run the solve that just failed.
baseline_quality_escalations: u64How many times the failing solve’s linear solver actually accepted an
increase_quality escalation — the quality_escalations statistic.
The only entry here that is a measurement of the solve rather than
a reading of its options, and rung 4 is unimplementable without it:
an escalation moves no field a report carries, so “did this solve
take the rung that has a documented losing direction” cannot be
answered from the verdict. 0 means provably not a candidate, and
rung 4 is dropped — which is what stops a budget exit on a
never-escalating model from paying for an extra solve.
It is a gate at >= 1, deliberately not a threshold. deb7 and
square_flowsheet_resto’s base solve escalate exactly twice each on
their exact legs, one gaining the solve and one losing it, so no
count separates them; the verdict does.
baseline_scaling: Option<&'static str>feral_scaling tag naming the baseline’s resolved scaling strategy.
None under ScalingStrategy::External, which drops rungs 2 and 3.
Now purely a gate. It was the tag those rungs wrote back to undo rung
1, and None meant there was nothing to write; the driver’s snapshot
restores by set-ness instead, so no tag is needed and the External
case would in fact be safe to run. The gate is kept because dropping
it adds two rungs on externally-scaled models — a trajectory change,
and a separate decision from this bug fix.
Implementations§
Source§impl SecondOpinionAvailability
impl SecondOpinionAvailability
Sourcepub fn from_options(
options: &OptionsList,
trigger: SecondOpinionTrigger,
baseline_quality_escalations: u64,
) -> Self
pub fn from_options( options: &OptionsList, trigger: SecondOpinionTrigger, baseline_quality_escalations: u64, ) -> Self
Read everything the ladder needs to know about the baseline solve out of the options it ran under.
The scaling and barrier tags are read from the resolved strategy,
not from the option strings. feral_scaling is applied only when set
explicitly and otherwise FeralConfig::from_env() governs via
POUNCE_FERAL_SCALING, so the option string reads auto for an
env-configured run; writing that back would silently override the
environment on the retry instead of restoring it. External is
unreachable from the string option, and if it ever arrives here there
is no tag to write, so the rungs that need one are dropped rather than
guessed at.
baseline_quality_escalations is the failing solve’s
SolveStatistics::quality_escalations, and it is a required
parameter rather than a defaulted setter for the reason gh#857
exists at all: the quantity is invisible everywhere else, so a caller
that forgot it would silently pass 0, rung 4 would never open, and
the recovery would look like a rung that simply does not fire. A
missing argument is a compile error; a forgotten setter is a
regression nobody can see.
Trait Implementations§
Source§impl Clone for SecondOpinionAvailability
impl Clone for SecondOpinionAvailability
Source§fn clone(&self) -> SecondOpinionAvailability
fn clone(&self) -> SecondOpinionAvailability
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SecondOpinionAvailability
Auto Trait Implementations§
impl Freeze for SecondOpinionAvailability
impl RefUnwindSafe for SecondOpinionAvailability
impl Send for SecondOpinionAvailability
impl Sync for SecondOpinionAvailability
impl Unpin for SecondOpinionAvailability
impl UnsafeUnpin for SecondOpinionAvailability
impl UnwindSafe for SecondOpinionAvailability
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, U> Imply<T> for U
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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