Skip to content

fix(engine): increase workspace setup circuit breaker thresholds (fixes #701)#703

Merged
mickume merged 4 commits into
mainfrom
fix/issue-701-workspace-circuit-breaker-backoff
Jul 8, 2026
Merged

fix(engine): increase workspace setup circuit breaker thresholds (fixes #701)#703
mickume merged 4 commits into
mainfrom
fix/issue-701-workspace-circuit-breaker-backoff

Conversation

@mickume

@mickume mickume commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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 128 failures that would resolve on their own.

Closes #701

Changes

File Change
packages/agentfox/agentfox/engine/result_handler.py _MAX_WORKSPACE_FAILURES 3→6, _MAX_WORKSPACE_BACKOFF_SECONDS 30→60
packages/agentfox/tests/unit/engine/test_workspace_setup_failure.py Added regression test for intermediate failures (5 failures still get backoff, not blocking)

Tests

Verification

  • All existing tests pass: ✅
  • New test passes: ✅
  • Linter (changed files): ✅
  • No regressions: ✅

Auto-generated by af-fix.

mickume added 4 commits July 8, 2026 09:00
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.
@mickume mickume merged commit e8ba9ca into main Jul 8, 2026
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.

bug: verifier workspace setup fails under concurrent git pressure, tripping circuit breaker and stalling run

1 participant