feat(ams): page PagerDuty on miner kill-switch trips - #7699
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>
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>
AMS kill-switch trips only run in the miner process, so the hosted notifyMinerKillSwitchPagerDuty export had no call site. Keep paging on the miner trip path and document the Events API contract mirror. 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 #7699 +/- ##
==========================================
- Coverage 88.56% 88.56% -0.01%
==========================================
Files 83 725 +642
Lines 20664 76297 +55633
Branches 3648 22716 +19068
==========================================
+ Hits 18302 67575 +49273
- Misses 2184 7680 +5496
- Partials 178 1042 +864
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-21 09:32:56 UTC
Review summary Nits — 5 non-blocking
CI checks failing
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. 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 (CI is failing (validate, validate-code)). 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 (null unless the transition is a real trip into an active scope).recordMinerKillSwitchTransitionfires PagerDuty Events API v2 using the sameLOOPOVER_ENABLE_PAGERDUTY/PAGERDUTY_ROUTING_KEY/ enqueue /dedup_keycontract as ORB'snotify-pagerdutymodule. Resumes stay silent; paging is fire-and-forget so it cannot block the ledger write.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:
notify-pagerduty,miner-governor-kill-switch, 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 + miner alerting only; no visible UI chrome.
Notes
notifyMinerKillSwitchPagerDuty).src/services/notify-pagerduty.tsEvents API v2 contract; miner has no D1 for severity floor / cooldown (PagerDutydedup_keystill coalesces).