feat(seer): migrate analyze_issue_with_seer + summary to explorer sections#966
Draft
JoshFerge wants to merge 1 commit into
Draft
feat(seer): migrate analyze_issue_with_seer + summary to explorer sections#966JoshFerge wants to merge 1 commit into
JoshFerge wants to merge 1 commit into
Conversation
…tions Swap the consumers over to the explorer-mode schemas/API methods added in #963, then delete the legacy plumbing. What changes - `internal/tool-helpers/seer.ts` rewritten around explorer sections: `getOrderedAutofixSections` mirrors the section splitter in `static/app/components/events/autofix/useExplorerAutofix.tsx`, and `getOutputForAutofixSection` renders the typed `root_cause` / `solution` artifacts, code-changes patches, and PR state. - `analyze_issue_with_seer` now drives the run sequentially: `root_cause` then `solution`, reusing the existing `run_id` from the GET when there already is one. - `formatSeerSummary` rebuilt against the new sections. Drop-legacy - Deleted `AutofixStatusSchema` (uppercase enum), `AutofixRunStepBaseSchema` and its `default` / `root_cause_analysis` / `solution` variants, and the legacy `AutofixRunStateSchema` (steps[] shape). - Renamed PR-2's `AutofixExplorer*Schema` and `AutofixExplorer*` types to the canonical `Autofix*` names now that they're the only autofix contract. - Deleted the legacy `getAutofixState` / `startAutofix` client methods and renamed the explorer variants from PR-2 onto those names. - Updated the legacy `autofix-state.json` fixture to the explorer shape so it still validates after the swap. Warden fix from #961 - When an existing autofix run is already in a terminal state (`error` or `awaiting_user_input`) and only carries an earlier section (e.g. `root_cause`), the tool now stops there instead of POSTing a follow-up `solution` step against a dead run. Covered by a new regression test in `analyze-issue-with-seer.test.ts`. Other - Updated MSW + undici handlers to match the explorer endpoint payload shape; the undici interceptor paths now include `?mode=explorer`. - Regenerated `toolDefinitions.json` / `skillDefinitions.json` for the updated tool description. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Agent transcript: https://claudescope.sentry.dev/share/j6cVvnKV84v1-_h_HvrYUe63LYuzahaBZot6tESW9CE
5 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.
Summary
Final piece of the autofix explorer-mode migration. Swaps every Seer consumer over to the explorer schemas/API methods added in #963 and deletes the legacy plumbing.
Consumer rewrites
Drop-legacy
Warden bot fix (from #961)
When an existing run is already in a terminal state (`error` / `awaiting_user_input`) and only carries an earlier section (e.g. `root_cause`), the tool no longer POSTs a follow-up `solution` step against the dead run — it renders what's there and stops. Covered by a new regression test (`does not POST a follow-up step when the existing run already failed`).
Other
Test plan
Stack
Once this stack lands, the standalone #961 will be closed (it tried to do all of this in one PR).
🤖 Generated with Claude Code
Agent transcript: https://claudescope.sentry.dev/share/bK6AeGdIztC20JC3ZCsSQDTayVFoR5jHqK1jm-CH1rU