Skip to main content

HeuristicEntry

Struct HeuristicEntry 

Source
pub struct HeuristicEntry {
Show 26 fields pub motif_class: MotifClass, pub reason_code: ReasonCode, pub candidate_interpretation: &'static str, pub provenance: Provenance, pub recommended_action: PolicyState, pub drift_threshold: f64, pub slew_threshold: f64, pub boundary_density_threshold: f64, pub min_correlation_count: u16, pub max_correlation_count: u16, pub min_duration_windows: u16, pub max_duration_windows: u16, pub weight_drift: f64, pub weight_slew: f64, pub weight_boundary: f64, pub weight_correlation: f64, pub weight_duration: f64, pub evidence_dataset: &'static str, pub evidence_dataset_doi: &'static str, pub dashboard_hint: &'static str, pub taxonomy_ref: &'static str, pub affinity_tiers: u32, pub confuser_motif: Option<MotifClass>, pub margin_vs_confuser_threshold: f64, pub primary_witness_tiers: u32, pub primary_witness_detectors: &'static [&'static str],
}
Expand description

Heuristics bank entry — typed, provenance-aware motif record.

The struct is Copy + Clone + Debug + PartialEq; all fields are stack-only ('static string slices, primitives, enums). The bank is initialised at compile time as an array of HeuristicEntry, so every field must be const-friendly.

The seven original fields (motif_classslew_threshold) preserve the v0.1 wire shape. The thirteen additional fields enable episode-level multi-feature scoring (match_episode), per-motif provenance ladders (evidence_dataset, evidence_dataset_doi), production-engineer dashboard hints (dashboard_hint), and taxonomy anchors (taxonomy_ref). All are documented in docs/heuristics_bank.md.

Fields§

§motif_class: MotifClass§reason_code: ReasonCode§candidate_interpretation: &'static str

NOT an attribution — a candidate interpretation hypothesis

§provenance: Provenance§recommended_action: PolicyState§drift_threshold: f64

Minimum drift persistence (fraction of window) to trigger

§slew_threshold: f64

Minimum slew magnitude to trigger

§boundary_density_threshold: f64

Minimum boundary-density (fraction of episode windows in Boundary state) for this motif to trigger.

§min_correlation_count: u16

Minimum number of contributing signals (e.g. multi-service motifs require ≥ 2). Use 1 for “any”.

§max_correlation_count: u16

Maximum number of contributing signals (e.g. single-service motifs require ≤ 1). Use u16::MAX for “unbounded”.

§min_duration_windows: u16

Minimum episode duration in windows.

§max_duration_windows: u16

Maximum episode duration in windows. Use u16::MAX for “unbounded”.

§weight_drift: f64

Per-motif scoring weights for match_episode. Default 1.0 reproduces the v0.1 unit-weighted behaviour; differential weights let one motif emphasise drift while another emphasises slew or correlation.

§weight_slew: f64§weight_boundary: f64§weight_correlation: f64§weight_duration: f64§evidence_dataset: &'static str

Provenance ladder — which named upstream slice motivated this entry. "FrameworkDesign" for hand-coded entries with no dataset evidence yet; "<dataset_key>" (e.g. "tadbench_F04", "aiops_challenge_packet_loss") for entries observed in a vendored real-data fixture.

§evidence_dataset_doi: &'static str

DOI of the upstream archive cited in evidence_dataset. Empty string when evidence_dataset == "FrameworkDesign".

§dashboard_hint: &'static str

One-line hint for a production debug engineer reading the matched motif on a dashboard. E.g. `“Inspect jvm.memory.heap.used

  • gc.duration over the past hour“`.
§taxonomy_ref: &'static str

Taxonomy anchor — IEEE 24765 term and Avizienis–Laprie–Randell node. E.g. "IEEE 24765: 'fault propagation'; A-L-R: error → service-failure".

§affinity_tiers: u32

Phase 2.5 — hand-curated tier-affinity bitmask. Each bit corresponds to one detector tier (see TIER_BIT_* constants in heuristics_bank.rs). The bank’s match_episode_with_tier_affinity AND-s this mask against the per-cell + per-window tier-fired bitmasks to compute a motif-conditional consensus boost. A mask of 0 falls back to the reason-code-derived default in affinity_tiers_for(...), preserving Phase-2 behaviour for entries without a curated mask.

§confuser_motif: Option<MotifClass>

Phase 5.6 — confuser-pair adjudication. Names the primary motif expected to compete with this one for the same residual signature (e.g., DeploymentRegressionSlew’s confuser is CircuitBreakerOpenShift — both are step-shaped single-service motifs). The bank’s match function explicitly tracks the confuser’s score during scoring, reports margin_vs_confuser, and fusion gates typing on whether the candidate beats its declared confuser by margin_vs_confuser_threshold. None means no confuser is declared — episode types-confirmed based on runner-up margin alone (legacy semantics).

§margin_vs_confuser_threshold: f64

Phase 5.6 — minimum margin against the declared confuser for typed confirmation. Episodes that beat the runner-up but not the confuser are reported as confuser_ambiguous rather than typed. Default 0.10 (10% of top score). Set to 0.0 to disable.

§primary_witness_tiers: u32

Phase 7 — primary witness tier gate (strict semantic anti-hallucination). Subset of affinity_tiers that MUST fire for the motif to be a valid typing candidate. Distinct from the Phase 5.6 zero-tier filter (any affinity tier suffices); this requires SPECIFIC tiers to fire. E.g., DeploymentRegressionSlew witnesses = {A, B, N, X} — without scalar/Page-Hinkley/offline- CPD/Pettitt step detection actually firing, the bank refuses to type “deployment regression” even if other affinity tiers (correlation, dispersion) fired. A mask of 0 disables the gate (default — match behaves identically to Phase 5.6).

§primary_witness_detectors: &'static [&'static str]

Phase 8 — per-detector primary witnesses (strict ensemble-methods SOTA gate). Named-detector subset that MUST fire for the motif to type-confirm. Distinct from primary_witness_tiers (any detector in the named tiers suffices); this requires SPECIFIC detectors (e.g., [poisson_burst, burst_after_silence] for AuthenticationFailureSpike). Names match the detector_name field returned by detector functions in incumbent_baselines.rs. Empty slice &[] disables the gate (default — Phase 7 behaviour). Applied at fusion.rs typed-confirmation, not at bank match time; failing motifs are demoted to ambiguous rather than skipped, so the runner-up motif can still be reported in the operator packet.

Trait Implementations§

Source§

impl Clone for HeuristicEntry

Source§

fn clone(&self) -> HeuristicEntry

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for HeuristicEntry

Source§

impl Debug for HeuristicEntry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for HeuristicEntry

Source§

fn eq(&self, other: &HeuristicEntry) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for HeuristicEntry

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.