Kimi K3.1 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 Haiku 5.5.
- Gold bugs found
- 3 of 4
- Comments published
- 8
- Comments matching a bug
- 3
- Comments not matching
- 5
- Cost of this PR
- $3.245
Published comments (8)
Grafana recording rules incorrectly lose export support — Users cannot export Grafana recording rules from the prom-only list, although `RuleFormType.grafanaRecording` is supported. Change `ModifyExport` to use `prometheusRuleType.grafana.rule(rule)` with `exportAllowed`, retaining alerting-only guards for actions that need them.
Singular Grafana ability mocks cannot control AlertRuleMenu — Mocking `useGrafanaPromRuleAbility` cannot change the abilities rendered by `AlertRuleMenu`, which consumes `useGrafanaPromRuleAbilities`, making the new guidance and mocks misleading. Remove the singular-hook recommendation and mock the plural hook instead.
More button test never opens or verifies the action menu — The test would still pass if `AlertRuleMenu` lost every action or the More button never opened it. Click `moreButton` and assert the silence, copy-link, duplicate, and export menu items, or rename the test to cover trigger rendering only.
Skipped Grafana-prom rules can incorrectly enable Duplicate — For cloud rules, `skipToken` becomes an undefined `rule`, so `Duplicate` falls back to `rulesPermissions.create`; `canDuplicate` in `AlertRuleMenu.tsx` can then allow duplication despite the ruler ability forbidding it. Return `NotSupported` with `false` when `rule` is absent, or make both Grafana wrappers neutral for `skipToken`. **Also found in:** - `public/app/features/alerting/unified/hooks/useAbilities.ts:397-405`
CombinedRule adapter drops federated-group immutability checks — Federated rules can now expose update, delete, pause, restore, and permanent-delete as supported because this `CombinedRule` delegation drops `rule.group` and the delegated hook hard-codes `isFederated` to false. Preserve the federated-group check in the adapter or pass it into `useAllRulerRuleAbilities`. **Also found in:** - `public/app/features/alerting/unified/hooks/useAbilities.ts:242-245`
Prom-only Grafana rules hide Delete despite delete permission — Users with delete permission still see no Delete action for prom-only Grafana rules because `GrafanaRuleListItem` supplies no `rulerRule`, even when `canDelete` is true. Allow the Delete item to use the prom-rule identifier instead of requiring `rulerRule`.
Prom-only rule silence action does not open a drawer — Clicking Silence notifications for a prom-only rule only sets `showSilenceDrawer`; `RuleActionsButtons.V2` renders `SilenceGrafanaRuleDrawer` only after `rulerRuleType.grafana.alertingRule(rule)` succeeds, but receives no `rule` here. Add a prom-rule drawer path or hide the silence action for this caller.
Missing key reconciles Grafana rule rows by position — Without `key`, React reconciles these stateful `GrafanaRuleListItem` rows by position, so delete, silence, or clone state can attach to a different rule as asynchronous results arrive. Restore `key={key}` to preserve rule identity.