Attention: long rate-limit item scans active sources only
Per Codex: a paused/retired source with a future retry_after_at shouldn't nag 'rate-limited for 12h+' — it's intentionally out of polling. Scope long_rest to active (matching the other operational items). Test: paused/retired rate-limited sources stay quiet. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -395,7 +395,7 @@ def _attention(content: dict, sources: list[dict], feedback_unread: int, now: da
|
||||
|
||||
# Long rate-limit rest (info).
|
||||
rest_cutoff = (now + timedelta(hours=_LONG_REST_HOURS)).strftime("%Y-%m-%d %H:%M:%S")
|
||||
long_rest = [s for s in sources if s.get("retry_after_at") and s["retry_after_at"] > rest_cutoff]
|
||||
long_rest = [s for s in active if s.get("retry_after_at") and s["retry_after_at"] > rest_cutoff]
|
||||
if long_rest:
|
||||
items.append({"level": "info", "text": f"{len(long_rest)} source{n(len(long_rest))} rate-limited for {_LONG_REST_HOURS}h+"})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user