Add ci_fix_check_and_increment() that performs read + threshold-check + conditional increment in a single flock-protected Python call, replacing the prior three-step sequence (ci_fix_count / bash check / ci_fix_increment) that allowed two concurrent poll invocations to both pass the threshold and spawn duplicate dev-agents for the same PR. handle_ci_exhaustion now calls ci_fix_check_and_increment atomically and returns the new count in CI_FIX_ATTEMPTS; all separate ci_fix_increment calls after handle_ci_exhaustion (including the deferred READY_PR_FOR_INCREMENT mechanism) are removed. Log messages updated from CI_FIX_ATTEMPTS+1 to CI_FIX_ATTEMPTS to reflect the post-increment count. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| dev-agent.sh | ||
| dev-poll.sh | ||
| phase-test.sh | ||