Skip to content

[codex] refine alert cooldown scope#13

Merged
stacknil merged 1 commit intomainfrom
codex/issue-12-cooldown-keying
Mar 25, 2026
Merged

[codex] refine alert cooldown scope#13
stacknil merged 1 commit intomainfrom
codex/issue-12-cooldown-keying

Conversation

@stacknil
Copy link
Copy Markdown
Owner

Summary

  • scope cooldown suppression by rule_name plus a simple entity key when entity columns are present
  • keep the existing per-rule fallback when no entity-like column is available
  • clarify the README wording and add a focused regression test for same-rule alerts across different sources

Validation

  • pytest tests/test_rules.py
  • pytest tests/test_pipeline_e2e.py -q
  • pytest

Exact behavior

  • cooldown key is (rule_name, scope)
  • scope resolves from the first non-empty value among entity, source, target, or host
  • when none of those columns exist, cooldown falls back to rule_name alone
  • same rule_name with different scope values can both alert inside the same cooldown window
  • same rule_name with the same resolved scope is still suppressed until the cooldown expires
  • default bundled sample output stays at 12 alerts

Fixes #12

@stacknil stacknil added the enhancement New feature or request label Mar 24, 2026
@stacknil stacknil added this to the v0.3 milestone Mar 24, 2026
@stacknil stacknil added the alerts Alerting behavior and noise reduction label Mar 24, 2026
@stacknil
Copy link
Copy Markdown
Owner Author

@codex review
Focus on:

@stacknil stacknil merged commit 65350bc into main Mar 25, 2026
2 checks passed
@stacknil stacknil deleted the codex/issue-12-cooldown-keying branch March 25, 2026 04:07
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

alerts Alerting behavior and noise reduction enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v0.3: make cooldown scoping more precise

1 participant