feat(orchestrator): add single-cycle PR revision on CHANGES_REQUESTED review#8
Open
Maxtanh-Meta wants to merge 1 commit into
Open
feat(orchestrator): add single-cycle PR revision on CHANGES_REQUESTED review#8Maxtanh-Meta wants to merge 1 commit into
Maxtanh-Meta wants to merge 1 commit into
Conversation
… review When a human submits a CHANGES_REQUESTED review on a symphony-go PR, the orchestrator now detects it via polling and runs a single revision cycle on the existing branch/worktree: 1. PollPRRevisions (new tick step) scans pr_ready jobs for fresh CHANGES_REQUESTED reviews submitted after the job's UpdatedAt. 2. runPRRevision drives the implementation agent with a revision prompt containing the original issue, approved plan, and review feedback. 3. The agent's changes are committed and pushed to the same branch, updating the PR in place (no close/reopen cycle). 4. Job.RevisionAttempted is set to true — only one revision cycle runs per PR, subsequent reviews are left for human follow-up. Changes: - internal/github: add PRReview type, ListPRReviews to Client interface - internal/github/fake: add SeedPRReview + ListPRReviews - internal/types: add RevisionAttempted field to Job - internal/orchestrator/loop: call PollPRRevisions in tick - internal/orchestrator/revision.go (new): polling + execution logic - internal/orchestrator/revision_test.go (new): 3 test cases
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
When a human submits a CHANGES_REQUESTED review on a symphony-go PR, the orchestrator now detects it via polling and runs a single revision cycle on the existing branch — updating the PR in place instead of closing and reopening.
How it works
pr_readyjobs for fresh CHANGES_REQUESTED reviews submitted afterjob.UpdatedAtJob.RevisionAttempted = true— only one revision cycle runs per PR; subsequent reviews are left for human follow-upDesign decisions
pr_ready)job.UpdatedAtare ignored (prevents acting on old feedback)isIgnoredApprovalUserChanges
internal/github/github.go— AddPRReviewtype +ListPRReviewsto Client interfaceinternal/github/fake.go— AddSeedPRReview+ListPRReviewsto InMemoryFakeinternal/types/types.go— AddRevisionAttemptedfield to Jobinternal/orchestrator/loop.go— CallPollPRRevisionsin tickinternal/orchestrator/revision.go(new) — Polling + execution logicinternal/orchestrator/revision_test.go(new) — 3 test casesTests
All 3 new tests pass:
TestPollPRRevisions_HappyPath— full revision cycle commits + pushesTestPollPRRevisions_RevisionAttemptedSkips— second revision blockedTestPollPRRevisions_StaleReviewIgnored— old reviews ignored