Skip to content

feat(ops-mission-control): add an incident.io provider - #4951

Merged
bolichen97 merged 1 commit into
kirodotdev:mainfrom
stephen-meehan-lrn:feat/ops-incidentio
Sep 17, 2026
Merged

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

Conversation

@stephen-meehan-lrn

@stephen-meehan-lrn stephen-meehan-lrn commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Ops Mission Control can ingest signals from CloudWatch, Datadog, GitHub Issues and a
generic webhook, but not from incident.io. An operator whose alerting already lives in
incident.io has no way to get those alerts onto the board: they cannot be claimed,
investigated, fingerprinted against the knowledge ledger, or resolved through the app.
The on-call schedule is equally invisible, so the rotation tier has nothing to consult
for an incident.io-based team.

Why it matters

Without a provider, an incident.io shop gets no value from the board at all — the
signals it needs to triage are exactly the ones the app cannot see. Adding it also
exercises the provider seam a second time for a rotation-capable source, which is where
the authorization boundary lives.

What changed (motivation → approach → change)

Goal: make incident.io a first-class source — signals, rotation and actions —
without weakening the existing authorization model.

Approach, and why this shape:

  • Alerts, not incidents, are the signal. An incident.io alert carries a strict
    firing/resolved status, which is the same shape as a signal's own lifecycle, so
    absence from a poll is meaningful. A declared incident is a human artefact with an
    eight-category status whose transitions run a post-incident flow; putting one on the
    board would duplicate work a responder already owns.
  • Only resolve and comment are offered. The API has no acknowledged state and
    no snooze/mute/suppress for a single alert (a maintenance window is account-level
    config). Advertising ack or silence would pass the autonomy gate and then fail at
    execute time, after the board had recorded the action as granted.
  • The rotation identity is keystone-fenced, not a provider config field.
    incident.io has no self-identity endpoint — an API key resolves to the key, not a
    person — so the operator's own user id cannot be derived at runtime. Provider config
    is agent-writable, so an identity living there could be forged to claim the shift and
    authorize a write it does not own. It sits in policy_store.OPERATOR_ONLY_KEYS as
    incidentio.user_id, written only by the authenticated PUT /settings, exactly like
    pagerduty.user_id. The write goes through _settings_write_or_refuse, the same
    path as every sibling keystone write on that route, so a store that cannot be
    written answers with a coded 503 instead of aiohttp's bare 500 — and the Settings
    panel renders that refusal through ErrorNotice, keeping the unsaved draft in the
    input, so an operator is never left believing an identity landed when it did not.
    A shared helper maps the coded refusals to task vocabulary instead of surfacing the
    raw backend reason: policy_store_unwritable becomes "Your ID was not saved — the
    settings store refused the write. Retry." (naming the refuser, so a persistently
    failing retry has a diagnosis), and the value_too_long validation 400 loses its
    snake_case settings key. The same helper covers the schedule-login and app-settings
    notices, which receive the same coded 503 from the same route; uncoded failures keep
    their backend reason verbatim. The identity help string states the off-shift
    consequence of an ID with no schedules configured, so the operator is told before
    entering that state.
  • A source with no identity abstains (ShiftStatus(on_shift=True, unknown=True)),
    matching the documented unknown contract in providers/base.py and PagerDuty's own
    abstention branches. An empty agent-writable schedule_ids with an operator
    identity present votes off shift instead, so a config write cannot manufacture the
    abstention the tier gate treats as a non-vote.
  • The poll walks the cursor, and the truncation verdict is derived from the slice.
    The alerts endpoint caps a page at 50, well under the registry's 100-signal cap, so
    a single-page read would report any estate over 50 firing alerts as a truncated poll
    on every cycle — permanently non-authoritative, so reconcile could never resolve
    one of this source's signals. The walk pages until the estate is exhausted, and the
    verdict is computed once, after the loop, from whether the final slice actually
    discarded anything — never from whichever branch ended the walk, so "dropped an
    alert but called the poll complete" is unrepresentable. The source filter runs
    inside the walk, before the cap, so both the cap and the verdict are spent only on
    alerts the board would see: a storm of alerts from unselected sources can neither
    evict a selected firing alert from the poll nor mark a fully walked, non-matching
    estate as truncated. A page ceiling
    (_MAX_ALERT_PAGES, mirroring CloudWatch's _MAX_ALARM_PAGES) bounds a provider
    that keeps handing back a cursor without ever terminating: bounded out under the
    cap, the poll raises — read by the registry as "incidentio did not answer" — rather
    than reporting a partial estate as a complete snapshot.

Also: client-side filtering of alert_source_ids (applied while paging, per the
bullet above), because the endpoint documents an alert_source[one_of] filter but not
how to encode multiple values, and a guessed encoding that matches nothing presents as
a quiet estate. The module spec's pagination
section now lists this walk beside the other four pollers, and its identity inventory
counts all three keystone-fenced identities.

Tests

tests/test_providers_incidentio.py (16 tests):

  • Rotation identity (4). A blank identity abstains and does not even query; an
    empty agent-writable schedule_ids with an operator identity present votes off shift
    rather than abstaining; a genuinely unconfigured provider abstains and fails open; the
    effective schedule (final) decides rather than the pre-override rotation rules, so
    a covered shift is not read as ours.
  • Unsupported verbs (2). supported_actions() is exactly {resolve, comment}, and
    ack/silence are refused without the provider ever being called.
  • Poll completeness (8). A cursor is followed (asserting the second request is
    made and carries after) rather than reported as truncation; an estate past the cap
    reports truncated; a terminal page that overshoots the cap still reports truncated
    (the regression guard for a dropped-but-called-complete poll); an estate of exactly
    the cap is not truncated; an empty page carrying a cursor is truncation, while an
    empty terminal page without one stays authoritative; client-side source filtering
    preserves the verdict; a cursor that never terminates is bounded by the page ceiling
    and refuses loudly instead of under-reporting.
  • Signal mapping (2). The deduplication key is the exact-match provider_key when
    present, and the alert id is carried in labels for the action path.

tests/test_config_routes.py adds a refusal test: a policy store that cannot be
written answers the identity save with a coded 503 (policy_store_unwritable) and
stores nothing. Reverting the production change while keeping the tests makes the
refusal test and the overshoot guard fail; restoring it returns them green.

OpsMissionControlSettings.coverage.test.tsx pins the notice's branches: a coded
keystone refusal renders the task-vocabulary string with the draft still in the
input, the overlong-value refusal loses its snake_case key, and an uncoded failure
keeps its backend reason verbatim.

Three poll tests pin the filter-before-cap ordering: a selected-source alert survives
a 150-alert storm from unselected sources (fails with the slice applied before the
filter), the truncation verdict is derived from matching alerts, and a fully walked
estate that matched nothing is an authoritative empty.

Three existing tests in tests/test_providers.py were extended to assert the adapter
registers and reports unconfigured rather than raising.

Manual verification

Run against a real incident.io account in an isolated pod (own KIROCREW_HOME, no
crons), not the live gateway. The provider polled 50 firing alerts and the Signals
tab showed the source ok. That run is what surfaced the one-page truncation defect
above — 50 firing alerts is exactly one page, so the source was permanently
non-authoritative and no unit test had reason to notice.

The write verbs were not executed against a live account (none is available to this
revision); their endpoint shapes and the claims the verb set rests on are checked
against the vendor's public API reference at
api-docs.incident.io: Alerts, Alert Notes, Alert
Events and Schedule Entries are documented resources; no per-alert snooze, mute or
suppress endpoint exists anywhere on the surface (MaintenanceWindows is a separate,
account-level resource); and the pagination walk follows the reference's own cursor
contract verbatim (pagination_meta.after, repeat until a page returns fewer records
than page_size). A failed action degrades to ActionResult(ok=False) on the board —
graceful and reversible, never a silently-lost action.

The screenshots below are rendered at this revision with the repo's fixture-based
capture harness (mocked API, real SPA build), so they show the shipped strings —
including the current identity help text — rather than an earlier revision's UI.

Local gate floor green on this commit: pytest (1031 passed / 44 skipped in the app
suite, 33k-test diff-scoped run with no failure attributable to this diff), black
(baselined gate), isort, flake8, mypy (no errors in touched files), tsc -b, eslint,
vitest (304 ops-mission-control frontend tests), and i18n:check green across all
locales.

Screenshots / video

The provider card, showing the new keystone-fenced identity field, its help text, and
the roles the adapter registers:

incident.io provider card with the operator identity field

The refused identity save — the keystone's coded 503 rendered in task vocabulary,
with the typed draft still in the input:

identity save refused, draft preserved in the field

The Signals tab with the source polled and firing alerts on the board
(fixture-rendered at this revision):

Signals tab showing incident.io ok with firing alerts

Related Issues

no linked issue: this adds a provider that was not tracked by an existing issue.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|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

@stephen-meehan-lrn
stephen-meehan-lrn requested review from a team August 21, 2026 15:54
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Aug 21, 2026
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Aug 21, 2026
@github-actions

github-actions Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5, fork) — ✅ PASS

Design-level review of 5b831cc3dee1f411d1f9138a9eac92fa2a612a0d via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Verify the resolve and alert-note write verbs against a live incident.io account — they ship with doc-level verification only, degrading to a visible failed action.

[DESIGN-REVIEWED] 5b831cc

@github-actions

github-actions Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review (fork) — ✅ no blocking findings

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

Review details

FINDING -- src/kiro_crew/apps/builtins/ops_mission_control/tests/test_config_routes.py:385 -- method-local "from ... import policy_store" violates top-level-imports -> Fix: use the already imported routes.policy_store and routes.rotation.
[GPT-REVIEWED] 5b831cc

@github-actions

github-actions Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5, fork) — 🟡 CONCERNS

Premise-level review of 5b831cc3dee1f411d1f9138a9eac92fa2a612a0d 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/CONCERNS are advisory.

First-Principles-Verdict: CONCERNS

Every incident.io API shape the adapter rests on — pagination, schedule final semantics, absent ack/snooze verbs — is vendor-doc-asserted and mock-tested only.

Not justified as shipped

  • Items 1–3 — unverified provider claim: the endpoints, pagination_meta.after cursor, 50-item page cap, two-value alert status, "no self-identity endpoint", and "the API has no acknowledged state and no snooze" are all asserted in the description and comments; every test mocks request_json, so nothing in this repo can confirm them. Wrong claims fail loudly or degrade (opt-in provider, raises read as "did not answer"), so this is a premise to confirm, not a blocker.
    Clears when: the poll walk, schedule final/overlap semantics, and the missing ack/snooze verbs are confirmed against a live incident.io workspace (or its published API reference) and named on the PR.

What this change ships

Inventory (10 items) — 6 justified

Intent: let an operator whose alerting lives in incident.io get those alerts onto the Ops Mission Control board, with rotation and actions — an ADDITION.

  1. incident.io firing alerts appear on the board as signals (opt-in) — unverified provider claim
  2. incident.io on-call schedules can decide the shift gate — unverified provider claim
  3. Resolve and comment offered on incident.io signals; ack/silence refused — unverified provider claim
  4. New operator-only incidentio.user_id setting, saved via Settings, keystone-fenced — justified
  5. New agent-writable provider config keys alert_source_ids / schedule_ids — justified
  6. Settings-save refusals now show task-vocabulary text (also on existing PagerDuty/login/app-settings notices) — justified
  7. New OpsApiError class carrying the backend's machine code — justified
  8. PagerDuty identity field now rendered from a two-entry shared registry, same behavior — justified
  9. Identity label/help and refusal strings added in 12 locales — justified
  10. Four en.json backup-attribution strings re-encoded (\u00b7 → ·, no visible change) — undeclared, rides along

[FIRST-PRINCIPLES-REVIEWED] 5b831cc

@github-actions

github-actions Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5, fork) — 🟡 CONCERNS

UX-level review of 5b831cc3dee1f411d1f9138a9eac92fa2a612a0d via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

No first-time reader has seen the new identity field or refusal copy, and three changed error strings were never shown rendered.

Watch

  • All new controls appear in the attachments (provider card, identity field + help, refusal notice with preserved draft, Signals row), but no blind reader has judged them — comprehension of the three-sentence help string ("Matched against the users on your incident.io schedule…") is unverified, this lane's cap. Push the branch to this repo if a blind read is wanted.
  • change_save_refused, value_too_long_refused, and the schedule-login refusal now render new copy through existing ErrorNotices, and no screenshot shows them; only the identity variant (attachment-02) is evidenced. Rare paths, same component, so low risk — but a human should eyeball them or the author attach one render.
  • loginMutation now maps policy_store_unwritable to "Your ID was not saved…" under the field labeled "Your GitHub login" (settingsRefusalMessage(loginMutation.error, 'identity')): term drift ("ID" vs "login") at the moment of failure, every time that refusal fires.

Suggestions

  • Add a login-subject variant (e.g. "Your login was not saved — …") or reuse change_save_refused for omc-schedule-login, so the refusal names what the field names.

[UX-REVIEWED] 5b831cc

@github-actions

github-actions Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review (fork) — ✅ no blocking findings

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

Review details

I've verified the load-bearing facts myself: DEFAULT_POLL_LIMIT = 100 (so the terminal-overshoot and exactly-at-cap test traces resolve correctly), and request_json's signature matches every call site in the adapter (method/headers/params/body).

Tracing the pagination loop by hand against each edge (empty-page-with-cursor → truncated; terminal overshoot → cap break then post-loop truncated=True on the slice; exactly-at-cap → not truncated; all-non-dict junk → raises on the ceiling; filtered storm → walks past unselected pages): the verdict is always derived from the same len(alerts) fact that drives the slice, so "dropped an alert but called the poll complete" is genuinely unrepresentable. The _on_shift_sync fail-closed/abstain matrix, the _covers containment check, supported_actions advertising only verbs the API has, and the routes.py keystone-fenced write all hold up. The candidate summary's "No candidates" is correct, and I found nothing groundable to the Step 2 bar.

No findings.

[OPUS-REVIEWED] 5b831cc

@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 Aug 21, 2026
@stephen-meehan-lrn

Copy link
Copy Markdown
Contributor Author

Both blocking findings land in incidentio.py, and they get different answers. Fixed in b92bce94a933c97ef010193c6a9e83b0e29880b6.

  • Future shifts authorize actions before handoff (incidentio.py:265) — fixed.

Confirmed against the code. entry_window_start/end selects schedule entries that OVERLAP the window rather than ones containing it, and the match loop filtered only on user.id, never on whether the entry was in force. With _SHIFT_WINDOW = timedelta(minutes=1) the concrete exposure is up to 60 seconds of early authorization: an entry starting at now + 30s was returned and read as on_shift=True while the outgoing engineer still held the page. The magnitude is small but the mechanism is exactly as described, and it scales with a constant a later change could widen.

The fix does not narrow the window, because the window is only there to satisfy the endpoint's required range parameter. Instead the matched entry must now contain the instant: a new _covers(entry, now) requires start_at <= now < end_at, so the window's width decides how far ahead we LOOK and never who is judged on call. A missing or unparseable bound returns False rather than True: this value feeds an authorization gate, so an entry that cannot be evaluated does not grant the shift.

Four tests pin it (TestIncidentIoAuthorizesOnlyTheShiftInForce): a shift starting in 30s does not authorize, the shift containing now still does, and each of an absent start_at and an unparseable end_at fails closed. Proven rather than assumed - reverting only the _covers call makes 3 of the 4 fail and leaves the control passing. App suite 933 passed / 44 skipped.

  • Agent-writable schedule selection bypasses the rotation fence (incidentio.py:98) — needs-a-decision, and the question is for the maintainer.

The concern holds in the abstract and I am not disputing the mechanism: on-shift is a function of BOTH the identity and the schedule list, the identity is keystone-fenced (policy_store.INCIDENTIO_USER_KEY, operator-only), and schedule_ids is in config_fields and therefore writable through PUT /provider/<id>/config. So the constrained party cannot change who it claims to be, but it can change which rotation is consulted, and if the operator is genuinely on call on some other schedule that write yields on_shift=True for a rotation the operator never nominated for automation.

What stops me acting on it unilaterally is that this is the established core shape, not something this PR introduces. The reference adapter has it identically: pagerduty.py:103 lists schedule_ids in config_fields, and its own comment at pagerduty.py:186 states outright that schedule_ids lives in agent-writable config.json. This adapter mirrors that split deliberately, including the empty-list-with-identity vote that exists so a config write cannot manufacture an abstention.

So fencing schedule_ids here would diverge from the convention every other rotation provider follows AND leave the identical exposure in PagerDuty, which means it would not actually close the hole it names. Whether the rotation fence should cover schedule selection as well as identity is a contract change across all rotation providers, and that is a maintainer's call rather than mine to make inside a new-provider PR. Deliberately not filing an issue for it, because what is missing is the decision, not a task someone could pick up.

If the ruling is that the fence should cover it, the shape is a new operator-only keystone key holding the schedule list for every rotation provider, with schedule_ids removed from both adapters' config_fields - happy to do that here or in a follow-up, whichever you prefer.

@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 Aug 21, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) August 24, 2026 06:57
auto-merge was automatically disabled August 25, 2026 09:19

Head branch was pushed to by a user without write access

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Aug 25, 2026
@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: checking Automated validation is still running labels Sep 15, 2026
@NicholasRBowers

Copy link
Copy Markdown
Contributor

🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]

Round 3 on 2f9b5d02a — the UX round on e195731ec (BLOCK: evidence gap, one Watch, one Suggestion), all three taken:

  • Evidence gap (the BLOCK): closed with a new frame. The body's Screenshots section now includes the refusal state itself — the identity save answered by the keystone's coded 503, rendered as a notice with the typed draft still in the input. Captured on the same fixture harness as the other frames, at this head.
  • Suggestion: the notice no longer prints the raw OSError. req now surfaces the error body's code on a typed OpsApiError, and the identity site maps policy_store_unwritable to task vocabulary ("Your ID was not saved — retry.") in all 13 locales. Uncoded failures keep their backend reason verbatim. Two tests pin both branches, including the draft surviving the refusal.
  • Watch: the help string now states the off-shift consequence. incidentio_user_id_help gained the clause "With an ID set but no schedules configured, this instance stays off shift." across en + 11 translated locales + regenerated en-XA — so the operator is told about the state every signals-only install passes through, not just the blank-ID case.

Verified locally: tsc, eslint, both i18n gates, comment-history gate, 156 ops frontend tests (75 in the settings file, incl. the 2 new pins). Rebased onto current main (#7237); single commit, Stephen Meehan preserved as author.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: no
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]

  • Help text silent on the ID-set / no-schedules off-shift state — fixed — span=3da5e290b574

Verified in the adapter first: incidentio.py votes ShiftStatus(on_shift=False) when the fenced identity is set and schedule_ids is empty — the deliberate deny-by-default so a config write cannot manufacture an abstention — and the only prior explanation was a server-side logger.warning. Since fields render top-down, every operator passes through this state and a signals-only install stays in it.
Fixed as the finding prescribed: one clause appended to incidentio_user_id_help — "With an ID set but no schedules configured, this instance stays off shift." — in en, the 11 translated locales, and regenerated en-XA. The new happy-path and refusal frames in the body both show the shipped string.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: yes
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]

  • Refusal notice rendered the raw str(exc) — fixed — span=bf060e4a1898

Confirmed: the 503's error field is str(exc) from the OSError arm of _settings_write_or_refuse, and the dashboard's req helper read only error, discarding the code the backend sends precisely so callers do not have to parse system text. The identity notice therefore showed "[Errno 13] Permission denied" to the operator.
Fixed at the seam: req now throws a typed OpsApiError carrying the body's code, and the identity site maps policy_store_unwritable to "Your ID was not saved — retry." (localized, 13 locales) — retry being correct is why the backend chose 503 over 500. Uncoded failures (e.g. validation 400s) keep their backend reason verbatim. Two tests pin both branches and the draft surviving the refusal; the body's new refusal frame shows the shipped message.

Registers `incidentio` as a public adapter implementing SignalSource,
RotationSource and ActionSink over the incident.io REST API.

Built on alerts rather than incidents: an alert's status is a strict
firing/resolved enum, which is the same shape as a signal's own lifecycle, so
absence from a poll means it cleared. A declared incident is a human artefact
whose transitions run a post-incident flow, and putting one on the board would
duplicate work a responder already owns.

The sink offers `resolve` and `comment` only. The API has no acknowledged state
and no snooze, mute or suppress call for a single alert, and advertising a verb
the provider cannot perform would pass the autonomy gate and then fail at
execute time, after the board had recorded the action as granted.

Truncation is detected from the response cursor, not by fetching one item past
the cap: 50 is the endpoint's maximum page size, so a larger request is clamped
and reads back as a complete page. Alert-source filtering runs client-side
because the documented filter's multi-value encoding is not specified, and a
guessed encoding that matches nothing presents as a quiet estate; the
truncation verdict is therefore taken from the raw response and survives
filtering.

The rotation identity lives on the keystone (`incidentio.user_id`), not in
provider config. incident.io has no self-identity endpoint, so it cannot be
derived at runtime, and provider config is agent-writable — a forged identity
there would let the constrained party claim the shift and authorize a write it
does not own. A source with no identity abstains rather than voting off shift,
and an empty (agent-writable) schedule list with an operator identity present
votes off shift rather than manufacturing an abstention.

Co-authored-by: Kiro Crew <noreply@kirodotdev.github.io>
@NicholasRBowers

Copy link
Copy Markdown
Contributor

🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]

Round 4 on 5b831cc3d — the round judged on 2f9b5d02a (GPT BLOCK + 1 finding, FP 2 items, UX 3 Watches, Design 1 suggestion), all taken or answered:

  • GPT blocker (adjudication-upheld) fixed: the poll now filters while paging. The source filter runs inside the walk, before the cap, so the cap and the truncation verdict are spent only on matching alerts — a 150-alert storm from unselected sources can no longer evict a selected firing alert from the poll. Proven red-first: the new regression test fails on the prior ordering (walk stops at 3 pages, the selected alert is never fetched) and passes with the fix. Two more tests pin the verdict-from-matching-alerts rule and the fully-walked-empty-is-authoritative case.
  • GPT finding fixed: all five function-scoped imports in the incident.io test file moved to module scope (env resolution in the modules they import is lazy, so the deferral bought nothing).
  • FP Item 5 / UX Watches fixed together with one shared helper: the coded-refusal mapping now covers the schedule-login and app-settings notices too (same coded 503, same route), the refusal string names the refuser ("… the settings store refused the write. Retry."), and value_too_long loses its snake_case settings key. 13 locales, tests pin each branch, refusal frame recaptured at HEAD with the shipped string.
  • Design suggestion taken: the fenced-identity ternary is now a map (FENCED_IDENTITY_FIELDS) — a rotation-capable provider adds an entry, not an arm.

Verified locally: 22 backend provider tests (incl. 3 new, one proven red-first), 76 settings-panel tests, tsc/eslint, black/isort/flake8, both i18n gates, comment-history gate. Rebased onto current main (#11050); single commit, Stephen Meehan preserved as author.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: no
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]

  • Poll cap applied before configured-source filtering — fixed — span=30c962d7f58f

Confirmed exactly as adjudicated: del alerts[DEFAULT_POLL_LIMIT:] ran on the unfiltered walk, so with alert_source_ids set and >100 firing alerts from unselected sources ahead in paging order, a selected firing alert was discarded before the filter ever saw it — and the truncation wrap does not name the missing alert, so the drop is silent at exactly the moment (an alert storm) the board matters most.
Fixed as prescribed: the source filter now runs inside the walk, so the cap check, the post-loop verdict, and the slice all operate on matching alerts only. Three tests pin it — the storm regression is proven red-first (on the prior ordering the walk stops at 3 pages and returns nothing; with the fix it walks past the noise and returns the selected alert as an authoritative poll), plus verdict-from-matching-alerts and fully-walked-empty-is-authoritative. The page ceiling's refuse-partial-estate semantics are unchanged.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: no
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]

  • Function-scoped imports in the incident.io test file — fixed — span=98e9a480ae6b

All five moved to module scope (incidentio, policy_store ×3, datetime). Verified the deferral bought nothing before moving them: policy_store resolves KIROCREW_HOME lazily per call and incidentio.py reads no environment at import time, so importing before the fixture's setUp redirects the home changes no behavior. Full file green (22 tests).

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: yes
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]

  • Fenced-identity ternary → provider-id map — fixed — span=5f47e64a9319

Taken as suggested: FENCED_IDENTITY_FIELDS keys provider id to the label/help i18n keys and the settings key (field name and settings key coincide by construction, so one name serves both), and fencedIdentityFor() resolves translations at render so locale switches keep working. The next rotation-capable provider adds an entry, not a ternary arm.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: no
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]

  • Item 3 (write verbs unexecuted against a live account) — answered by reference check; live run is the maintainer's clear — span=7ea79da25e30

Same evidence class as the Item 2 ruling on the rotation read path: no incident.io account is available to this drive, so the once-live execution the Clears-when prefers cannot run here. What the drive can verify: resolve (/v2/alerts/{id}/actions/resolve) and note (/v1/alert_notes) are documented resources in the vendor's public reference (https://api-docs.incident.io/), the reference lists no acknowledge or snooze verb for alerts — which is what pins supported_actions() — and both write paths fail toward refusal (a non-2xx surfaces as the action failing, never as a silent success). The author's original submission states manual verification against their workspace; the alternative clear the finding itself names — a maintainer accepting the doc-checked shapes — is the path this disposition requests.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: yes
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]

  • Item 5 (mapping scoped to one notice) — fixed at the seam — span=ecd06fdc39dc

Taken on the first clear path: a shared settingsRefusalMessage helper now serves the identity notice, the schedule-login notice (SettingsPanel's loginMutation), and the app-settings notice (settingsMutation) — the two sites the finding names, which receive the same coded 503 from the same PUT /settings route. The change subject gets its own sentence ("Your change was not saved — …") so the vocabulary stays honest per surface. Localized in 13 locales; the uncoded-verbatim fallback is pinned by test on both mutation shapes.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: yes
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]

  • Uncoded overlong refusal shows snake_case machine text — fixed — span=de2e96c7aa7f

Mapped exactly the way policy_store_unwritable is, as the Watch prescribed: the shared helper reads the 400's code=value_too_long and renders "That value is too long, so it was not saved." (13 locales) instead of the backend's pagerduty_user_id is too long. Pinned by a test asserting the snake_case key never reaches the field.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: yes
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]

  • Refusal string discards the reason — fixed by naming the refuser — span=99d232bd89d9

The one muted sentence the Watch asked for, folded into the notice itself: "Your ID was not saved — the settings store refused the write. Retry." A persistently failing retry now has its diagnosis (the settings store, not the network or the value). The refusal frame in the body is recaptured at HEAD showing the shipped string.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: no
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]

  • Cold-read pass needs the branch in this repository — answered; that push is a maintainer action — span=4d5d4a0d2b18

This is a fork PR (stephen-meehan-lrn:feat/ops-incidentio); re-homing the branch into kirodotdev/KiroCrew to enable the first-time-reader lane is a write this drive does not own and a workflow decision for a maintainer. The body's three fixture-rendered frames (identity field with help copy, the refusal state, the polled Signals tab) give the sighted evidence for every control the Watch lists; happy to support a re-home if a maintainer wants the blind-reader pass before merge.

@NicholasRBowers

NicholasRBowers commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

self-added: yes
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]

  • Method-local policy_store import in test_config_routes.py — acknowledged; folded into the next push, not worth one on its own — span=2fd3eafe785b

The finding is correct: the identity-refusal test imports policy_store inside the method while routes is already a module-scope import, mirroring the same nit fixed in test_providers_incidentio.py this round. The lane passed with this as advisory, every other gate on this head is green or running, and a new head restarts the full CI + five-lane review cycle — a disproportionate cost for a one-line test-file style cleanup with zero behavior change. It rides along with the next push if this PR needs another round; otherwise it is a follow-up-sized nit.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: no
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]

  • Items 1–3 (provider claims rest on mocks) — answered by the published API reference, named here and in the body — span=7e72f78f5b43

The finding's own Clears-when accepts "confirmed against … its published API reference and named on the PR". That confirmation exists and is on the PR: the body's Manual verification section carries the vendor reference citations (https://api-docs.incident.io/) for the alerts endpoint, pagination_meta.after cursor walk, and the schedule-entries semantics, and the two earlier first-principles dispositions on this thread record the same check for the rotation read path and the resolve/note write verbs plus the absent acknowledge/snooze verbs that pin supported_actions(). No incident.io account is available to this drive, so the once-live execution half of the Clears-when remains the author's original manual verification and a maintainer's acceptance — the deny-by-default failure direction (a wrong shape surfaces as a refused action or an off-shift vote, never a granted one) bounds the risk of the doc-checked shapes.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: no
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]

  • No blind reader has judged the new controls — answered; the cold-read lane needs a maintainer re-home — span=39ff2d651eb4

Same ground as the prior round's ruling: this is a fork PR, and pushing the branch into kirodotdev/KiroCrew to enable the first-time-reader pass is a maintainer action this drive does not own. The three fixture-rendered frames evidence every control the item lists, and the help string's off-shift clause was reviewed by this round's lanes; happy to support a re-home if a maintainer wants the blind-reader pass before merge.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: yes
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]

  • Only the identity refusal variant is screenshotted — answered; the other variants are the same component with test-pinned copy — span=7c2617d074f1

As the item itself weighs: rare paths, same ErrorNotice component, low risk. Attachment-02 evidences the component's rendered refusal state; change_save_refused, value_too_long_refused, and the login refusal differ from it only in which localized string is passed, and each exact string is pinned by a unit test asserting its copy (and, for the overlong case, that the snake_case key never renders). Re-attaching a frame per string variant adds no new component state, so this stays evidence-by-test rather than churning the body mid-round; a human spot-check of the strings table in en.json covers the rest.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: yes
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]

  • "Your ID" under the "Your GitHub login" label — acknowledged real; rides with the next push — span=f964fbbbbacd

The drift is real and self-inflicted this round: loginMutation routes through the identity subject, so its keystone refusal says "Your ID was not saved…" under a field labeled "Your GitHub login". The accepted remedy is one line (route the login through the existing change_save_refused subject, which names nothing wrong, per the companion suggestion) — but it is copy-polish on a rare failure path, every lane on this head has passed or gone advisory, and a new head restarts the full CI + five-lane cycle. It is folded into the next push alongside the test-import nit if this PR needs another round; otherwise it is a follow-up-sized fix.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: yes
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]

  • Login-subject variant suggestion — accepted as the remedy for the term-drift item, deferred with it — span=bbd201495260

Accepted on the reuse path: settingsRefusalMessage(loginMutation.error, 'change') renders the existing "Your change was not saved — the settings store refused the write. Retry." with no new locale keys, and the refusal then names nothing that conflicts with the field label. Deferred together with the term-drift Watch it remedies (same one-line change, same next-push ride-along) rather than minting a head for copy polish alone.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Sep 15, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor

Reviewed on the current head for approval. readiness: passed is green because whole-design CONCERNS are advisory server-side; they still need an answer before a human approval lands. Fork-risk scan (CI, install, deps, network, subprocess, eval): clean. Holding on the items below.

  • First Principles Items 1-3 (span=7e72f78f5b43): the vendor API claims that pin supported_actions() (pagination_meta.after cursor, 50-item page cap, two-value alert status, no self-identity endpoint, no ack/snooze verb) are doc-asserted with every test mocking request_json; your own disposition says the clear rests on "a maintainer's acceptance". Design PASS asks the same: verify resolve and the alert-note write against a live account. Attach that evidence or get the maintainer's written acceptance.
  • Acknowledged regression deferred untracked: SettingsPanel.tsx:1067 routes the schedule-login refusal through the 'identity' subject, so a keystone 503 renders "Your ID was not saved..." under "Your GitHub login" (UX span=f964fbbbbacd). Needs a deferred-finding issue with owner and due date, or a fix here.
  • Head includes a maintainer rebase, so the last-push rule needs a second approver.

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.

6 participants