Repository navigation
feat(on-call): a page to a person also reaches their phone - #3024
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.
loadStepRecipientsqueues apushrecipient for members with a live deviceMobilePushService.pageMemberpushes one page per enabled phone, ignoring preferencesAlertMemberNotifiersettles the phone page with its own failure reasonspageChannelLabeland the MCP timeline render apushpage 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:
inputis built from the payload for every channel (AlertMemberNotifier.ts:468) - Email rows keep the
:emaildedupe key, so re-applying a step after deploy queues no duplicates - The app holds the
time-sensitiveentitlement (Maple.entitlements:33) and taps route onmaple_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
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.