DeepSeek V4 Pro · 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 Opus 5.5.

Gold bugs found
4 of 6
Comments published
7
Comments matching a bug
4
Comments not matching
3
Cost of this PR
$1.856

Published comments (7)

highbugpublic/app/features/alerting/unified/rule-list/GrafanaRuleListItem.tsx:44-48

GrafanaRuleListItem omits rulerRule, so managed rules cannot be paused or deleted — Without `rulerRule`, `AlertRuleMenu` receives `rulerRule={undefined}`, so `Delete` and `Pause` are disabled even when Grafana permissions allow them. Pass `rulerRule={rule}` to `RuleActionsButtons`.

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

Federated rule groups no longer marked immutable in deprecated alert rule abilities hook — Federated rule groups lose their immutable flag because the shared hook hardcodes `isFederated = false`. Restore the `isFederatedRuleGroup` check before delegating to the shared implementation.

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

Silence notifications action is a no-op when rulerRule is undefined — Guard `canSilence` on `Boolean(rulerRule)` or provide a prom-rule-based silence flow. **Also found in:** - `public/app/features/alerting/unified/rule-list/GrafanaRuleListItem.tsx:44-48`

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

GrafanaRuleListItem is rendered without a key prop — Missing `key` causes React warnings and can mis-reconcile rows when the filtered list reorders or grows. Add `key={key}` to `GrafanaRuleListItem`.

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

Test named 'should render More button with action menu options' only checks the More button — The test never opens the dropdown or asserts menu options, so it passes even if the action menu renders nothing. Either rename it or click `More` and assert the expected options appear.

mediumbugpublic/app/features/alerting/unified/rule-list/GrafanaGroupLoader.test.tsx:148-169

Edit button absence assertion races with async permission check — The edit button is absent while the folder permission query is loading, so this assertion can pass before the async permission check settles. Use `waitFor` or `await expect(...).rejects` to let the condition resolve first.

mediumbugpublic/app/features/alerting/unified/hooks/useAbilities.ts:397-405

useGrafanaPromRuleAbilities does not guard skipToken — Passing `undefined` to `useAllGrafanaPromRuleAbilities` lets `Duplicate` be seen as `AlwaysSupported`, so cloud rules can be duplicated whenever Grafana create permission exists. Early-return `[NotSupported, false]` for `skipToken`.

Gold bugs found (4)

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.
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.
mediumThe refactor of useAllAlertRuleAbilities into useAllRulerRuleAbilities drops the isFederatedRuleGroup check (isFederated is hardcoded false), so federated Mimir rules are reported as editable and deletable.
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.
highThe Grafana prom-rule abilities gate Pause, Restore, Export and DeletePermanently on alertingRule(rule) while the comment claims it checks Grafana-managed rules, so Grafana recording rules lose these actions in the list view.