Claude Sonnet 5.5 · Balanced

notification-rule-processing-engine-grafana-codex

Grafana · Go · L · 300–799 lines · 6 files

The normal review, with one generalist agent. Judge: Claude Haiku 5.5.

Gold bugs found
1 of 4
Comments published
3
Comments matching a bug
1
Comments not matching
2
Cost of this PR
$0.946

Published comments (3)

mediumbugpublic/app/features/alerting/unified/rule-list/FilterView.tsx:157-162

GrafanaRuleListItem rendered in list without a key prop — Without a key, React reconciles these items by index, so loading more results or re-sorting can mis-associate component state across rules. Add `key={key}` to `GrafanaRuleListItem`, as the other branches do with the `key` already destructured.

mediumbugpublic/app/features/alerting/unified/hooks/useAbilities.ts:222-229

Legacy useAllAlertRuleAbilities no longer treats federated rules as immutable — `useAllRulerRuleAbilities` hard-codes `isFederated = false`, so federated Mimir rules are no longer immutable for Update, Delete and Pause in every legacy caller. Compute `isFederatedRuleGroup(rule.group)` in `useAllAlertRuleAbilities` and pass it to the shared implementation.

mediumbugpublic/app/features/alerting/unified/hooks/useAbilities.ts:308-318

Duplicate ability granted when Grafana prom rule is undefined (skipToken) — When `rule` is undefined, `MaybeSupported` still grants Duplicate, and `AlertRuleMenu` ORs it with the ruler ability, so datasource rules show Duplicate to users who only have Grafana create permission. Make `MaybeSupported` resolve to `NotSupported` when `rule` is missing.

Gold bugs found (1)

mediumWhen the Grafana prom-rule branch is skipped (datasource rules), useAllGrafanaPromRuleAbilities(undefined) still reports Duplicate as supported and allowed by Grafana create permission, and AlertRuleMenu ORs it with the ruler ability, so Duplicate appears on cloud rules even when the ruler check denies it.

Gold bugs missed (3)

highThe pause menu item is still gated on a Grafana ruler rule, but the list view now passes only the Prometheus rule, so Pause/Resume disappears for list-view rules even when the user may pause them.
highThe Delete menu item still requires a ruler rule, which list-view Grafana rules no longer provide, so users with delete permission lose the Delete action.
highFor list-view Grafana rules RuleActionsButtons gets only promRule, so the Silence menu item is shown but the silence drawer, still gated on a ruler alerting rule, never renders and clicking Silence does nothing.