Repository navigation
feat(on-call): a private calendar feed per schedule, and docs for schedules and chains - #3023
Merged
Merged
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.
createCalendarFeeddecidesreplaceinside 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
reconcileCalendarFeedkeeps the page's own link until a later schedule read contradicts itrenderOnCallCalendaremits one event per shift with a hashed UID stable across fetches
Before merge
- Migration · Check it is safe on production data and with the code still deployed ·
packages/db/drizzle/20261124103947_oncall_calendar_feed/migration.sql
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_PATHcovers every spelling the router serves andloggablePathredacts 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_atand the create response sharetimestamp(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.
Loading