Repository navigation
feat(autofix): Send PR feedback on single-run PRs to the run - #130881
Draft
NicoHinderling wants to merge 7 commits into
Draft
NicoHinderling wants to merge 7 commits into
NicoHinderling wants to merge 7 commits into
Conversation
PR iteration found the single run behind a PR, then dropped its feedback because the run was not a step-by-step Autofix run. It now continues the single run with the feedback. The turn carries the PR iteration metadata, so caps and cards count it, and the chat shows a short notice line.
A single-run reply to PR feedback now ends its iteration like a step-by-step one: it drains feedback queued while the run was busy, records the outcome, and reacts on GitHub. An errored reply fails the iteration.
… queue PR feedback pushes for single runs no longer force-push over commits others added to the branch. Edits the agent left unpushed are pushed the way PR iteration pushes them, so they don't block later feedback. Feedback queued during any single-run turn is drained when it finishes.
Before pushing edits a single-run feedback turn left unpushed, check that the PR is still open, as PR iteration does. A closed or merged PR pauses the run instead of getting a push.
Autofix step prompts are replaced with "Started Autofix" in run responses, and single-run PR feedback turns carry the pr_iteration step, so their short notice lines were hidden too. Single runs never store a step prompt in a user message, so leave their messages as they are.
Keep tracing on the feedback drain, inline its single-run branch, pass force-push as a settings argument, and drop a new comment.
Drop Sentry's fallback push for single-run PR feedback turns. When the agent leaves edits unpushed, record the iteration as not_pushed, count it, and hand over the next queued feedback. The drain now holds single runs only while a push is in flight.
Comment on lines
238
to
239
| if group is None: | ||
| return |
Contributor
There was a problem hiding this comment.
Single-run PR feedback skips missing-group iteration finalization
When a completed single-run PR feedback turn cannot resolve its group, _complete_single_run returns before calling fail_pr_iteration_missing_group. The triggered iteration is therefore not immediately finalized with the MISSING_GROUP_ID outcome; it remains until the stale-row sweep eventually removes it and records NEVER_COMPLETED.
Evidence
_complete_single_runidentifies completed PR feedback turns, but returns immediately when_fetch_groupreturnsNone.- The multi-step completion path handles the same missing-group case by calling
fail_pr_iteration_missing_group. fail_pr_iteration_missing_groupcallscomplete_pr_iteration_detailswithMISSING_GROUP_ID; that completes and removes the triggered iteration row without needing aGroupobject.- Without that call, the row is left for the stale-row sweep, which reports a triggered stale row as
NEVER_COMPLETED.
Identified by Warden · sentry-backend-bugs · ZW7-PR8
This branch has not been deployed
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.
PR comments, reviews and CI failures on single-run PRs were dropped. They now continue that run, and the agent pushes to the same PR (AIML-3825).
not_pushedand counted, not pushed by SentryNeeds getsentry/seer#9544 deployed first.