Skip to content

auto-throttle generate queue after job failures#31

Merged
InventivetalentDev merged 4 commits into
masterfrom
error-backoff
Apr 18, 2026
Merged

auto-throttle generate queue after job failures#31
InventivetalentDev merged 4 commits into
masterfrom
error-backoff

Conversation

@InventivetalentDev

Copy link
Copy Markdown
Owner

AutoGenerateQueueOptions now stacks a time-decaying penalty on top of the grants-derived baseline interval. Each JobStatus.FAILED signal from JobBatchChecker bumps the penalty by 500ms (capped at 10s); it decays linearly at 100ms per second back to baseline. Repeated failures stack on the already-decaying penalty, so sustained errors push the interval higher before it settles. Logs at INFO when the throttle kicks in.

IQueueOptions gets default no-op reportFailure() / reportSuccess() methods so non-adaptive implementations are unaffected.

InventivetalentDev and others added 4 commits April 17, 2026 18:56
AutoGenerateQueueOptions now stacks a time-decaying penalty on top of
the grants-derived baseline interval. Each JobStatus.FAILED signal from
JobBatchChecker bumps the penalty by 500ms (capped at 10s); it decays
linearly at 100ms per second back to baseline. Repeated failures stack
on the already-decaying penalty, so sustained errors push the interval
higher before it settles. Logs at INFO when the throttle kicks in.

IQueueOptions gets default no-op reportFailure() / reportSuccess()
methods so non-adaptive implementations are unaffected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
JobChecker is still part of the public API for callers who want per-job
polling without going through waitForCompletion(). Add an overload that
takes the onJobFailure runnable and invoke it on FAILED detection, so a
user wiring it up against AutoGenerateQueueOptions still gets throttled.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Swap the fixed-interval QueueOptions for createAutoGenerate() so the
benchmark drives the new failure-triggered slowdown path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@InventivetalentDev InventivetalentDev merged commit 0cd6260 into master Apr 18, 2026
0 of 3 checks passed
@InventivetalentDev InventivetalentDev deleted the error-backoff branch April 18, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant