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

Published comments (9)

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

Delete and Pause actions silently dropped when only promRule is provided — Grafana rules in the new list view lose Delete and Pause even though `showDeleteModal` only needs the identifier, because AlertRuleMenu gates both items on `rulerRule`. Gate them on the prom-rule abilities and `identifier` instead.

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

Silence action is a no-op: drawer requires a ruler rule that is never passed — Clicking Silence sets `showSilenceDrawer` but renders nothing: the drawer mounts only when `rulerRuleType.grafana.alertingRule(rule)` is truthy, and this call site passes only `promRule`. Render a prom-rule-based silence drawer or hide the menu item when no drawer can render.

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

Federated rules wrongly shown as editable: federated check dropped in delegation — Federated Mimir rules now expose Edit, Delete, Pause, Restore and Duplicate because `useAllAlertRuleAbilities` delegates to `useAllRulerRuleAbilities`, which hardcodes `isFederated` to `false` instead of computing `isFederatedRuleGroup(rule.group)`. Restore the check before delegating. **Also found in:** - `public/app/features/alerting/unified/hooks/useAbilities.ts:243-245`

mediumbugpublic/app/features/alerting/unified/hooks/useAbilities.ts:287-334

skipToken does not skip: undefined rule still yields supported abilities — Cloud rules show a Duplicate item gated only by Grafana create permission, bypassing the datasource-scoped check, because the `skipToken` path still computes `MaybeSupported` as `AlwaysSupported`. Return `NotSupported` for every action when `rule` is undefined.

mediumbugpublic/app/features/alerting/unified/rule-list/GrafanaGroupLoader.test.tsx:171-208

Menu actions test grants delete permission but never asserts the Delete item — The test grants delete permission but never asserts Delete, so it passes with the action missing. Either assert Delete and fix the `rulerRule` gate in AlertRuleMenu, or drop the delete permission and rename the test.

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

Undefined rule (skipToken) yields enabled Duplicate ability instead of disabled — With `rule` undefined, `loading` is false so `MaybeSupported` becomes `AlwaysSupported`, letting AlertRuleMenu's OR show Duplicate on cloud rules with only `AlertingRuleCreate`. Early-return `NotSupported` for every action on the skip path.

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

Dropped federated rule group check makes federated rules editable/deletable — Federated Mimir rule groups now evaluate as editable and deletable for every `useAllAlertRuleAbilities` consumer because the delegation to `useAllRulerRuleAbilities` hardcodes `isFederated` to `false`. Restore `isFederatedRuleGroup(rule.group)` in the wrapper.

mediumbugpublic/app/features/alerting/unified/hooks/useAbilities.ts:243-245

Federated Mimir rule groups incorrectly shown as editable/removable after refactor — Federated Mimir rules now offer Update, Delete, Pause, Restore and DeletePermanently because the delegation to `useAllRulerRuleAbilities` hardcodes `isFederated` to `false`. Pass a federated flag or keep `isFederatedRuleGroup(rule.group)` in the wrapper until real support lands.

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

Delegation to useAllRulerRuleAbilities drops federated-rule immutability check — Read-only federated Mimir rules now report Update, Delete and Pause as supported to every `useAlertRuleAbility` consumer because `useAllRulerRuleAbilities` hardcodes `isFederated` to `false`. Pass a federated flag derived from the combined rule's group into `useAllRulerRuleAbilities`.

Gold bugs found (3)

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 (1)

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.