feat(ams): page PagerDuty on miner kill-switch trips - #7685
Conversation
Wire kill-switch engage through the existing Events API v2 path so trips are not ledger-only; resumes stay silent. Co-authored-by: Cursor <cursoragent@cursor.com>
|
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 #7685 +/- ##
=======================================
Coverage 88.55% 88.55%
=======================================
Files 725 725
Lines 76188 76222 +34
Branches 22680 22693 +13
=======================================
+ Hits 67466 67500 +34
Misses 7680 7680
Partials 1042 1042
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Exercise every notify/env/error branch under vitest so patch coverage clears the 99% gate. Co-authored-by: Cursor <cursoragent@cursor.com>
Collapse sync/async failure handling into shared helpers and Promise.resolve so Codecov patch does not miss branches under sharded merges. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Caution 🛑 LoopOver review result - reject/close recommendedReview updated: 2026-07-21 08:59:32 UTC
Review summary Blockers
Nits — 5 non-blocking
Why this is blocked
📋 Copy for AI agents — paste into your coding agentDecision 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. Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. Scroll preview
A short scroll-through clip (desktop) — click either thumbnail to open the full animation. Evidence for scroll-linked behavior a single screenshot can't show. 🟩 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.
|
|
LoopOver is closing this pull request on the maintainer's behalf (AI reviewers agree on a likely critical defect: src/services/notify-pagerduty.ts:224 adds `notifyMinerKillSwitchPagerDuty` but the diff contains no call site wiring it into the hosted AMS kill-switch trip path, so unless an unshown file already calls it, the 'Hosted notifyMinerKillSwitchPagerDuty reuses triggerPagerDutyIncident' half of the PR description is dead code — please point to the caller or wire it in.). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |


Summary
buildMinerKillSwitchPagerDutyAlertin the engine kill-switch detector so trip payloads stay IO-free and shared.recordMinerKillSwitchTransitionfires PagerDuty Events API v2 (sameLOOPOVER_ENABLE_PAGERDUTY/PAGERDUTY_ROUTING_KEYpattern as ORB); resumes stay silent.notifyMinerKillSwitchPagerDutyreusestriggerPagerDutyIncident(severity floor + cooldown). Runbook Detection section documents the automated page.Closes #7666
Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #7666).Validation
git diff --checkIf any required check was skipped, explain why:
miner-governor-kill-switch,notify-pagerduty, andkill-switch-incident-runbook(all green). Fulltest:cileft to CI.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
N/A — docs runbook text + backend/miner alerting only; no visible UI chrome.
Notes
src/review/ops-wire.tspaging onops_anomaly;src/services/notify-pagerduty.tsEvents API v2.