pub struct MitigationPath {
pub path: String,
pub hint: String,
pub url: String,
}Expand description
Stable pointer to the runbook section an
operator should consult when responding to a
ChangeEvent.
The path field is the
canonical, kebab-case identifier; the
hint is a short human-readable
action the operator can take immediately; the
url is the relative path into
the crate’s runbook docs.
§Example
use stygian_charon::change_feed::{
ChangeClassification, MitigationPath,
};
use stygian_charon::vendor_classifier::VendorId;
let path = MitigationPath::for_classification(
ChangeClassification::Probable,
Some(VendorId::DataDome),
);
assert!(path.path.starts_with("category-"));
assert!(path.url.contains("incident-runbook.md"));Fields§
§path: StringStable, kebab-case runbook section identifier.
hint: StringOne-line actionable hint for the operator.
url: StringRelative path into the runbook docs (e.g.
docs/incident-runbook.md#category-a-fingerprintidentity-regression).
Implementations§
Source§impl MitigationPath
impl MitigationPath
Sourcepub fn for_classification(
classification: ChangeClassification,
vendor: Option<VendorId>,
) -> Self
pub fn for_classification( classification: ChangeClassification, vendor: Option<VendorId>, ) -> Self
Pick a mitigation path from the classification band and (optional) vendor hint.
The mapping is:
| Classification | Vendor hint | Runbook section |
|---|---|---|
Suspected | any / none | category-a-fingerprint-identity-regression |
Probable | DataDome | category-a-fingerprint-identity-regression |
Probable | PerimeterX / Akamai | category-b-rate-limit-backoff-regression |
Probable | Cloudflare | category-b-rate-limit-backoff-regression |
Probable | other / none | category-b-rate-limit-backoff-regression |
Noise | (event not emitted) | n/a |
The mapping mirrors the existing runbook
categories in
crates/stygian-charon/docs/incident-runbook.md:
fingerprint/identity regressions are
Category A; rate-limit / backoff / proxy
regressions are Category B; the rest fall
back to Category B as the safest operator
action.
Trait Implementations§
Source§impl Clone for MitigationPath
impl Clone for MitigationPath
Source§fn clone(&self) -> MitigationPath
fn clone(&self) -> MitigationPath
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MitigationPath
impl Debug for MitigationPath
Source§impl<'de> Deserialize<'de> for MitigationPath
impl<'de> Deserialize<'de> for MitigationPath
Source§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>,
Source§impl PartialEq for MitigationPath
impl PartialEq for MitigationPath
Source§impl Serialize for MitigationPath
impl Serialize for MitigationPath
impl Eq for MitigationPath
impl StructuralPartialEq for MitigationPath
Auto Trait Implementations§
impl Freeze for MitigationPath
impl RefUnwindSafe for MitigationPath
impl Send for MitigationPath
impl Sync for MitigationPath
impl Unpin for MitigationPath
impl UnsafeUnpin for MitigationPath
impl UnwindSafe for MitigationPath
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
key and return true if they are equal.