Skip to content

feat(ops-mission-control): show the incident.io on-call roster - #13428

Merged
bolichen97 merged 1 commit into
kirodotdev:mainfrom
stephen-meehan-lrn:feat/ops-incidentio-roster
Nov 8, 2026
Merged

bolichen97 merged 1 commit into
kirodotdev:mainfrom
stephen-meehan-lrn:feat/ops-incidentio-roster

Conversation

@stephen-meehan-lrn

@stephen-meehan-lrn stephen-meehan-lrn commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

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_ids makes 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

  • Changing who is authorized to act. The off-shift vote still comes only from _on_shift_sync; the roster is display only.
  • A PagerDuty roster, or a save-time check on pagerduty_user_id (deferred until PagerDuty's GET /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.
  • Discovering an operator's schedules automatically; schedule_ids stays 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".

Piece What it does
incidentio.roster() Streams the final schedule entries (overrides applied) for up to _MAX_ROSTER_SCHEDULES configured schedules over 14 days, following the endpoint's cursor. It keeps the soonest _MAX_ROSTER_WINDOWS shifts with ids and names clamped, in the same shape as schedule_file.roster().
rotation._roster_safely rotation.yaml still wins when present. Otherwise the incident.io roster fills describe()["roster"], and each roster now carries a source.
On-call card Shows members by display name and adds "Your next shift" for both sources. It renders every incident.io roster, even an empty one, shows incident.io's own warning when you have no shifts, and the rotation.yaml warnings only for schedule-file.
PUT /settings Asks incident.io GET /v2/users/{id} before storing incidentio_user_id. A definite 404 is refused with unknown_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 source field was needed to keep the two rotations apart.

The roster is display only. The off-shift vote still comes from _on_shift_sync alone. 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 because schedule_ids is agent-writable, with one deadline over the whole read, and the count left out is logged. Its two errors, "no schedule_ids" and "incident.io did not answer (HTTP n)", travel as error_code and 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/, and en-XA.json is regenerated.

Settings' on-call schedule card is only handed a schedule-file roster, or the source-less {}, because it seeds its GitHub-login field from roster.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 /settings now refuses an incidentio_user_id that 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.py covers the roster and the save-time checks. The roster reads final, not scheduled, 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, and describe falls 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, like schedule_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 carries source: "schedule-file".
  • The schedule-file roster fixtures in website/src/test/OpsMissionControlPageCoverage.test.tsx and OpsMissionControlSettings.coverage.test.tsx now carry source: "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):

  • The roster built from three live schedules: 45 entries, 6 people, and the operator's upcoming shifts, with no error. The on-shift check agreed with it.
  • user_exists returned True for a real user id and False for both a stale id and a display name.
  • Surfacing the "no 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/main checkout 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:

On-call team card for incident.io: three people, one on call now, and Your next shift

incident.io roster, this operator has no shifts in the window:

On-call team card with the muted incident.io no-shifts line

An identity with no schedule_ids: the card renders for the error alone:

On-call team card showing only the no-schedules error, naming schedule_ids

A key incident.io refused (here an expired one, HTTP 401) points at the key, not connectivity:

On-call team card saying incident.io refused the API key (HTTP 401) and to check the key in Settings

A read stopped at this app's own limit (deadline or page cap) says so, not that incident.io failed:

On-call team card saying the read stopped at this app's own limit

A capped roster says it is partial, never "you are on no schedule":

On-call team card with two members and the only-the-soonest-shifts notice

The rotation.yaml roster gains "Your next shift" too:

Schedule-file on-call team card with leader badge and Your next shift

Settings refuses an incident.io id the vendor does not know:

Settings incident.io user ID field with the unknown-user refusal notice

Related Issues

no linked issue: this is follow-up work on the incident.io provider from #4951, which is merged.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

🤖 Generated with Claude Code

@stephen-meehan-lrn
stephen-meehan-lrn requested review from a team and chenmingwei23 September 24, 2026 17:21
@stephen-meehan-lrn

Copy link
Copy Markdown
Contributor Author

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.
Not a goal: changing who is authorized to act. The off-shift vote still comes only from _on_shift_sync; the roster is display only. No PagerDuty roster, no schedule auto-discovery.

@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention labels Sep 24, 2026
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of b8a4933eace6b05c939a1f5ca0766a12851eca57 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ✅ PASS

UX-level review of b8a4933eace6b05c939a1f5ca0766a12851eca57 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • The incidentio_error_key_refused text sits under the "Schedule problem:" prefix (attachment-04), but a refused API key is not a schedule problem. For coded incident.io errors, drop the prefix or use "incident.io problem:".
  • The incidentio_error_cut_short text ("stopped at this app's own limit before incident.io finished", attachment-05) describes the mechanism. Say what the user sees instead, e.g. "Too many shifts to load in time; none are shown. Retrying in a minute."
  • schedule_ids in incidentio_error_no_schedule_ids and incidentio_not_on_roster is a raw config key. If Settings shows that field under a human label, use the label here.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of b8a4933eace6b05c939a1f5ca0766a12851eca57 via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Every item answers a harm the description shows on a real install (an id that matched nobody, no schedule_ids). Two notes: the new code re-implements the existing vendor read, and it is a feature added to a built-in app that is due to leave core.

Notes

  • Item 1 — duplicate of incidentio.py:313-326: the new _schedule_entries is a second reader of /v2/schedule_entries that parses final the same way. _on_shift_sync keeps its own unpaged copy, so the endpoint now has 2 call sites (grepped schedule_entries in backend/). Subtraction: delete the inline loop in _on_shift_sync and have it call _schedule_entries(id, now, now + _SHIFT_WINDOW, deadline).
  • Items 1–3, 6–7 — oversized: AGENTS.md allows "fixing one in place until it leaves" for built-ins moving out under Move every built-in app out to KiroCrewApps and forbid built-in apps #26967. This is a feat: that adds about 350 backend lines, a cache, a heap and a spec section to apps/builtins/ops_mission_control, all of which must later move out completely. Subtraction: keep the save-time 404 refusal (item 4), which fixes a real defect, and defer the roster to the app's own repository.

What this change ships

Inventory (9 items) — 7 justified

Intent: let an incident.io operator see their rotation and have a broken identity or schedule setup surface on screen. ADDITION, plus one fix.

  1. On-call card renders incident.io roster (names, shifts, 14 days) — oversized
  2. "Your next shift" line for both roster sources — justified
  3. Card shows "no schedule_ids" / key-refused / unreachable errors — oversized
  4. Settings save refuses an incident.io id that 404s — justified
  5. Roster payload gains source; warnings branch on it — justified
  6. Capped walk, "partial" notice, cut_short error — justified
  7. Roster cached 5 min / 60 s / Retry-After, single build — justified
  8. Settings schedule card only receives the schedule-file roster — justified
  9. reset_roster_cache() test-only hook — justified

[FIRST-PRINCIPLES-REVIEWED] b8a4933

Description read

[DESCRIPTION-READ] b56076b5d46d77de1f6794e431361880c636937d1189cf54676aa30ef9168836

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed b8a4933eace6b05c939a1f5ca0766a12851eca57 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] b8a4933

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed b8a4933eace6b05c939a1f5ca0766a12851eca57 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] b8a4933

@stephen-meehan-lrn

Copy link
Copy Markdown
Contributor Author

mechanism: positive admit of the roster into Settings' on-call schedule card

  • Settings excludes the incident.io roster by negative match

fixed in 93baf46: SettingsPanel.tsx now hands the card a roster only when source is absent (the documented {}) or 'schedule-file', so a future pagerduty roster is kept out without an edit there.
Pinned by never seeds the GitHub login from another rotation's roster in OpsMissionControlSettings.coverage.test.tsx, which fails when the filter is removed (checked).

@stephen-meehan-lrn

Copy link
Copy Markdown
Contributor Author
  • Subtitle says "your shifts" but lists every member

fixed in 93baf46: incidentio_roster_window now reads "incident.io · shifts over the next two weeks" in en and every translation that carried "your"; zh-CN, ja and ko never did. en-XA.json is regenerated.
The module and roster() docstrings now say "every shift on the configured schedules" too.

@stephen-meehan-lrn

Copy link
Copy Markdown
Contributor Author
  • Raw exception text in the Schedule problem notice

fixed in 93baf46: the card now gets a fixed phrase, "incident.io did not answer (HTTP n)" (or without the status for a non-HTTP failure), and the exception detail goes to logger.warning.
The status stays because it is what the operator acts on (401: key, 429: wait, 5xx: vendor). Pinned by test_a_failed_read_degrades_to_an_error_instead_of_raising.

@stephen-meehan-lrn

stephen-meehan-lrn commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor Author
  • pagerduty_user_id has the same silent off-shift failure

Superseded in b1d2c88: a PagerDuty check was added in 93baf46, then removed because no live PagerDuty account was available to confirm GET /users/{id} returns 404 only for an unknown user, and a check that refused every id would lock the operator out.
The sibling defect stays real and is recorded in the module spec: PagerDuty's check waits until that vendor behaviour is confirmed live. This PR's save-time check covers incident.io only, the one verified against a real account.

@stephen-meehan-lrn

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: _MAX_ROSTER_WINDOWS / _MAX_ROSTER_TEXT admission at retention

  • Roster retention is unbounded

fixed in 93baf46: _build_roster collects shifts transiently, sorts them, and admits only the soonest _MAX_ROSTER_WINDOWS; members are created only inside that admitted loop, so a refused shift leaves no row anywhere.
Ids and names are clamped to _MAX_ROSTER_TEXT before retention; the overflow is counted in the payload's truncated and logged once per build (one build per cache miss).
Pinned by test_the_cached_roster_is_bounded_in_count_and_in_every_string.

@stephen-meehan-lrn

Copy link
Copy Markdown
Contributor Author
  • Subtitle and docstrings claim the roster is the operator's alone

fixed in 93baf46: the subtitle now reads "incident.io · shifts over the next two weeks", and the module docstring and roster()'s first line say every shift on the configured schedules, this operator's included.

@stephen-meehan-lrn

Copy link
Copy Markdown
Contributor Author
  • rotation.py comment on the roster key still names only the committed schedule

fixed in 93baf46: the comment now names both sources (a committed rotation.yaml, else incident.io's configured schedules), points at source and _roster_safely, and says the key is empty when neither has a roster.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 24, 2026
@stephen-meehan-lrn

Copy link
Copy Markdown
Contributor Author
  • Missing rendered evidence of this revision

fixed in the description (no code change): it now carries five github.com/user-attachments stills of the current head's surfaces — the populated incident.io card with Your next shift, the incident.io no-shifts warning, the error-only card for an identity with no schedule_ids, the rotation.yaml card with Your next shift, and the Settings unknown-id refusal.
They come from an isolated gateway running this branch with fixture names. The evidence re-run happens with the next lane run on this PR.

@stephen-meehan-lrn

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: streamed schedule walk into a bounded earliest-shift heap

  • Roster cap follows unbounded accumulation

fixed in b1d2c88: _schedule_entries is now a generator (one page at a time), the walk covers at most _MAX_ROSTER_SCHEDULES schedules, and a heap bounded by _MAX_ROSTER_WINDOWS keeps only the soonest shifts as they stream in, evicting the latest; nothing accumulates before the cap.
Members come only from kept shifts; ids and names are clamped before retention; the left-out count and unwalked schedules are logged once per read. The cache key is the capped, clamped schedule list too.
Pinned by test_the_roster_is_bounded_while_walking_and_in_every_string (walk stops at the schedule cap, a later shift is evicted, the overflow is logged).

@stephen-meehan-lrn

Copy link
Copy Markdown
Contributor Author
  • Rendered evidence of this revision is absent

fixed in the description (no code change): it now carries five github.com/user-attachments stills — populated incident.io card with Your next shift, the no-shifts warning, the error-only card, the rotation.yaml card with Your next shift, and the Settings unknown-id refusal — from an isolated gateway running this branch with fixture names.

@stephen-meehan-lrn

Copy link
Copy Markdown
Contributor Author
  • The diff reshapes the board's on-call card; screenshots of each state required

fixed in the description (no code change): each state named in the Clears-when line has its own github.com/user-attachments still — incident.io populated, no-shifts warning, error-only, the schedule-file card with Your next shift, and the Settings refusal. Captions name each one.

@stephen-meehan-lrn

Copy link
Copy Markdown
Contributor Author
  • PagerDuty save-time check never run against a live account

fixed in b1d2c88 by subtraction: no live PagerDuty account is available to verify GET /users/{id}, so the PagerDuty check, its route hunk, its refusal message and tests are removed; pagerduty.py is identical to main.
The spec records that PagerDuty's identity has the same silent failure and that its check waits until the vendor's 404 semantics are confirmed live.

@stephen-meehan-lrn

Copy link
Copy Markdown
Contributor Author
  • Backend-built card errors render in English inside a translated card

fixed in b1d2c88: the roster now sends error_code (no_schedule_ids, or unreachable with error_status) and the card translates it through rosterErrorText; the three strings are in every catalog. The English error stays for logs and for schedule-file parse errors, which carry the parser's own words.
Pinned by two tests in OpsMissionControlRoster.test.tsx that render each code and assert the translated text.

@stephen-meehan-lrn

Copy link
Copy Markdown
Contributor Author
  • "Schedule problem:" frames a credential fault as a schedule fault

rebutted as proportional: schedule_problem is the card's existing lead-in for anything that stops the roster being read — it means "the on-call schedule could not be shown", not "your schedule is misconfigured" — and the sentence after it names the actual remedy ("Check the incident.io key in Settings"). A second wrapper just for incident.io would make one card speak two ways about the same failure slot.

@stephen-meehan-lrn

Copy link
Copy Markdown
Contributor Author
  • Use a neutral wrapper instead of schedule_problem for key and unreachable errors

rebutted, for the reason given on span 5ae73ed5d3d1: the shared lead-in names the card's subject, the inner sentence names the fault and remedy, and splitting the wrapper by source would fork one ErrorNotice slot into two framings. Left for a maintainer to request if they want it.

@stephen-meehan-lrn

Copy link
Copy Markdown
Contributor Author
  • The generic HTTP-5xx and no-status failures appear in no screenshot

rebutted as proportional, as this lane notes: they render in the same ErrorNotice slot shown in attachments 03–05, differing only in the translated sentence, and each variant's copy and interpolation is pinned by its own card test (names the HTTP status of a failed read from its code, not the server English, says a failed read with no HTTP status did not answer).

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 29, 2026
@iamwhatever
iamwhatever force-pushed the feat/ops-incidentio-roster branch from d1ab067 to 57f2612 Compare October 20, 2026 01:57
@iamwhatever

iamwhatever commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

span=869635db10b6
self-added: yes
mechanism: me_seen across the whole walk plus a partial flag the card reads

  • The keep-the-soonest heap, partial and me_seen duplicate cut_short

rebutted: cut_short and partial report different events. cut_short is raised when the walk hits its deadline or page cap and shows no roster at all. partial means the walk finished but the shift or schedule cap dropped entries, and the soonest shifts are still shown.
Removing the partial path reopens the defect it was added for (opus span 4f17777512f6 at 6257906): a cap that evicts this operator's shift would show "you are on no schedule" for a correct setup. Raising cut_short instead would blank the card for any agent-written schedule_ids list past the cap.
Pinned by test_a_cap_that_evicts_this_operators_shift_does_not_call_them_off_the_roster and test_schedules_past_the_cap_make_the_roster_partial.

@iamwhatever

iamwhatever commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

span=48fc67df0589

  • Wrong error prefix: Schedule problem: in front of key and limit errors

rebutted as proportional, as at d1ab067 (span 5ae73ed5d3d1): schedule_problem is the on-call card's existing error wrapper, shared with the rotation.yaml roster, and the sentence after it names the real fix ("check the key in Settings", "retries in a minute").
A new wrapper per source would change the schedule-file card's copy in every locale, which is outside this PR's goal.

@iamwhatever

Copy link
Copy Markdown
Contributor

Design Review punchline at a0cc0d7 (404 vs 401/403 for a key without user-read permission): incidentio.user_exists refuses only on a definite 404 and treats every other status, 401 and 403 included, as "cannot say", so the save goes ahead. The author's live run showed True for a real user id with a real key. Whether a key lacking a users scope gets 403 rather than 404 has not been checked on a live account from here; a maintainer with an incident.io account can confirm with one GET /v2/users/<id> using a restricted key.

@iamwhatever

iamwhatever commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

span=180ad120dbc7

  • Two error messages have no screenshot

rebutted as proportional, as at d1ab067 (span 2842fe2c2058): both render in the same ErrorNotice slot shown in attachments 03-05 and differ only in the translated sentence.
Each variant's copy and interpolation is pinned by its own card test: names the HTTP status of a failed read from its code, not the server English and says a failed read with no HTTP status did not answer.

@iamwhatever

iamwhatever commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

span=ea0364d886cb

  • No first-time reader has seen the card states

needs-a-decision: a blind first-time read is out of reach from a fork PR, as at ba2c502 (span 08a8478d6be2). Asking a maintainer to accept the screenshot-level review (every state has its own still in the description) or to run the same-repo UX lane's blind read.

@iamwhatever

iamwhatever commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

span=5dc83595ff88

  • Reword incidentio_error_cut_short

rebutted, as at ef1ba0a (span 3e8c52411946): the suggested "showing none" wording is only true for the deadline; the same code also covers the page cap, and both are this app's limits, which is what tells the operator the vendor and the key are fine.
The current text already ends with the retry, so it says what happens next.

@iamwhatever

Copy link
Copy Markdown
Contributor

span=99bfcc1f6dd7
self-added: yes
mechanism: bounded earliest-shift heap plus partial flag

  • The heap and partial chain duplicate the schedule x page walk bound

rebutted: _MAX_ROSTER_SCHEDULES x _MAX_ENTRY_PAGES bounds requests, not entries. A page has no size cap from this side (one live 90-day read returned 258 entries in one page), so without the heap what the walk holds and the 5-minute cache keeps grows with vendor page size on an agent-writable schedule_ids list.
Removing partial also reopens the earlier defect (a cap evicting this operator's shift read as "you are on no schedule"). Pinned by test_a_cap_that_evicts_this_operators_shift_does_not_call_them_off_the_roster.

@iamwhatever

Copy link
Copy Markdown
Contributor

span=aa6f413a5152

  • A rejected API key is shown as a schedule problem

rebutted as proportional, as on earlier heads: schedule_problem is the on-call card's shared error wrapper, also used by the rotation.yaml roster, and the sentence inside it names the real fix (check the key in Settings). A per-source wrapper would change the schedule-file card's copy in every locale, outside this PR's goal.

@iamwhatever

Copy link
Copy Markdown
Contributor

span=abc705549441

  • The cut-short message talks about internals

rebutted, as on earlier heads: naming this app's own limit is what tells the operator the key and the vendor are fine, so they do not go checking either. The message already ends with the automatic retry.

@iamwhatever

Copy link
Copy Markdown
Contributor

span=2996a2cc842f

  • Reword cut_short and render it muted

rebutted: the suggested "too many shifts" is only one of its two causes; the same code covers the 8 s deadline on a slow vendor. While it shows, the card has no roster at all, which is an error state, unlike incidentio_roster_partial, where the soonest shifts are still listed.

@iamwhatever

Copy link
Copy Markdown
Contributor

span=484ff16f577f

  • Add screenshots of the two generic unreachable errors

rebutted as proportional: both render in the same ErrorNotice slot shown in attachments 03-05 and differ only in the translated sentence. Each variant's copy is pinned by its own card test (names the HTTP status of a failed read from its code, not the server English, says a failed read with no HTTP status did not answer).

@stephen-meehan-lrn

Copy link
Copy Markdown
Contributor Author

@iamwhatever thanks for picking this up and rebasing it on 20 Oct, and for answering the UX and First Principles reviews.

Your 21ed2286e has fallen about 1,800 commits behind main. I rebased it unchanged onto 74575ad712 with no conflicts. Locally, the backend gates pass and its 1,186 tests pass. The frontend checks (tsc, eslint, i18n, jscpd, build) pass and its 1,369 tests pass.

Next steps — what would you like?

  1. Rebase: shall I force-push it (lease pinned to your 21ed2286e, so it refuses if you've pushed since), or would you rather rebase it yourself?
  2. Red checks on 21ed2286e: Backend Tests (3.12, 2) failed on the test_facade_mirror_guards timeout, which this PR doesn't touch, and Coverage Gate and PR Readiness also failed. Are you happy to re-run those after the push, or is there something on our side to fix?
  3. Merge: is anything else needed before you can approve? For example, a blind UX read, or any change you'd still like to the roster or the save-time check.

@iamwhatever iamwhatever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_id are deferred until PagerDuty's GET /users/{id} can be confirmed. That is promised later work, and PagerDuty keeps the silent off-shift failure this PR fixes for incident.io (
    if inc_user and await asyncio.to_thread(incidentio.user_exists, inc_user) is False:
    ). 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_seen are 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.
    "incidentio_error_cut_short": "The roster read stopped at this app's own limit before incident.io finished, so no shifts are shown. It retries in a minute.",
  • 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.
    "incidentio_error_cut_short": "The roster read stopped at this app's own limit before incident.io finished, so no shifts are shown. It retries in a minute.",
  • UX Review: messages show the raw schedule_ids key. wording nit; the key is the config field name the provider's settings use, and the message still says where to fix it.
    "incidentio_error_no_schedule_ids": "An incident.io user ID is set but schedule_ids is empty, so this instance counts as off shift on every check. Add the schedules you are on to schedule_ids in Settings.",

— crew-pr-reviewer (r145)

@iamwhatever

Copy link
Copy Markdown
Contributor

Re: review 5764898692 (crew-pr-reviewer r145): the deferred PagerDuty roster and save-time pagerduty_user_id check are now tracked in #29482, linked under Not a goal in the description. No code change, head stays d8a7619.

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 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants