Skip to content

fix(flow): match alert triggers by rule key or name - #416

Merged
youzi-1122 merged 1 commit into
ongridio:mainfrom
gdemoni:codex/fix-alert-rule-key-match
Sep 23, 2026
Merged

youzi-1122 merged 1 commit into
ongridio:mainfrom
gdemoni:codex/fix-alert-rule-key-match

Conversation

@gdemoni

@gdemoni gdemoni commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Pass both the canonical alert rule key and display name to the flow dispatcher.
  • Match trigger.alert_fired rule filters against either value while preserving case-insensitive substring and minimum-severity behavior.
  • Keep the existing trigger payload compatible and add regression coverage for rule keys that differ from display names.

Fixes #410

Testing

  • go test ./internal/manager/biz/flow ./internal/manager/biz/alert -count=1
  • go vet ./internal/manager/biz/flow ./internal/manager/biz/alert
  • go test ./... was run locally; unrelated Windows-specific tests require Unix tools, symlink/file permission support, or ONNX build constraints.

Author confirmation

@gdemoni
gdemoni requested a review from singchia as a code owner September 11, 2026 08:10
@gdemoni

gdemoni commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Hi maintainers! @singchia

It looks like the workflows for this PR are awaiting approval. When someone please approve them when convenient so the required checks can run? Thank you!

@youzi-1122

Copy link
Copy Markdown
Member

Hi @gdemoni, all three CI jobs have passed. The remaining blocker is required checklist: the rerun of the September 11 workflow failed with Missing required PR checklist item.

The current PR description already has the required checkbox checked, and I verified that it passes the checklist script locally. The rerun appears to be using the older event payload rather than the current description.

Could you please make a small edit to the PR description and save it, keeping the contribution-guide checkbox checked? This will trigger a fresh checklist run. Please do this from your account, since the workflow rejects description-edit events from anyone other than the PR author.

Failed run: https://github.com/ongridio/ongrid/actions/runs/34578423873

@gdemoni

gdemoni commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

Hi @youzi-1122 , I’ve updated the PR description from my account while keeping the contribution-guide checkbox checked. All five code checks have passed, and the newly triggered required checklist workflow is now awaiting maintainer approval. Could you please approve it when convenient? Also, please let me know if anything else is needed before the PR can be reviewed and merged. Thank you!

@youzi-1122
youzi-1122 merged commit b7f66ef into ongridio:main Sep 23, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(flow): trigger.alert_fired never matches — dispatcher receives RuleName but flow authors write rule_key into trigger config

2 participants