Repository navigation
Alert Rules: integrate built-in spike/quota into AlertRule (#535) - #544
Merged
Merged
Conversation
Represent error-spike and quota alerts as idempotent system-managed AlertRule rows so Alert Rules is the canonical model while preserving legacy fireProjectAlert categories and dedupe keys. Co-authored-by: Cursor <[email protected]>
Use BUILTIN_* condition types so older evaluators skip system rows, avoid ensure-on-read clobber, and tolerate concurrent create unique violations. Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 367cc84. Configure here.
Match ingest and scheduled-evaluator tenant gates, and improve dry-run preview to report would-create / would-update / unchanged. Co-authored-by: Cursor <[email protected]>
Collaborator
Author
|
Addressed the backfill tenant-gate review feedback:
No merge from this comment. |
Unparseable ERROR_SPIKE / QUOTA_WARNING conditions must force enabled=false so stale Project.alert_settings cannot keep built-in alerts firing. Co-authored-by: Cursor <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
AlertRulerows (source=SYSTEM, stablemigration_key,BUILTIN_*conditions)PATCH /api/project/alert-settings; idempotent backfill jobbuiltin-alert-rules-backfillfireProjectAlertcategories + dedupe keys; CUSTOM CRUD/evaluators skip SYSTEM so no duplicate notificationsCloses #535. Parent vision #493 stays open.
Test plan
20260718140000_alert_rule_system_builtinpnpm --filter api builtin-alert-rules-backfill -- --dry-runthen without dry-run; re-run is a no-opAlertEventdedupe keys remainalert:error_spike:…/quota:near|exceeded:…pnpm --filter api test(alert-rules + builtin-alert-rules + quota-alert)Made with Cursor