ref(seer): Remove legacy PR-created attribution/linking from process_autofix_updates (CW-1719 phase 2)#120584
Draft
vaind wants to merge 1 commit into
Draft
Conversation
vaind
force-pushed
the
ivan/cw-1719-notify-seer-pr-created
branch
from
July 25, 2026 11:05
958f2d7 to
e2da0b8
Compare
…autofix_updates The SEER_PR_CREATED branch of process_autofix_updates records PR attribution and the run<->PR link only when a run has a group_id, so PRs from group-less runs were never attributed or linked. The new notify_seer_pr_created RPC now records both for every PR Seer creates, run-anchored and issue-optional, which makes this write redundant. Drop the attribution/link calls from the completion-hook path (and their now unused imports). Everything else stays: the Activity creation and the entrypoint fan-out for SEER_PR_CREATED are untouched, as is the GitHub-webhook backstop. The obsolete process_autofix_updates attribution/link tests move to the notify_seer_pr_created suite; the Activity test is kept. This is safe only once the notify_seer_pr_created receiver is deployed and Seer's writer calls it, so this PR must stay draft until then. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
vaind
force-pushed
the
ivan/cw-1719-remove-legacy-pr-attribution
branch
from
July 25, 2026 11:06
e7ceb82 to
866f9dd
Compare
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.
What
Removes the redundant PR attribution + run↔PR link write from the autofix completion-hook path (
process_autofix_updates, theSEER_PR_CREATEDbranch).Once the run-anchored
notify_seer_pr_createdRPC (#120583) records attribution and linking for every PR Seer creates — including PRs from group-less runs that the completion hook silently skipped — this second write is pure duplication (idempotent, but dead weight).Diff
attribute_seer_created_pull_requests(...)andlink_seer_run_pull_requests(...)calls (and their now-unused imports) fromprocess_autofix_updates.Activitycreation forSEER_PR_CREATED, the entrypoint fan-out viaon_autofix_update, all other event-type handling, and the GitHub-webhook backstop insrc/sentry/seer/autofix/webhooks.py.process_autofix_updatesattribution/link tests (..._records_pr_attribution,..._pr_attribution_disabled,..._links_pull_requests,..._link_killswitch) and their shared payload helper are removed — that behavior now lives in theNotifySeerPrCreatedTestsuite added by feat(seer): Run-anchored notify_seer_pr_created RPC for PR attribution (CW-1719) #120583. Thetest_create_seer_activity_pr_created_with_pull_requestsActivity test is kept.Why it's safe
Attribution and linking are idempotent and best-effort, so during the rolling deploy window both writers can coexist harmlessly (the second is a no-op). This PR only removes the second writer after the first is proven live — hence the draft gate.
Tests run vs deferred
tests/sentry/seer/entrypoints/test_operator.py— 50 passed (was 54; the 4 removed tests migrated to feat(seer): Run-anchored notify_seer_pr_created RPC for PR attribution (CW-1719) #120583).mypyonoperator.py— passed.prek run(ruff, ruff-format, flake8, mypy) on the diff — passed.Deferred to CI: the full backend suite.
🤖 Generated with Claude Code