Language: Python · Sphere: programming · Category: Monitoring
Alert manager with rule-driven deduplication, suppression, and escalation.
Use to ingest a stream of alerts and cut noise: each alert is fingerprinted (title+source+tags) and matched to a rule that sets a dedup window, suppression tags, and an escalation threshold. Guarantees (proven by self-test): an identical fingerprint inside the dedup window is folded into the existing alert (not re-fired), but the same fingerprint past the window alerts again; a maintenance-tagged alert is accepted but kept out of the active set; resolve removes from active and returns honestly (double-resolve is False).
When it runs, alert manager guarantees n_active_before == 3; manager.process_alert(a1) is True; manager.process_alert(dup) is False (proven by run).
Checkable constraints:
manager.process_alert(a1) is Truemanager.process_alert(dup) is Falsemanager.process_alert(a3) is Truemanager.process_alert(again) is Truemanager.process_alert(supp) is True[s.title for s in suppressed] == ['Disk Warning']'Disk Warning' not in active_titlesn_active_before == 3
- Green-run: ✓ passes (re-run under the extractor's gate)
- Constraint strength: recovery (truth-pinned)
- Independent oracle: ✓ consensus — xlang (validator v1.9)
- Peer review: unreviewed
△ AURA Pattern Library — © Reality Optimizer