feat(seer): Prefer sentry_run_id over legacy run_id in autofix UI - #120541
Merged
Conversation
The group autofix endpoint accepts a deprecated integer run_id and a preferred UUID sentry_run_id, but the Explorer autofix hook only tracked run_id, so every continue/PR/handoff from the web UI sent the legacy field. Capture sentry_run_id from the run state and send it when present, falling back to run_id only for legacy runs without a SeerRun mirror. The run-id shim (state collapse + POST-body builder) lives in one file, autofixRunId.ts, so the whole legacy path can be deleted at once when the integer run_id is retired server-side.
Contributor
Story previewsPreview the stories changed in this PR on the Vercel deployment: Preview deployment: https://sentry-r551x51gb.sentry.dev |
Contributor
📊 Type Coverage Diff
🔍 1 new type safety issue introducedNon-null assertions (
This is informational only and does not block the PR. |
The worker payload's runId mirrors SeerExplorerRunId by hand (the worker bundle intentionally avoids importing app types); mark it so a future widening of the union updates this too.
trevor-e
commented
Jul 24, 2026
| stepOptions: { | ||
| insertIndex?: number; | ||
| runId?: number; | ||
| runId?: number | string; |
Member
Author
There was a problem hiding this comment.
This has to be duplicated due to how imports are treated for this feature.
trevor-e
marked this pull request as ready for review
July 24, 2026 14:19
NicoHinderling
approved these changes
Jul 24, 2026
Christinarlong
pushed a commit
that referenced
this pull request
Jul 24, 2026
…20541) The group autofix endpoint accepts a deprecated integer `run_id` and a preferred UUID `sentry_run_id`, but the Explorer autofix hook (`useExplorerAutofix`) only tracked `run_id` — so every continue / open-PR / coding-agent-handoff triggered from the web UI sent the legacy field, keeping the `group_ai_autofix.legacy_integer_run_id` server log warm with first-party traffic. This captures `sentry_run_id` from the run state and sends it when present, falling back to `run_id` only for legacy runs without a SeerRun mirror. No behavior change for those legacy runs — the fallback path is byte-identical to today. The run-id shim — the state collapse (`getAutofixRunId`) and the POST-body builder (`continueRunData`) — lives in one file, `autofixRunId.ts`, so the whole legacy path can be deleted in one step once the integer `run_id` is retired server-side. Callers import from there rather than repeating the `sentry_run_id ?? run_id` read. Split out from the backend logging change (#120519) per the frontend/backend atomic-deploy rule.
3 tasks
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.
The group autofix endpoint accepts a deprecated integer
run_idand a preferred UUIDsentry_run_id, but the Explorer autofix hook (useExplorerAutofix) only trackedrun_id— so every continue / open-PR / coding-agent-handoff triggered from the web UI sent the legacy field, keeping thegroup_ai_autofix.legacy_integer_run_idserver log warm with first-party traffic. This capturessentry_run_idfrom the run state and sends it when present, falling back torun_idonly for legacy runs without a SeerRun mirror. No behavior change for those legacy runs — the fallback path is byte-identical to today.The run-id shim — the state collapse (
getAutofixRunId) and the POST-body builder (continueRunData) — lives in one file,autofixRunId.ts, so the whole legacy path can be deleted in one step once the integerrun_idis retired server-side. Callers import from there rather than repeating thesentry_run_id ?? run_idread.Split out from the backend logging change (#120519) per the frontend/backend atomic-deploy rule.