Add retry policy with transient vs permanent failure classification - #37
Open
AvinashAnad wants to merge 1 commit into
Open
AvinashAnad wants to merge 1 commit into
AvinashAnad wants to merge 1 commit into
Conversation
The live graph planner now distinguishes transient failures (timeouts, rate limits, connection drops) from permanent failures (bad input, auth errors, missing resources) and automatically retries transient failures up to a configurable bound. Permanent failures fail fast without retry. Changes: - RetryPolicy dataclass in core/live_graph/core.py classifies errors using pattern matching against known transient/permanent signatures - RetryAwarePlanner in runtime.py wraps any planner to intercept task_failed events and re-enqueue transient failures as retry nodes - 15 new tests covering: transient retry, permanent fail-fast, max retries exhaustion, future-node ordering, cancellation leak guard, and adversarial result-after-cancellation attack - Part 1 benchmark script (part1_proof.py) for the four required cases - README section documenting the extension with full traces Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
theschoolofai
approved these changes
Aug 10, 2026
theschoolofai
left a comment
Owner
There was a problem hiding this comment.
Approved for a strong retry-policy implementation and adversarial test suite; contribution credit is compared against earlier retry PRs.
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.
Summary
RetryPolicythat classifies task failures as transient (timeouts, rate limits, connection drops) or permanent (bad input, auth errors, missing resources), and aRetryAwarePlannerthat wraps any existing planner to automatically retry transient failures up to a configurable boundFiles changed
s13code/core/live_graph/core.pyRetryPolicydataclass + transient/permanent pattern setss13code/runtime.pyRetryAwarePlannerwrapper + wiring into the runtimes13code/core/live_graph/__init__.pyRetryPolicytests/test_retry_policy.pypart1_proof.pyREADME.md.gitignorepart1_traces.jsonTest plan
uv run pytest -q) — 44 original + 15 newuv run ruff check .)uv run python part1_proof.py)🤖 Generated with Claude Code