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