Skip to content

feat(on-call): a page to a person also reaches their phone - #3024

Merged
Makisuo merged 103 commits into
mainfrom
oncall/mobile-paging
Nov 24, 2026
Merged

Makisuo merged 103 commits into
mainfrom
oncall/mobile-paging

Merge main after #3023 was squash-merged

bebe88c
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Nov 24, 2026 in 5m 25s

Confidence 10/10 · No issues found

🟢 Confidence 10/10 · safe to merge. Tenancy, dedupe keys and the retry/settle branches all hold; the only defect is a doc comment attached to the wrong function in AlertMemberNotifier.
1 note · tests covered · risk medium · 2/2 new units observable

An escalation step that pages a person now also queues a push page to that person's own phones, sent by MobilePushService.pageMember and settled as sent, retried, skipped or not configured, with a "phone" label in the timeline. Safe to merge.

  • loadStepRecipients queues a push recipient for members with a live device
  • MobilePushService.pageMember pushes one page per enabled phone, ignoring preferences
  • AlertMemberNotifier settles the phone page with its own failure reasons
  • pageChannelLabel and the MCP timeline render a push page as "phone"

Findings

🔵 Note · F6 · sendDirectMessage's doc comment now heads sendPush

maintainability · packages/backend/src/services/alerts/AlertMemberNotifier.ts:329-330

The block at 326-328 describes trying each of the org's chat workspaces in turn, and sendPush now sits directly under it, so its doc reads as being about chat. sendDirectMessage at 361 is left with no doc at all.

Define `sendPush` above that block (before line 326) so the workspace comment stays attached to `sendDirectMessage`.

Production impact

Production traffic of the changed files (last 7 days)
File Calls/day
packages/backend/src/services/push/MobilePushService.ts 472
Telemetry this change adds and removes (3)
  • ➕ span name MobilePushService.pageMember · packages/backend/src/services/push/MobilePushService.ts:572
  • ➕ attribute maple.push.devices_unreadable · packages/backend/src/services/push/MobilePushService.ts:598
  • ➕ attribute maple.push.devices · packages/backend/src/services/push/MobilePushService.ts:602
What was checked
  • A push row is never unreadable: input is built from the payload for every channel (AlertMemberNotifier.ts:468)
  • Email rows keep the :email dedupe key, so re-applying a step after deploy queues no duplicates
  • The app holds the time-sensitive entitlement (Maple.entitlements:33) and taps route on maple_kind (PushRegistrar.swift:358)
Observability coverage: 2 of 2 changes observable
Change Kind Observable Evidence
APNs page send per device (MobilePushService.pageMember) outbound call yes Effect.fn("MobilePushService.pageMember") span with maple.alert.rule_id, maple.alert.incident_id, maple.push.devices; failures logged with orgId/deviceId and the page row records the reason
Device read per escalation step (loadStepRecipients) db query yes runs inside the escalation apply through dbExecute/AlertsService's existing span; tenant-filtered on $.orgId.eq(orgId)

bebe88c · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

Annotations

Check notice on line 330 in packages/backend/src/services/alerts/AlertMemberNotifier.ts

See this annotation in the file changed.

@maple-review-bot maple-review-bot / Maple / review

maintainability: `sendDirectMessage`'s doc comment now heads `sendPush`

The block at 326-328 describes trying each of the org's chat workspaces in turn, and `sendPush` now sits directly under it, so its doc reads as being about chat. `sendDirectMessage` at 361 is left with no doc at all.