Files
Kannan b4fb68d5b8 Surface queue rate limited state in TaskQueueStats (#10944)
## What

Populates the new `rate_limiting_active` field in `TaskQueueStats` so
auto-scaling systems can detect when backlog growth is caused by rate
limiting rather than insufficient worker capacity.

Records rate-limit events via a callback from
`matcherData.findAndWakeMatches` into a `taskTracker`. The field is true
when any dispatch was rate-limited in the last 30 seconds.

## Why

When a task queue has a whole-queue rate limit configured,
WorkerControllerInterface (WCI) `PullStats` path sees backlog and scales
up workers. More workers don't help — they poll but can't receive tasks
faster than the rate limit. This field lets WCI suppress scaling in that
case.

## How did you test it?

- Unit tests for sync match and backlog dispatch paths
(`TestSyncMatchRateLimitedIncrementsStats`,
`TestBacklogRateLimitedIncrementsStats`)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-07-08 05:21:07 +00:00
..