Skip to content

[aw-failures] P1: AI Moderator pre_activation "Check user rate limit" times out — unbounded run-history pagination (page 205+) c [Content truncated due to length] #39452

Description

@github-actions

Bound the AI Moderator rate-limit pre-check pagination — it walks the entire run history and is cancelled by the 15-min job timeout on every invocation.

Severity: P1 — 100% failure; the pre_activation job is cancelled before the agent ever activates. 3/3 invocations in the last 6h.

Problem statement

The Check user rate limit step in the pre_activation job times out and the job is cancelled at ~15 minutes with ##[error]The operation was canceled. The last log line is Fetching page 205 (up to 100 runs per page)...check_rate_limit.cjs paginates the full workflow run history (200+ pages), skipping runs "created before threshold" one page at a time, and never finishes within the 15-min job timeout. This is not an intentional rate-limit block and not an API/script error — it is unbounded pagination.

Affected workflows and run IDs

Probable root cause

check_rate_limit.cjs enumerates run history forward and filters by created-at threshold in JS instead of stopping pagination once it crosses the time window. As repo run volume grows, page count (now 205+) exceeds what fits in the 15-min job budget → job cancelled.

Proposed remediation

  1. Stop paginating as soon as the first run older than the rate-limit window is seen (results are already time-ordered), instead of scanning all pages.
  2. Prefer the GitHub search/list API created:>=<threshold> server-side filter, or cap per_page×max-pages to a small bounded value.
  3. Add a hard internal timeout/short-circuit so the check degrades to "allow" (or a fast deterministic verdict) rather than letting the whole job hit the 15-min cancel.

Success criteria / verification

  • AI Moderator pre_activation completes in seconds and the Check user rate limit step no longer paginates past a bounded number of pages.
  • Three consecutive AI Moderator triggers complete without a cancelled pre_activation job.

Parent: #39344. Analyzed runs: 27559255648, 27553836400, 27552434310.
Related to #39344

Generated by 🔍 [aw] Failure Investigator (6h) · 572.8 AIC · ⌖ 11.7 AIC · ⊞ 4.5K ·

  • expires on Jun 22, 2026, 12:21 PM UTC-08:00

Activity

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions