Repository navigation
feat(ops-mission-control): show the incident.io on-call roster - #13428
Conversation
|
Intent: Let an incident.io operator see their rotation on the Ops Mission Control board (who is on, their own next shift) and make a setup that cannot answer the on-shift question visible, instead of a silent off-shift vote. |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns: the roster is display-only and kept apart from the off-shift vote, the walk is bounded and cached, and the one take-away (refusing a 404 identity) is listed with its only writer. Notes
[DESIGN-REVIEWED] b8a4933 Description read[DESCRIPTION-READ] 39561a39c44a34cf48d88186528db6e637beda1c9a59170191f2c4fb72f2f82e That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5, fork) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The screenshots show every new card state and the identity refusal, but no first-time reader has seen them because this lane has no blind read; pushing the branch to this repository runs one. Notes
[UX-REVIEWED] b8a4933 Description read[DESCRIPTION-READ] b862a8f1cc0dc5b10823d136ed08f536e0614e2e03b99232fc7ac397bb764543 That sha256 names everything this verdict read: the PR description, plus the 11 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Every item answers a harm the description shows on a real install (an id that matched nobody, no Notes
What this change shipsInventory (9 items) — 7 justifiedIntent: let an incident.io operator see their rotation and have a broken identity or schedule setup surface on screen. ADDITION, plus one fix.
[FIRST-PRINCIPLES-REVIEWED] b8a4933 Description read[DESCRIPTION-READ] b56076b5d46d77de1f6794e431361880c636937d1189cf54676aa30ef9168836 That sha256 names the PR description this verdict read. Recompute it with |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
48266d9 to
93baf46
Compare
|
mechanism: positive admit of the roster into Settings' on-call schedule card
|
|
|
|
|
self-added: yes
|
|
|
|
93baf46 to
b1d2c88
Compare
|
self-added: yes
|
|
|
|
|
|
|
|
d1ab067 to
57f2612
Compare
|
span=869635db10b6
|
|
span=48fc67df0589
|
|
Design Review punchline at a0cc0d7 (404 vs 401/403 for a key without user-read permission): |
|
span=180ad120dbc7
|
|
span=ea0364d886cb
|
|
span=5dc83595ff88
|
|
span=99bfcc1f6dd7
|
|
span=aa6f413a5152
|
|
span=abc705549441
|
|
span=2996a2cc842f
|
|
span=484ff16f577f
|
|
@iamwhatever thanks for picking this up and rebasing it on 20 Oct, and for answering the UX and First Principles reviews. Your Next steps — what would you like?
|
iamwhatever
left a comment
There was a problem hiding this comment.
Request changes at d8a7619: one deferred follow-up needs a linked issue.
The incident.io roster itself looks sound: it is display-only (the off-shift vote still comes only from _on_shift_sync), bounded by schedule, page, window and deadline caps, cached with a single shared build, and built off the event loop. The save-time check refuses only a definite 404. CI is green, every AI lane passes, and the earlier findings are answered.
Blocker
- "Not a goal" says the PagerDuty roster and a save-time check on
pagerduty_user_idare deferred until PagerDuty'sGET /users/{id}can be confirmed. That is promised later work, and PagerDuty keeps the silent off-shift failure this PR fixes for incident.io ( ). Please open an issue for it and link it in the description. No code change is needed.
AI findings judged non-blocking
- Design Review: keep the roster inside the app's own tree for the #26967 move-out. it is: all backend code is under apps/builtins/ops_mission_control and the UI under website/src/apps/ops-mission-control.
- First Principles Review:
partial/me_seenare oversized; raise cut_short instead. answered at earlier heads (rebuttal 6283035963) and I agree: partial still lists the soonest shifts, and dropping it would call a correctly configured operator 'not on the roster'. - First Principles Review: a feat grows a built-in that is leaving core. AGENTS.md and the no-new-builtin-apps rule forbid new apps and new core references, not changes inside an existing built-in's own directory.
- UX Review: two unreachable-error copies have no screenshot. answered at earlier heads; both render in the same ErrorNotice slot and each string is pinned by a card test.
KiroCrew/website/src/i18n/locales/en.json
Line 2959 in d8a7619
- UX Review: cut_short copy describes the mechanism. answered at earlier heads; naming the app's limit tells the operator the key and vendor are fine; wording nit.
KiroCrew/website/src/i18n/locales/en.json
Line 2959 in d8a7619
- UX Review: messages show the raw
schedule_idskey. wording nit; the key is the config field name the provider's settings use, and the message still says where to fix it.KiroCrew/website/src/i18n/locales/en.json
Line 2961 in d8a7619
— crew-pr-reviewer (r145)
The board's on-call card only rendered a committed rotation.yaml, so an operator on incident.io could see whether they were on shift right now but never who else was on, when their next shift was, or that their setup could not answer at all. incident.io now builds the same roster from the final entries of the configured schedules over the next 14 days, cached for the polled board and display only. rotation.yaml still wins when present, each roster carries a source, and the card shows "Your next shift" for both. An identity with no schedule_ids surfaces as an error instead of a silent off-shift vote, and PUT /settings refuses an incident.io user id the vendor answers 404 for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bolichen97
left a comment
There was a problem hiding this comment.
Approving b8a4933 as maintainer. All 94 checks pass.
The incident.io on-call roster stays display-only: the off-shift vote still comes from _on_shift_sync, and the roster build is bounded by schedule, page, window and deadline caps, cached once and run off the event loop. All of it lives inside the app's own tree. I found no new regex in product code.
@iamwhatever, could you re-review? The point from your change request on d8a7619 is addressed: the PagerDuty roster and the pagerduty_user_id save-time check are now tracked in #29482, which the description links under "Not a goal".
Problem / Motivation
Goal: Let an incident.io operator see their rotation on the Ops Mission Control board (who is on, their own next shift), and make a setup that cannot answer the on-shift question visible instead of a silent off-shift vote.
On incident.io, Ops Mission Control could tell you whether you were on shift right now, and nothing else. The board's "On-call team" card only knew how to read a committed
rotation.yaml, so an incident.io operator never saw who else was on, when their own next shift was, or that their setup could not answer at all.Two setup mistakes were also silent. An identity with no
schedule_idsmakes incident.io vote off shift on every check. So does an identity incident.io does not recognise, such as a display name pasted into the field. Both leave actions refused with nothing on screen saying why.Why it matters
The on-shift answer gates what the agent may do. When that answer is quietly wrong, work stops and the operator has no clue where to look. Showing the roster, and refusing an id that names nobody, makes a wrong setup visible the moment it happens.
Not a goal
_on_shift_sync; the roster is display only.pagerduty_user_id(deferred until PagerDuty'sGET /users/{id}can be confirmed on a live account). Tracked in ops-mission-control: PagerDuty roster and save-time user check (follow-up to #13428) #29482.schedule_idsstays operator-configured.What changed (motivation → approach → change)
The on-call card now works for incident.io, so an incident.io operator can see who is on, when their own next shift is, and when their setup cannot answer. It lists every shift on the configured schedules for the next two weeks and adds "Your next shift".
incidentio.roster()finalschedule entries (overrides applied) for up to_MAX_ROSTER_SCHEDULESconfigured schedules over 14 days, following the endpoint's cursor. It keeps the soonest_MAX_ROSTER_WINDOWSshifts with ids and names clamped, in the same shape asschedule_file.roster().rotation._roster_safelyrotation.yamlstill wins when present. Otherwise the incident.io roster fillsdescribe()["roster"], and each roster now carries asource.rotation.yamlwarnings only forschedule-file.PUT /settingsGET /v2/users/{id}before storingincidentio_user_id. A definite 404 is refused withunknown_incidentio_user. No key yet, or any other failure, still saves.Reusing the existing roster shape meant the card, its tests and its warnings mostly came for free. Only a
sourcefield was needed to keep the two rotations apart.The roster is display only. The off-shift vote still comes from
_on_shift_syncalone. Because the roster rides on the polled/state, it is cached for 5 minutes (60 s after a failed read). Both the walk and what it keeps are bounded becauseschedule_idsis agent-writable, with one deadline over the whole read, and the count left out is logged. Its two errors, "noschedule_ids" and "incident.io did not answer (HTTP n)", travel aserror_codeand are translated on the card; the vendor's error body goes to the log.The new card strings, error messages and the refusal message are translated in every catalog under
website/src/i18n/locales/, anden-XA.jsonis regenerated.Settings' on-call schedule card is only handed a
schedule-fileroster, or the source-less{}, because it seeds its GitHub-login field fromroster.me. The module spec gains a section on the roster, its bounds and the save-time check. PagerDuty's identity has the same silent failure; its check is deferred until it can be confirmed on a live account, and the spec says so.Backwards compatibility
Breaking:
PUT /settingsnow refuses anincidentio_user_idthat incident.io answers 404 for, where main stored it. Writer sweep on origin/main @ 19568d4: the only writer is the Settings panel's fenced-identity field (SettingsPanel.tsx→opsApi.putSettings). This PR teaches it the code, in all shipped languages. An id main already stored is never re-checked.Tests
test_providers_incidentio.pycovers the roster and the save-time checks. The roster readsfinal, notscheduled, keeps members in first-shift order, and tells "not on the roster" apart from "off shift now". It follows the cursor with the window end unchanged and reads the API once per TTL. The walk is capped at the schedule count, the page count and one deadline, keeps only the soonest shifts, clamps every id and name, and logs the overflow; a cap that drops this operator's own shift marks the roster partial instead of calling them off it. A failed read or an identity with no schedules comes back as a coded error, never a raise, anddescribefalls back to this roster. The user check asks the right URL, path-escaped, with its own short timeout and only when configured; only a 404 says no. Concurrent cache misses share one build, and each request carries a short timeout.reset_roster_cache()is a test-only hook, likeschedule_file.reset_login_cache().test_config_routes.py: an unknown incident.io id is refused and leaves its sibling fields unwritten, an unverifiable id still saves, and clearing the field asks nobody.test_schedule_file.py: the schedule-file roster carriessource: "schedule-file".website/src/test/OpsMissionControlPageCoverage.test.tsxandOpsMissionControlSettings.coverage.test.tsxnow carrysource: "schedule-file", matching what the backend sends. The Settings test also pins that another rotation's roster never seeds the GitHub login.OpsMissionControlRoster.test.tsx: the card shows names, not ids, and shows "Your next shift". It never shows the GitHub-login or strict-gating warnings for incident.io, It renders both coded errors in the active language, a window with no shifts at all still shows the card and the no-shifts warning, and a capped roster says it is partial instead.Manual verification
Against a real incident.io account (read-only, nothing written to it):
user_existsreturnedTruefor a real user id andFalsefor both a stale id and a display name.schedule_ids" state is how this was found: the install had an identity that 404s and no schedules, so it voted off shift on every check.In an isolated gateway running this branch, an expired key made the card render its error, and the identity save went through as "can't verify". The screenshots below come from that gateway, with the roster and refusal responses swapped for fixture data.
The local pre-push review ran on stand-in models, not the CI lanes' pinned ones. Locally, 9 backend tests outside this app fail (macOS spawn, AWS packaging, pip detection, doctor/STT). The same 9 fail identically on a clean
origin/maincheckout on this machine, so they are environmental and CI is the authority on them.Screenshots / video
Captured from an isolated gateway running this branch, with fixture names.
incident.io roster, this operator next on tomorrow:
incident.io roster, this operator has no shifts in the window:
An identity with no
schedule_ids: the card renders for the error alone:A key incident.io refused (here an expired one, HTTP 401) points at the key, not connectivity:
A read stopped at this app's own limit (deadline or page cap) says so, not that incident.io failed:
A capped roster says it is partial, never "you are on no schedule":
The
rotation.yamlroster gains "Your next shift" too:Settings refuses an incident.io id the vendor does not know:
Related Issues
no linked issue: this is follow-up work on the incident.io provider from #4951, which is merged.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)🤖 Generated with Claude Code