Repository navigation
fix(automation): skip scheduled runs while every harness is usage-limited - #418
Merged
Merged
Conversation
…ited The automation scheduler only checked its license-access pause flag, so automations and estimations kept spawning while the harness chain was exhausted, failing within seconds and re-reporting the limit. Due occurrences are now skipped (cursor advances, no catch-up burst) and dashboard Run now is rejected while no harness can run. Entries pinning their own harness are gated on that harness's window only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Scheduled automations and estimations kept spawning while every harness in the chain was usage-limited.
AutomationAcquireronly checked its license-accesspausedflag. It never checkedgetWorkerFailover().allExhausted(), which the retry and injected-task acquirers already check.Seen on a live worker:
opencodewas limited until 2026-11-20, yete2e-expander,log-triage,code-releaseandflaky-test-findereach started on schedule. Each one failed within about 4s and logged the same usage limit again.Fix
AutomationStateStore.skipDue, so there is no hot loop and no catch-up burst when the limit resets. It logsoccurrence skipped: no agent harness is available until ….harnessare gated only on that harness's window.EstimationAcquirerinherits the same gate.harnessBlockedUntiloption (used in tests).docs/code/worker.md.Tests
tests/automation-acquirer.test.tscover the skip and cursor advance, the Run now rejection, the normal path, and the default gate (chain and pinned windows).@getdevintern/codesuite: 2900 pass, 0 fail. Typecheck and lint are clean.🤖 Generated with Claude Code