mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-02-01 23:13:36 +00:00
fix: address rate limit detection false positives and reset-time cap
- Narrow `\boverloaded\b` regex to require server/api/system context, preventing false positives when Claude discusses method/operator overloading in OOP code (C++, Java, C#, etc.) - Restore 24-hour cap for absolute reset-time delays instead of 1-hour clamp, avoiding unnecessary retry loops when rate limits reset hours in the future - Add test for Retry-After: 0 returning 0 (regression lock for the `is not None` fix) - Add false positive tests for "overloaded" in programming context Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2
agent.py
2
agent.py
@@ -325,7 +325,7 @@ async def run_autonomous_agent(
|
||||
target += timedelta(days=1)
|
||||
|
||||
delta = target - now
|
||||
delay_seconds = clamp_retry_delay(int(delta.total_seconds()))
|
||||
delay_seconds = min(max(int(delta.total_seconds()), 1), 24 * 60 * 60)
|
||||
target_time_str = target.strftime("%B %d, %Y at %I:%M %p %Z")
|
||||
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user