Struct DiffGates
pub struct DiffGates {
pub delta_code_health_min: Option<f64>,
pub new_hotspot_max: Option<u32>,
pub no_new_cycles: bool,
pub delta_health_min: Option<f64>,
pub deny_degrading_verdict: bool,
pub delta_code_health_min_per_file: Option<f64>,
pub new_file_health_min: Option<f64>,
}Fields§
§delta_code_health_min: Option<f64>Maximum allowed drop in median code-health between base and head. A drop of more than this magnitude fails the gate.
new_hotspot_max: Option<u32>Maximum number of NEW hotspots a PR may introduce.
no_new_cycles: boolWhen true, a PR that introduces a NEW dependency cycle (more import-graph cycles at head than at base) fails the gate — the “don’t let me merge a cycle” guard.
delta_health_min: Option<f64>Minimum delta-health ratio (0–100): the share of changed-function
weight ending low-risk or improved. A ratio below this fails.
Skipped entirely on no-code-change diffs (no ratio, no signal).
deny_degrading_verdict: boolWhen true, a degrading delta-health verdict fails the gate.
delta_code_health_min_per_file: Option<f64>Per-file floor on the working-tree projected code-health delta,
evaluated only by codelore gate / the gate_changes MCP tool: every
changed file whose projected − baseline score delta falls below this
floor fails the gate (one violation per file). codelore diff does
not evaluate this key — its delta_code_health_min sibling stays the
whole-repo-median gate on both surfaces.
new_file_health_min: Option<f64>Minimum projected code-health score an ADDED file must meet, evaluated
only by codelore gate / the gate_changes MCP tool. An added file
has no baseline — its delta_code_health_min_per_file delta is always
None, so it evades that floor — and its small footprint rarely moves
the whole-repo median enough to trip delta_code_health_min either.
Without this floor a freshly added low-health file (a new god-class,
say) can clear every other gate. One violation per offending added
file, with the file’s projected score as the measured value.
codelore diff does not evaluate this key. Deleted files (no
projected score) never trigger it.
Trait Implementations§
§impl<'de> Deserialize<'de> for DiffGates
impl<'de> Deserialize<'de> for DiffGates
§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>,
Auto Trait Implementations§
impl Freeze for DiffGates
impl RefUnwindSafe for DiffGates
impl Send for DiffGates
impl Sync for DiffGates
impl Unpin for DiffGates
impl UnsafeUnpin for DiffGates
impl UnwindSafe for DiffGates
Blanket Implementations§
impl<T> Allocation for T
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<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