GPT-6.1 Sol · 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
4 of 4
Comments published
6
Comments matching a bug
4
Comments not matching
2
Cost of this PR
$1.351

Published comments (6)

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

Delete is hidden for Grafana list rows without a ruler DTO — Users with delete permission lose Delete in grouped and filtered lists because those rows supply only `promRule`, while the menu requires `canDelete && rulerRule`. Render deletion from the editable identifier and group, and update the callback contract to avoid requiring a ruler DTO.

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

Pause action remains hidden for Grafana list rules without a ruler DTO — Grafana list users cannot pause rules because the menu still requires `rulerRule` and passes it to `MenuItemPauseRule`, despite the Prometheus pause ability. Update the rendering condition and `MenuItemPauseRule` to accept the Prometheus rule or fetch the ruler DTO on demand.

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

Silence notifications does nothing for Grafana rules with only a Prometheus DTO — Clicking Silence notifications has no effect because `RuleActionsButtons.V2` requires `rulerRuleType.grafana.alertingRule(rule)` to render the drawer, but only `promRule` is supplied. Update `SilenceGrafanaRuleDrawer` to accept a UID and pass the Prometheus rule UID directly.

highbugpublic/app/features/alerting/unified/hooks/useAbilities.ts:324

Export is unavailable for Grafana-managed recording rules — Grafana-managed recording rules lose Export in the Prometheus-only list because `AlertRuleAction.ModifyExport` uses `isAlertingRule`, unlike the previous ruler-based ability. Use the Grafana rule predicate rather than the alerting-only predicate for export support.

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

Skipped Grafana rule checks incorrectly grant abilities — Users with Grafana create permission regain Duplicate for plugin-provided rules because an absent `rule`, including from `skipToken`, grants abilities through the OR merge in `AlertRuleMenu`. Return unsupported abilities when `rule` is absent so skipped Grafana checks cannot enable actions.

mediumbugpublic/app/features/alerting/unified/hooks/useAbilities.ts:227-228

CombinedRule abilities lose the federation guard for immutable rules — Legacy list buttons now offer Edit for federated Mimir rules because `useAllRulerRuleAbilities` hardcodes `isFederated` to false and no longer receives `rule.group`. Preserve the group's federation state when calculating `CombinedRule` abilities.

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.
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.
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 (0)

None.