Repository navigation
fix: do not count timed-wait runs toward max_runs - #299
Merged
Merged
Conversation
A run that exits cleanly after its own axe task wait --until/--for is refunded in the post-run policy, so a task that waits daily never hits max_runs. Crashes, failures, aborts, drains and runs ending any other way still count. 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.
Task 2549. A task that waits daily (
axe task wait --until/--for) was escalated formax_runsfrom idle waits alone (pilots: axe-joyce task 1, axe-hao task 7).Which runs count
runsis counted at claim (crates/axe-core/src/db.rs,claim_in), wheremax_runsescalates.crates/axe-core/src/task_policy.rs,finish): a run that exits 0, not aborted, drained or on an API outage, and leaves its task pending on a wake time its own session set during that run, is refunded (db::refund_run) with arunsevent saying why.wait --on, or handed back pending without a wake time.Test:
crates/axe/tests/wait_runs.rsdrives claim/prepare/started/finish throughremote::operation; time passes by movingnot_before, with no sleeps. 9 wait cycles atmax_runs = 3stay at 0 runs; crash-after-wait and no-wait runs escalate at 3. The first test fails onmain.Docs:
docs/user/concepts/architecture.md(When the node escalates).No schema change.
🤖 Generated with Claude Code