Skip to content

fix(on-call): a step that reaches nobody no longer goes unnoticed - #3013

Merged
Makisuo merged 32 commits into
mainfrom
alerts/oncall-gaps
Nov 24, 2026
Merged

Makisuo merged 32 commits into
mainfrom
alerts/oncall-gaps

Merge main after #3012 was squash-merged

9bca24f
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Nov 24, 2026 in 9m 8s

Confidence 10/10 · No issues found

🟢 Confidence 10/10 · safe to merge. The subjectless formatCoverageWarning line and the self-contradictory checkoutSchedule fixture stay open; paging and escalation changes are pinned by PGlite tests.
2 notes · tests covered · risk medium · 3/3 new units observable

An escalation step that reaches nobody is now skipped to the next step, written to the incident timeline, and a whole pass that reaches nobody emails the org's admins. Departures from the org pass shifts on, and the API and dashboard report coverage gaps.

  • A step that reaches nobody is skipped, timeline-logged and no longer counted as sent
  • A pass that reaches nobody pages the org's admins with a telling subject
  • Departed participants' shifts pass on; coverage_gaps and departed_user_ids ship in v2 and MCP
  • Runs are labelled with the tier naming their chain; a paged schedule cannot be deleted

Before merge

Still open from earlier reviews

Production impact

Production traffic of the changed files (last 7 days)
File Calls/day
packages/backend/src/services/alerts/AlertsService.ts 5.9k
packages/backend/src/services/alerts/OnCallSchedulesService.ts 444
Telemetry this change adds and removes (4)
  • ➕ span name AlertsService.advanceEscalationStep · packages/backend/src/services/alerts/AlertsService.ts:6462
  • ➕ attribute maple.escalation.plan · packages/backend/src/services/alerts/AlertsService.ts:6502
  • ➕ attribute maple.escalation.outcome · packages/backend/src/services/alerts/AlertsService.ts:6503
  • ➕ attribute maple.escalation.last_resort_admins · packages/backend/src/services/alerts/AlertsService.ts:6553
What was checked
  • Skipped-step recursion re-writes from the position kept (alert-escalation-runs.ts:487), so the next step runs in the same tick
  • MAX_ONCALL_RENDER_RANGE_MS is 90 days (alerting-core/src/oncall.ts:18), so the 14-day gap render is never cut into a false gap
  • listMembers pages every membership, so a large org's directory is never read as people having left
Observability coverage: 3 of 3 changes observable
Change Kind Observable Evidence
escalation step that reaches nobody (skip, timeline entry, admin fallback) background worker step yes AlertsService.advanceEscalationStep span with maple.escalation.* annotations, plus structured Effect.logWarning/logError
coverage gap and departed-participant computation on schedule reads request-path computation yes runs inside OnCallSchedulesService.list/get Effect.fn spans; no new outbound call
jsonb lookup of running escalations before deleting a schedule database query yes runs through the existing db.run/dbExecute path beside the schedule's other reads

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