feat(ops): auto-resolve PagerDuty incidents once ops anomalies clear - #8942
Conversation
runOpsAlerts now tracks previous-tick anomaly state per repo via the pagerduty audit-event row the trigger already writes: on a tick where a repo is healthy but its newest completed external_notification.pagerduty event for the ops_anomaly dedup key was a trigger (not yet a resolve), it sends a matching PagerDuty resolve so the incident auto-closes. - add resolvePagerDutyIncident (Events API resolve action; no severity floor or cooldown, best-effort/never-throws like the trigger path) - add latestCompletedAuditEventDetail repository helper as the durable, isolate-surviving previous-tick state (no bespoke table needed) - cover the two-tick clear-and-resolve path plus resolve HTTP delivery Closes JSONbored#8903
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8942 +/- ##
==========================================
+ Coverage 90.56% 91.09% +0.53%
==========================================
Files 96 99 +3
Lines 22490 24535 +2045
Branches 3884 4548 +664
==========================================
+ Hits 20367 22350 +1983
- Misses 1945 1954 +9
- Partials 178 231 +53
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-26 14:15:12 UTC
Review summary Nits — 4 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
feat(ops): auto-resolve PagerDuty incidents once ops anomalies clear
runOpsAlerts now tracks previous-tick anomaly state per repo via the
pagerduty audit-event row the trigger already writes: on a tick where a
repo is healthy but its newest completed external_notification.pagerduty
event for the ops_anomaly dedup key was a trigger (not yet a resolve),
it sends a matching PagerDuty resolve so the incident auto-closes.
floor or cooldown, best-effort/never-throws like the trigger path)
isolate-surviving previous-tick state (no bespoke table needed)
Closes #8903
Validation
Verified locally on this branch before opening:
npm run typechecknpx turbo run build:tsc build:verifynpm run test:coverage— patch coverage 100.0% of changed lines