feat(autofix): Add pause for PR iteration - #122086
Draft
alexsohn1126 wants to merge 5 commits into
Draft
Conversation
Adds backend-only pause state for one Autofix run, stored in SeerRun.extras. A pause empties the Redis feedback queue and blocks the enqueue, drain, and agent-trigger paths. No endpoint or frontend yet, so nothing writes the state today. CW-1709
The row can go away between the lookup and the marker write. Catch SeerRun.DoesNotExist and return False, as the other marker writers in this package already do.
Remove resume_pr_iteration and the clear_run_extra helper it was the only caller of. The feature is pause-only now.
Removes three tests whose behavior is already covered elsewhere: the paused check-suite listener case (the enqueue gate and the rejected-enqueue routing each have their own test), the no-marker pause default, and the run-extra read/write round trip.
The marker must land before the queue is cleared. A failed marker write must therefore leave the queue alone.
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.
Backend only. Adds per-run pause state for Autofix PR iteration, stored in
SeerRun.extras.A pause writes the marker then empties the Redis feedback queue. Three gates enforce the state: enqueue, drain, and the agent trigger. A paused run also skips the cap-exhausted handoff so no comment is posted.
Pause only. There is no resume path in this PR, so a paused run stays paused. Nothing writes the state today; the endpoint, the flag, the UI, and resume come in a follow-up.
CW-1709