Skip to content

ref(crons): Reorganize incident creation / issue occurrence logic#8

Open
akshayutture-augment wants to merge 1 commit into
monitor-incident-refactor-beforefrom
monitor-incident-refactor-after
Open

ref(crons): Reorganize incident creation / issue occurrence logic#8
akshayutture-augment wants to merge 1 commit into
monitor-incident-refactor-beforefrom
monitor-incident-refactor-after

Conversation

@akshayutture-augment

@akshayutture-augment akshayutture-augment commented Nov 14, 2025

Copy link
Copy Markdown

Test 8


Replicated from ai-code-review-evaluation/sentry-cursor#8


Note

Refactors monitor incident/occurrence handling by splitting logic into new modules and simplifying mark_failed flow.

  • Monitors (backend):
    • Logic extraction:
      • Move incident threshold handling to logic/incidents.py (try_incident_threshold).
      • Move issue occurrence creation and helpers to logic/incident_occurrence.py (create_incident_occurrence, get_failure_reason, get_monitor_environment_context).
    • mark_failed simplification:
      • logic/mark_failed.py now delegates incident/occurrence flow to try_incident_threshold.
    • Types:
      • Introduce SimpleCheckIn in monitors/types.py for lightweight check-in data.

Written by Cursor Bugbot for commit c3b32a7. Configure here.

…0528)

Since we'll be doing more with issue occurrences split out the concept
of incidents into it's own logic module, as well as incident_occurrence
into it's own module

Part of GH-80527
@akshayutture-augment

Copy link
Copy Markdown
Author

cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no bugs!


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants