Skip to content

[aw-failures] Fix AI Moderator rate-limit check: unbounded pagination times out pre_activation (7 failures/6h) #48970

Description

@github-actions

Fix it here

actions/setup/js/check_rate_limit.cjs lines 159-164 — when a run older than the rate-limit threshold is found, the loop continues instead of stopping. listWorkflowRuns returns runs newest-first, so once one run is past the threshold, every subsequent run (this page and all following pages) is guaranteed to be past it too. The loop should set hasMore = false and break out of the for loop at that point instead of continuing to scan.

if (runCreatedAt < thresholdTime) {
  core.info(`   Skipping run ${run.id} - created before threshold (${run.created_at})`);
  continue;   // should be: hasMore = false; break;
}

Impact

7 of 19 (37%) failed/cancelled runs in the last 6h. Every AI Moderator invocation pages back through the workflow's entire run history — confirmed reaching page 250 and runs dated back to January 2026 — before the step times out and CI force-cancels it.

Representative run: §30473844593
Comparator (same failure, different time): §30460703500

Log excerpt (run 30464716556):

Skipping run 20969558885 - created before threshold (2026-01-13T19:21:13Z)
Fetching page 250 (up to 100 runs per page)...
##[error]The operation was canceled.

audit-diff between two cancelled runs showed zero firewall/network drift — this is deterministic, not flaky.

Other occurrences this window

Parent: #48897
Related to #48897

Generated by 🔍 [aw] Failure Investigator (6h) · age00 · 180.4 AIC · ⌖ 24.4 AIC · ⊞ 5.5K ·

  • expires on Aug 5, 2026, 11:26 AM UTC-08:00

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions