GLM-5.3 · 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
3 of 4
Comments published
5
Comments matching a bug
3
Comments not matching
2
Cost of this PR
$1.439

Published comments (5)

highbugpublic/app/features/alerting/unified/rule-list/components/RuleActionsButtons.V2.tsx:25-40

Silence action no-ops in new list view because drawer only renders for ruler rules — Users get a visible Silence action that does nothing: `SilenceGrafanaRuleDrawer` is gated on `rulerRuleType.grafana.alertingRule(rule)`, always false when only `promRule` is passed. Build the drawer input from `promRule`/`identifier` instead of gating on the ruler rule.

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

GrafanaPauseAbility/grafanaDeleteAbility are dead code; Pause and Delete items hidden in list view — Grafana-managed rules lose Pause and Delete even for fully-permitted users: both items are gated on `rulerRule`, which `GrafanaGroupLoader` no longer supplies. Gate Delete on `canDelete && identifier`, and pause from `promRule.uid`/`isPaused` via `usePauseRuleInGroup`.

highbugpublic/app/features/alerting/unified/hooks/useAbilities.ts:242-245

Federated rule check hardcoded to false, allowing edits of federated Mimir rule groups — Users can open the edit form on a federated group and save changes that clobber its federated configuration. Propagate the group's state into `useAllRulerRuleAbilities` — e.g. carry `source_tenants` from `rule.group` — before removing `isFederatedRuleGroup` from this path.

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

skipToken fails to disable abilities; Duplicate menu wrongly shown for cloud rules — Cloud rules can now show a Duplicate item whose clone flow cannot succeed: `useAllGrafanaPromRuleAbilities(undefined)` still evaluates global Grafana permissions, and `AlertRuleMenu` ORs the result in. Return `[false, false]` for `skipToken`, as `useCanSilence(undefined)` does.

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

GrafanaRuleListItem missing key prop causes React state reuse across rules — An in-flight clone redirect or open delete modal can hit the wrong rule after filters change or polling updates. Add `key={key}` to `GrafanaRuleListItem`, matching the other switch branches.

Gold bugs found (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.
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 (1)

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.