Skip to content

Add Concurrent CI Review Gate#143

Open
danchild wants to merge 6 commits into
forge-sdlc:mainfrom
danchild:feat/concurrent-ci-review-gate
Open

Add Concurrent CI Review Gate#143
danchild wants to merge 6 commits into
forge-sdlc:mainfrom
danchild:feat/concurrent-ci-review-gate

Conversation

@danchild

@danchild danchild commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Reworks the post-PR lifecycle so CI evaluation and human review run concurrently. Previously, workflows blocked at wait_for_ci_gate until all CI checks passed before proceeding to human review. Now, after PR creation the workflow goes directly to human_review_gate and accepts both CI and review webhooks in parallel — matching GitHub's natural PR workflow.

Key changes:

  • Eliminate the wait_for_ci_gate node; CI webhooks are routed to human_review_gate instead
  • Add pending_ci_event state field for buffering CI webhooks
  • Extract shared post-PR lifecycle wiring into a reusable module
  • Add CI failure attribution phase

This change is not backward compatible. In-flight workflows checkpointed at wait_for_ci_gate will need to be manually restarted.

Closes #137

@danchild
danchild force-pushed the feat/concurrent-ci-review-gate branch from 30c8e82 to 6daf65b Compare July 13, 2026 19:17
@eshulman2 eshulman2 added enhancement New feature or request area:workflow Workflow graphs, orchestration, state, routing, and gates ci Continuous integration, checks, and CI repair flows work in progress labels Jul 16, 2026
@danchild
danchild force-pushed the feat/concurrent-ci-review-gate branch 5 times, most recently from 4fc89db to 5dc629f Compare July 23, 2026 20:21
@danchild
danchild force-pushed the feat/concurrent-ci-review-gate branch 9 times, most recently from 7ed4a39 to 22133a4 Compare July 24, 2026 19:43
danchild and others added 6 commits July 24, 2026 15:45
Add pending_ci_event to WorkflowState for buffering CI webhooks that
arrive while the workflow is at human_review_gate. Remove the orphaned
PR status comments test file.

Note: this change is not backward compatible with in-flight workflows
checkpointed at wait_for_ci_gate. Those workflows will need to be
manually restarted.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Dan Childers <dchilder@redhat.com>
…tion

Merge wait_for_ci_gate into human_review_gate so CI checks and human
review run concurrently instead of sequentially. human_review_gate now
handles initial-entry housekeeping (posting status comments, setting
review labels) and routes pending CI events to ci_evaluator.

Add Phase 0 CI attribution check so ci_evaluator can distinguish
build-breaking changes from pre-existing failures before attempting
fixes. Fix double-increment of ci_fix_attempt in attempt_ci_fix.
Remove the now-unused wait_for_ci_gate node and clean up stale
references across implement_review and pr_creation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Dan Childers <dchilder@redhat.com>
Replace duplicated post-PR node/edge wiring across bug, feature, and
task-takeover graphs with a shared post_pr module exposing
add_post_pr_nodes() and add_post_pr_edges(). This eliminates ~300 lines
of triplicated graph construction code while updating all graphs to
use human_review_gate instead of the removed wait_for_ci_gate.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Dan Childers <dchilder@redhat.com>
Extend worker CI webhook routing to deliver check-suite and
check-run events to human_review_gate (in addition to ci_evaluator
and attempt_ci_fix). When the workflow is at human_review_gate, the
event is stored as pending_ci_event so the gate can route to
ci_evaluator on its next invocation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Dan Childers <dchilder@redhat.com>
Integration-style tests verifying the end-to-end concurrent gate
behavior: CI events arriving while at human_review_gate are buffered
and processed, review approval works independently of CI state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Dan Childers <dchilder@redhat.com>
Align three test files with renamed/moved symbols:
- _route_ci_evaluation moved from feature.graph to post_pr
- wait_for_ci_gate replaced by human_review_gate
- CI routing: pending now goes to human_review_gate instead of END
- attempt_ci_fix now posts two comments (attribution + fix attempt)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Dan Childers <dchilder@redhat.com>
@danchild
danchild force-pushed the feat/concurrent-ci-review-gate branch from 22133a4 to 6761477 Compare July 24, 2026 19:46
@danchild
danchild marked this pull request as ready for review July 24, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:workflow Workflow graphs, orchestration, state, routing, and gates ci Continuous integration, checks, and CI repair flows enhancement New feature or request work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run CI evaluation and human review concurrently instead of sequentially

2 participants