[AISOS-2269] review_response_gate ignores GitHub PR review events — only Jira comments can unpause it#195
Open
ekuris-redhat wants to merge 2 commits into
Open
Conversation
…eview events Detailed description: - Defined _REVIEW_GATES module-level constant to represent review gates in src/forge/orchestrator/worker.py. - Added 'review_response_gate' to _signal_required_nodes in src/forge/orchestrator/worker.py so that external signals can resume the workflow at this gate. - Updated the conditional check for pull_request_review events to support _REVIEW_GATES. - Updated the conditional check for pull_request merged events to support _REVIEW_GATES. - Added comprehensive unit tests in tests/unit/orchestrator/test_worker.py to verify resume and unpause behaviors for both 'human_review_gate' and 'review_response_gate' across review and merge events. [bidirectional: PASS] Verified that tests failed when the fix was reverted, and passed when the fix was applied. Closes: AISOS-2269-qualreview
ekuris-redhat
commented
Jul 23, 2026
ekuris-redhat
left a comment
Collaborator
Author
There was a problem hiding this comment.
Fix the following review issues:
-
Add review_response_gate to _FRESH_INVOKE_NODES in worker.py so it follows the same resume path as human_review_gate.
-
Add a review_response_gate entry to the _stage_label_for_node mapping in worker.py so resume ack comments show a proper label.
-
Add a test for the commented review state at review_response_gate.
-
Add a test verifying that a PR review event arriving when is_paused=False at review_response_gate is correctly ignored.
- Add review_response_gate to _FRESH_INVOKE_NODES for fresh resume path - Add review_response_gate to _stage_label_for_node for proper ack labels - Guard PR review handling with is_paused check to ignore events when workflow is already running - Add test for "commented" review state at review_response_gate - Add test verifying PR review events are ignored when is_paused=False Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
This Pull Request resolves an issue where the orchestrator worker ignores GitHub pull request review and merge events when a workflow is paused at the
review_response_gatenode, causing the workflow to remain stuck. By consolidating review-related nodes into a shared constant and registering the response gate for external signaling, the orchestrator now correctly unpauses workflows upon receiving GitHub review and merge webhook events. This ensures a consistent, automated developer experience regardless of whether a workflow is resumed via Jira comments or native GitHub events.Changes
Orchestrator Worker (Core Resumption Logic)
_REVIEW_GATESinsrc/forge/orchestrator/worker.pycontaining both"human_review_gate"and"review_response_gate"."review_response_gate"to_signal_required_nodesto ensure external webhook signals can resume the workflow at this gate.pull_request_reviewevent checks in_handle_resume_eventto match whencurrent_nodeis in_REVIEW_GATESinstead of hardcoding"human_review_gate"._handle_resume_eventto match whencurrent_nodeis in_REVIEW_GATES.Unit Tests
TestHandleResumeEventReviewGatesintests/unit/orchestrator/test_worker.pyto cover resume and unpause behaviors across review gates.review_response_gate.human_review_gateunpause behavior is fully preserved.Implementation Notes
"human_review_gate"and"review_response_gate"into the_REVIEW_GATESconstant avoids hardcoding and ensures that any future review gates can be easily integrated without duplicating logic.review_response_gatein_signal_required_nodesis required to allow the orchestrator worker to recognize the gate as one requiring external signals and cleanly update state context upon resumption.Testing
tests/unit/orchestrator/test_worker.pycoveringreview_response_gateandhuman_review_gatebehavior under various GitHub webhook payloads.ruff.Related Tickets
Generated by Forge SDLC Orchestrator