Skip to content

feat(on-call): a private calendar feed per schedule, and docs for schedules and chains - #3023

Merged
Makisuo merged 87 commits into
mainfrom
oncall/calendar-feed
Nov 24, 2026
Merged

Makisuo merged 87 commits into
mainfrom
oncall/calendar-feed

Merge main after #3018 was squash-merged

4d8d519
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Nov 24, 2026 in 6m 47s

Confidence 10/10 · No issues found

🟢 Confidence 10/10 · safe to merge. The new unauthenticated route, the hashed-credential write and the page's reconcile are each pinned by tests; the token stays out of spans and logs.
no findings · tests covered · risk high · 3/3 new units observable

Adds a per-schedule iCalendar feed: a hashed one-time link, an unauthenticated GET /calendar/oncall/:file that renders shifts with stable event ids, v2 create/delete endpoints that refuse to replace a live link without replace=true, a schedule-page section, and docs. Safe to merge.

  • createCalendarFeed decides replace inside the update, so a live link is only swapped on request
  • The feed route carries its own server span while the automatic one is suppressed for the prefix
  • reconcileCalendarFeed keeps the page's own link until a later schedule read contradicts it
  • renderOnCallCalendar emits one event per shift with a hashed UID stable across fetches

Before merge

Production impact

Production traffic of the changed files (last 7 days)
File Calls/day
apps/api/src/http/api-observability.ts 4.5k
apps/api/src/routes/oncall-calendar.http.ts 559
Telemetry this change adds and removes (5)
  • ➕ span name OnCallCalendar.feed · apps/api/src/routes/oncall-calendar.http.ts:84
  • ➕ span name OnCallSchedulesService.createCalendarFeed · packages/backend/src/services/alerts/OnCallSchedulesService.ts:875
  • ➕ attribute maple.oncall.calendar_feed_replace · packages/backend/src/services/alerts/OnCallSchedulesService.ts:882
  • ➕ span name OnCallSchedulesService.deleteCalendarFeed · packages/backend/src/services/alerts/OnCallSchedulesService.ts:922
  • ➕ span name OnCallSchedulesService.calendarFeed · packages/backend/src/services/alerts/OnCallSchedulesService.ts:944
What was checked
  • Token kept out of telemetry: ONCALL_CALENDAR_PATH covers every spelling the router serves and loggablePath redacts both credential segments (api-observability.test.ts:38)
  • The 14-day render margin equals the longest rotation shift, so no shown shift is clipped and its UID does not move
  • calendar_feed_created_at and the create response share timestamp(iso(ms)), so the page's reconcile compares equal strings (v2/alerts.http.test.ts:1967)
Observability coverage: 3 of 3 changes observable
Change Kind Observable Evidence
GET /calendar/oncall/:file inbound HTTP entrypoint yes Effect.withSpan("OnCallCalendar.feed", { kind: "server" }) with http.route, http.request.method, http.response.status_code; auto span suppressed via TracerDisabledWhen
POST/DELETE /v2/alerts/oncall_schedules/{id}/calendar_feed inbound HTTP entrypoint yes v2 API group tracing plus Effect.fn("OnCallSchedulesService.createCalendarFeed") with maple.oncall.schedule_id and maple.oncall.calendar_feed_replace
Feed reads (schedule by token hash, overlapping overrides) outbound database call yes Both go through dbExecute, which emits the existing database client span

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