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_class … slew_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 strNOT an attribution — a candidate interpretation hypothesis
provenance: Provenance§recommended_action: PolicyState§drift_threshold: f64Minimum drift persistence (fraction of window) to trigger
slew_threshold: f64Minimum slew magnitude to trigger
boundary_density_threshold: f64Minimum boundary-density (fraction of episode windows in Boundary state) for this motif to trigger.
min_correlation_count: u16Minimum number of contributing signals (e.g. multi-service motifs require ≥ 2). Use 1 for “any”.
max_correlation_count: u16Maximum number of contributing signals (e.g. single-service
motifs require ≤ 1). Use u16::MAX for “unbounded”.
min_duration_windows: u16Minimum episode duration in windows.
max_duration_windows: u16Maximum episode duration in windows. Use u16::MAX for “unbounded”.
weight_drift: f64Per-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 strProvenance 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 strDOI of the upstream archive cited in evidence_dataset. Empty
string when evidence_dataset == "FrameworkDesign".
dashboard_hint: &'static strOne-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 strTaxonomy anchor — IEEE 24765 term and Avizienis–Laprie–Randell
node. E.g. "IEEE 24765: 'fault propagation'; A-L-R: error → service-failure".
affinity_tiers: u32Phase 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: f64Phase 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: u32Phase 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
impl Clone for HeuristicEntry
Source§fn clone(&self) -> HeuristicEntry
fn clone(&self) -> HeuristicEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HeuristicEntry
impl Debug for HeuristicEntry
Source§impl PartialEq for HeuristicEntry
impl PartialEq for HeuristicEntry
Source§fn eq(&self, other: &HeuristicEntry) -> bool
fn eq(&self, other: &HeuristicEntry) -> bool
self and other values to be equal, and is used by ==.