fix(engine): increase workspace setup circuit breaker thresholds (fixes #701)#703
Merged
Merged
Conversation
Adds a new bundled skill that accepts bug reports, error logs, stack traces, or behavioral descriptions, performs root-cause analysis against the codebase, and files a structured GitHub issue optimized for downstream consumption by nightshift (af:fix) and af-spec. Also installs the previously missing af-prd skill via af init --skills.
Remove the four inlined blocks from their parent files and wire up imports to the already-extracted modules. Updates all test imports and mock targets to reference the new module paths. - result_handler.py → engine/coverage.py (314 lines) - engine.py → engine/issue_summary.py (262 lines) - dispatch.py → engine/preflight.py (176 lines) - merge_lock.py → workspace/merge_agent.py (140 lines)
#701) Raise _MAX_WORKSPACE_FAILURES from 3 to 6 and _MAX_WORKSPACE_BACKOFF_SECONDS from 30 to 60. The previous 3-attempt/6s window was too aggressive for transient git lock contention during concurrent merge operations. The new thresholds give a 2s→4s→8s→16s→32s backoff progression (~62s total) before tripping, sufficient to ride out merge agent contention windows.
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
Increase the workspace setup circuit breaker thresholds to ride out transient git lock contention during concurrent operations. The previous 3-attempt/6s window was too aggressive — merge agents can hold git locks for 30s+, causing transient
exit code 128failures that would resolve on their own.Closes #701
Changes
packages/agentfox/agentfox/engine/result_handler.py_MAX_WORKSPACE_FAILURES3→6,_MAX_WORKSPACE_BACKOFF_SECONDS30→60packages/agentfox/tests/unit/engine/test_workspace_setup_failure.pyTests
test_fifth_failure_still_retries_with_backoff: regression test for bug: verifier workspace setup fails under concurrent git pressure, tripping circuit breaker and stalling run #701Verification
Auto-generated by
af-fix.