Add Concurrent CI Review Gate#143
Draft
danchild wants to merge 25 commits into
Draft
Conversation
danchild
force-pushed
the
feat/concurrent-ci-review-gate
branch
from
July 13, 2026 19:17
30c8e82 to
6daf65b
Compare
danchild
force-pushed
the
feat/concurrent-ci-review-gate
branch
3 times, most recently
from
July 23, 2026 19:32
ab8f34a to
6e6459f
Compare
On first implementation run, workspace_setup creates the branch locally but never pushes it. pull_rebase then fails trying to rebase onto a non-existent remote ref, exhausting all 3 retries and blocking the workflow. Guard the rebase with the existing remote_branch_exists check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
danchild
force-pushed
the
feat/concurrent-ci-review-gate
branch
from
July 23, 2026 20:16
6e6459f to
4fc89db
Compare
The prepare_workspace exception handler set last_error but never incremented retry_count, so the routing function's retry_count >= max_retries check never triggered — causing an unbounded retry loop. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a test that starts with retry_count=1 and asserts it becomes 2 after a prepare_workspace failure, ensuring the routing function can break the loop after max_retries. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
prepare_workspace() defaulted to remote="fork" unconditionally, but on first implementation (before PR creation) the clone only has "origin". This caused git fetch fork to fail, falling back to recreation which also failed due to missing fork_owner/fork_repo state — triggering the retry loop. Now determines the effective remote based on whether fork state exists, and raises directly on origin sync failures instead of attempting the impossible fork recreation path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Three new tests for the no-fork-state paths: - uses "origin" remote when fork_owner/fork_repo are not set - raises directly on origin sync failure instead of attempting fork recreation - raises ValueError when workspace is missing and fork is not configured Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… wait_for_ci_gate - Create src/forge/prompts/v1/ci-attribution.md with attribution prompt - Rewrite attempt_ci_fix: Phase 0 runs attribution container before Phase 1; external failures return ci_status="external_failure" without incrementing ci_fix_attempt; all paths set pending_ci_event=False; return target changed from wait_for_ci_gate to human_review_gate throughout - Delete wait_for_ci_gate function from ci_evaluator.py - Remove wait_for_ci_gate from nodes/__init__.py (graph builders updated in Task 6) - Add 4 new attribution tests to test_ci_attribution.py Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…odes/edges - Replaced duplicated CI/review node and edge declarations in all three workflow graphs (feature, bug, task_takeover) with shared add_post_pr_nodes() and add_post_pr_edges() - Updated backward compat mapping: wait_for_ci_gate -> ci_evaluator (was human_review_gate) - Fixed tests to reflect wait_for_ci_gate deletion and new routing - Updated rebase_pr edges to remove wait_for_ci_gate from all three graphs - Added rebase_pr support to task_takeover workflow (previously missing)
…gate pr_creation and implement_review still routed to the deleted node; update them and fix tests that expected ci_evaluator for backward compat. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ing_ci_event Update the worker to accept CI webhooks (check_run/check_suite) when current_node is human_review_gate, setting pending_ci_event=True so route_human_review can route to ci_evaluator. Remove wait_for_ci_gate from _CI_STAGES and _signal_required_nodes, add human_review_gate to _CI_STAGES so /forge skip-gate commands work at the new pause point. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Verify routing logic (route_human_review, _route_ci_evaluation) and graph compilation for all three workflow types after the DRY refactor. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… leak Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- _route_after_pr_creation is imported in other modules, so semantically, it should not be prepended with a _
- Set ci_status="passed" when attempt_ci_fix has no failed checks to prevent human_review_gate from hanging without a wake signal - Route "no_prs" to escalate_blocked instead of human_review_gate to avoid indefinite pause when no PRs exist - Remove unreachable ci_fix_attempt limit guard in attempt_ci_fix (already enforced by evaluate_ci_status) - Remove stale imports and test classes for functions moved to post_pr - Delete duplicate @pytest.mark.parametrize block causing cartesian product of ~800 nonsensical test cases - Remove trailing whitespace in worker.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
danchild
force-pushed
the
feat/concurrent-ci-review-gate
branch
from
July 23, 2026 20:21
4fc89db to
5dc629f
Compare
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.
All machine and humans to review PR at the same time