Skip to content

feat(seer): Prefer sentry_run_id over legacy run_id in autofix UI - #120541

Merged
trevor-e merged 3 commits into
masterfrom
telkins/autofix-prefer-sentry-run-id
Jul 24, 2026
Merged

feat(seer): Prefer sentry_run_id over legacy run_id in autofix UI#120541
trevor-e merged 3 commits into
masterfrom
telkins/autofix-prefer-sentry-run-id

Conversation

@trevor-e

Copy link
Copy Markdown
Member

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.

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.
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 24, 2026
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Story previews

Preview the stories changed in this PR on the Vercel deployment:

Preview deployment: https://sentry-r551x51gb.sentry.dev

@github-actions

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 94.02% 94.02% ±0%
Typed 136,398 136,400 🟢 +2
Untyped 8,668 8,668 ±0
🔍 1 new type safety issue introduced

Non-null assertions (!) (1 new)

File Line Detail
static/app/components/events/autofix/useExplorerAutofix.tsx 705 getAutofixRunId(response)!

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.
stepOptions: {
insertIndex?: number;
runId?: number;
runId?: number | string;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has to be duplicated due to how imports are treated for this feature.

@trevor-e
trevor-e marked this pull request as ready for review July 24, 2026 14:19
@trevor-e
trevor-e requested review from a team as code owners July 24, 2026 14:19
@trevor-e
trevor-e merged commit 05f7a0f into master Jul 24, 2026
71 checks passed
@trevor-e
trevor-e deleted the telkins/autofix-prefer-sentry-run-id branch July 24, 2026 16:18
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants