Skip to content

feat(autofix): Add pause for PR iteration - #122086

Draft
alexsohn1126 wants to merge 5 commits into
masterfrom
alexsohn/cw-1709-allow-iteration-pause-and-resume
Draft

feat(autofix): Add pause for PR iteration#122086
alexsohn1126 wants to merge 5 commits into
masterfrom
alexsohn/cw-1709-allow-iteration-pause-and-resume

Conversation

@alexsohn1126

@alexsohn1126 alexsohn1126 commented Aug 14, 2026

Copy link
Copy Markdown
Member

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

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
@linear-code

linear-code Bot commented Aug 14, 2026

Copy link
Copy Markdown

CW-1709

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 14, 2026
Comment thread src/sentry/seer/autofix/pr_iteration/pause.py
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.
@alexsohn1126 alexsohn1126 changed the title feat(autofix): Add pause and resume for PR iteration feat(autofix): Add pause for PR iteration Aug 15, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant