diff --git a/local_server_example.py b/local_server_example.py index e1d5d01..29a7fee 100755 --- a/local_server_example.py +++ b/local_server_example.py @@ -84,12 +84,12 @@ def load_queue(): def done_ids(): """Ids that must NOT be handed out again. - 'ratelimited' is deliberately absent. handleRateLimit() writes that status meaning - "report the task back as pending" — no gen ran, the abuse flag just froze us mid-task. - Counting it as done silently binned the task forever, contradicting its own comment. - 'failed' IS counted: a timeout may have burned credits invisibly, so nothing is retried automatically. To re-run a failed task, delete its line from results.jsonl (requeue.py). + + 'ratelimited'/'requeue' are skipped belt-and-braces: /task-completed already refuses to + persist those rows (they stay PENDING by design), so they can't reach this file. This is + defence in depth against someone appending a row by hand — not a bug fix. """ ids = set() if os.path.exists(RESULTS_FILE):