Claude Opus 5.5 · Heavy

notification-rule-processing-engine-grafana-codex

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

The generalist plus 9 specialist lens agents in parallel, then the same verify and dedup steps. Judge: Claude Haiku 5.5.

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

Published comments (5)

highbugpublic/app/features/alerting/unified/components/rule-viewer/AlertRuleMenu.tsx:94-96

Silence menu item does nothing for Grafana rules without a ruler rule — `canSilence` is now true for prom-only rules, but `RuleActionsButtons.V2` renders `SilenceGrafanaRuleDrawer` only when `rulerRuleType.grafana.alertingRule(rule)` passes, and `rule` is undefined in the list view, so clicking does nothing. Open the drawer from `promRule` data, or fetch the ruler rule on demand.

highbugpublic/app/features/alerting/unified/components/rule-viewer/AlertRuleMenu.tsx:81-87

Pause and Delete menu items still require rulerRule, hidden in list view — The menu still gates Pause on `rulerRuleType.grafana.rule(rulerRule)` and Delete on `canDelete && rulerRule`, so the new `canPause`/`canDelete` do nothing in the list view, which no longer passes `rulerRule`. Drive both items from the rule identifier or `promRule` instead.

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

Federated rule groups lose their immutable status and become editable — `useAllRulerRuleAbilities` hardcodes `isFederated = false`, dropping the `isFederatedRuleGroup(rule.group)` check, so federated Mimir groups become editable wherever `useAlertRuleAbility` is used. Compute the federated check from `rule.group` in `useAllAlertRuleAbilities` and mark Update, Delete and Pause as unsupported.

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

Missing `key` prop on `GrafanaRuleListItem` in `rules.map` — Without a key, React reconciles items by index, logging missing-key warnings and mixing up per-item state like open menus or modals as filtered results stream in. Restore `key={key}` on `GrafanaRuleListItem`.

mediumbugpublic/app/features/alerting/unified/rule-list/GrafanaGroupLoader.test.tsx:92-102

Test claims to check action menu options but only checks the More button — `AlertRuleMenu` always renders the More button, even with every ability denied, so this test passes even if the `useGrafanaPromRuleAbilities` path breaks. Click the button and assert the menu items, or rename the test to match what it checks.

Gold bugs found (2)

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.
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.

Gold bugs missed (2)

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.
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.