This demo is part of telemetry-lab and is intentionally small, local, and reviewer-friendly.
It focuses on alert semantics, not new AI behavior. The sample input is a committed set of raw rule hits that already fired before deduplication. The demo then applies deterministic cooldown handling and writes artifacts that explain which hits were kept, which were suppressed, and why.
The goal is to make repeated alert behavior legible.
Instead of only showing the final retained alerts, this demo shows:
- raw rule hits before deduplication
- retained alerts after cooldown handling
- per-hit suppression reasons
- a short report that explains how repeated hits collapsed into fewer alerts
From the repository root:
python -m pip install -e .
python -m telemetry_window_demo.cli run-rule-dedup-demoGenerated artifacts are written to demos/rule-evaluation-and-dedup-demo/artifacts/.
- sample data:
data/raw/sample_rule_hits.json - cooldown config:
config/dedup.yaml
The bundled sample intentionally includes:
- repeated hits for the same rule and
entity - repeated hits for the same rule and
source - repeated hits with no scope fields, which fall back to rule-only dedup
- different scopes for the same rule, which stay independent
Cooldown keys use (rule_name, scope).
Scope resolution follows the same precedence described in the main demo:
entitysourcetargethost- unscoped rule-only fallback
That means repeated hits for the same rule can still be kept separately when their scopes differ.
artifacts/rule_hits_before_dedup.jsonartifacts/rule_hits_after_dedup.jsonartifacts/dedup_explanations.jsonartifacts/dedup_report.md
rule_hits_before_dedup.json: normalized raw hits with resolved cooldown scope and cooldown keyrule_hits_after_dedup.json: only the retained alerts, including which suppressed hits each retained alert now representsdedup_explanations.json: one explanation record per raw hit, marked as eitherretainedorsuppresseddedup_report.md: a short reviewer-facing report with run counts, per-group summary, retained alert explanations, and suppressed hit reasons
- Open
rule_hits_before_dedup.jsonand note that several hits share the samecooldown_key. - Open
dedup_explanations.jsonand verify that each raw hit is labeledretainedorsuppressedwith a concrete reason. - Open
rule_hits_after_dedup.jsonand confirm that retained alerts carry the suppressed hit ids they now represent. - Open
dedup_report.mdand confirm that the before/after counts and per-group behavior are readable without looking at code.
- input is precomputed rule hits, not live telemetry
- cooldown logic is intentionally simple and deterministic
- there is no streaming state, dashboard, or service deployment
- artifacts are designed for review, not production alert routing