Repository navigation
feat(claude-lane-incident): escalate rate-limit storms across three distinct pull requests - #469
Conversation
…istinct pull requests A rate-limit-only outage was invisible by construction: rate-limit is deliberately outside ESCALATING_CLASSES (a singleton 429 is weather), so a cycle whose every observation is rate-limit classified clean, opened no incident, and rendered nothing. On 2026-08-13 an exhausted shared seat 429'd every lane execution across the fleet for ~3 hours — 7 PRs in 2 repositories merged with zero completed reviews behind green checks — and all five aggregator cycles in the window logged cycle=clean action=none. Escalate on density, not presence: a cycle whose tally shows rate-limit on RATE_LIMIT_STORM_THRESHOLD (3) or more DISTINCT pull requests is an incident cycle, exactly as an auth or runner observation is. The weather rationale is refined rather than reversed — one or two throttled PRs still never escalate, and per-pull deduplication means one stuck PR re-observed all day can never sum its way to a storm. The comparison is intra-cycle only, so no new cross-cycle state exists and the state-block, coverage, and close machinery are untouched: a storm-opened incident closes by the existing three-covered-clean-cycles path once the usage window lifts. The per-class Escalating column now derives from what actually escalates rather than membership alone — a storm-opened incident renders 'storm (>=3 PRs in one cycle)' instead of claiming 'no' — and the remediation list names the storm posture (restore the seat's usage headroom; re-review what merged unreviewed). The byte-pinned write job's escalation-marker prose no longer claims incidents open only on an escalating class; the pin file and every write-gate fixture carry the same bytes. Closes #466 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Aac8xjCjMxFsXGHCXKHY4W
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Claude finished @kyle-sexton's task in 2m 51s —— View job Claude finished the code reviewTasks
Scope noteThis repo carries a dedicated SummaryThis is a well-scoped, thoroughly tested change. I traced the core logic end-to-end:
Verification caveat: I could not execute Minor, non-blocking observation: a couple of docstrings elsewhere in No correctness bugs, no test gaps, and no design concerns found. Nothing rose to the level of a blocking or inline finding. |
…ount The classifyCycle/nextState doc comments and the role-label test's rationale still said an incident opens only on an escalating CLASS; a rate-limit storm now opens one too, so the prose names the union. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Aac8xjCjMxFsXGHCXKHY4W
|
Claude finished @kyle-sexton's task in 2m 47s —— View job Security review completeTasks
(Note: the FindingsNo blocking security issues. This is a well-scoped, well-tested behavioral change with no permission, token-scope, or trust-boundary modifications. Verified:
One informational note (not a blocker, already addressed in the PR description): the storm path is a new escalation trigger reachable purely from No changes requested. Branch · |
|
Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
|
Last security-reviewed head: |

Summary
The incident aggregator was structurally blind to a rate-limit-only outage:
rate-limitsits outsideESCALATING_CLASSESby design (a singleton 429 is weather), so a polling cycle whose every observation israte-limitclassified clean, opened no incident, and rendered nothing — the gap #466 documents. On 2026-08-13, ~15:07–18:04Z, an exhausted shared seat 429'd every lane execution across the fleet; all five hourly aggregator cycles in the window loggedcycle=clean coverage=complete action=none(runs 31714199816, 31719147314, 31724322542, 31729008787, 31735138855 — each polling 15 repositories), and PRs across two repositories merged with zero completed reviews behind green checks.This PR escalates rate-limit density, not presence: a cycle whose tally shows
rate-limitonRATE_LIMIT_STORM_THRESHOLD(3) or more distinct pull requests is an incident cycle, exactly as anauthorrunnerobservation is.How storms and weather stay separated
escalatingis membership-OR-density, and density isclassPulls["rate-limit"].size >= 3inside a single cycle's tally.<repo>#<pull>keys, so one stuck PR re-observed every cycle for 24 hours — or annotated repeatedly on one head — can never sum its way to a storm (pinned by test).class=rate-limitannotation already survived the lane's own gated in-run retry (one retry, minutes later, jittered —claude-review.yml's retry gate). A transient RPM spike clears in-run and never emits the class; only a 429 that persisted past the retry is ever observed here. On 2026-08-13 the retries 429'd too.class=auth; forging a storm needs three distinct PRs, which is strictly harder.Threshold: >=3 distinct PRs, validated against 19 days of fleet history
I swept every lane check-run annotation across all eight lane-running surfaces (dotfiles, claude-code-plugins review + security lanes, medley, standards, provisioning, github-iac, ci-workflows self-lanes) with
filter=all— superseded attempts included — over 2026-07-26 → 2026-08-13: 257class=rate-limitannotations on 110 distinct heads, then simulated the aggregator's hourly cycle over them (24h lookback, distinct-PR dedup, PR numbers resolved viacommits/{sha}/pulls).Distinct-PR rate-limit density per simulated hourly cycle:
The distribution is bimodal: isolated throttles (1–2 PRs) and storm waves (5–48 PRs at peak), with nothing in between that a threshold choice could split. Every candidate threshold from >=2 through >=5 produces exactly the same five escalation episodes:
So:
auth, and there is no data suggesting 3 over-fires.Data caveat, in the safe direction: the sweep includes superseded attempts while the shipped poll reads
filter: latest, so this OVERSTATES the density production would see — a threshold quiet on this data is quieter live. The storms firing does not rest on that inflation: the issue's live observation of the densest Aug 13 cycle already showed 4–5 distinct pulls, and every episode had >=5 distinct mapped PRs at peak.Rendering
The per-class "Escalating" column now derives from what actually escalates rather than set membership: a storm-opened incident renders
storm (>=3 PRs in one cycle)(the peak per-cycle distinct-PR count vs the threshold —mergeCountstakes the max across cycles, so this faithfully answers "did any single cycle reach storm density"); a below-thresholdrate-limitrider on anauthincident still rendersno. The Remediate list gains a storm step (check the seat's usage/quota in the Console; re-review what merged during the window), renumbering the coverage and re-run steps — the pinned counting-rule sentence is byte-identical, only the test's extraction regexes moved with the numbers.The byte-pinned write job's escalation-marker prose no longer claims incidents open only on an escalating class; the pin file and every write-gate fixture carry the same bytes — that is the 46-file mechanical portion of this diff, and the write gate enforces the lockstep.
Red-first proof
With the new tests present and
claude-lane-incident.cjsreverted to HEAD:The three positive cases (the 2026-08-13 shape: 3+ distinct PRs, two repos,
rate-limit/429, one cycle — including an end-to-end run of the shipped poll script) fail against current code and pass after. The negatives pin the weather rationale — singleton, pair, and one-PR-re-annotated — and exist to fail against a future change that escalates on presence.Gates
node --test .github/scripts/*.test.cjs— 714/714 pass (708 before; +6 new)node --test .github/actions/claude-lane-outcome/*.test.cjs— passgithub-appunscoped mint) is on the untouched mint step and documented as deliberate in the workflow header (advisory lane)Out of scope (tracked separately)
passon infra failure (ADR 0007 governance). This PR does not change what any lane reports; it only makes the safety net see this failure shape.Related
Closes #466
🤖 Generated with Claude Code
https://claude.ai/code/session_01Aac8xjCjMxFsXGHCXKHY4W