fix(plan): surface context when Seer produces no solution#953
Conversation
When `sentry issue plan` completes but Seer can't produce a code fix, show the reason (from the API artifact), the root cause that was analyzed, and the files Seer examined — instead of the bare "No solution found" message. Fixes #951
|
Codecov Results 📊✅ 6880 passed | Total: 6880 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
All tests are passing successfully. ❌ Patch coverage is 55.45%. Project has 14077 uncovered lines. Files with missing lines (2)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 77.05% 76.99% -0.06%
==========================================
Files 319 319 —
Lines 60944 61166 +222
Branches 0 0 —
==========================================
+ Hits 46953 47089 +136
- Misses 13991 14077 +86
- Partials 0 0 —Generated by Codecov Action |
|
fix-ci: attempt 1 — lint failures: cognitive complexity in |
Extract buildNoSolutionContext helper to reduce cognitive complexity of buildPlanData below the 15-point threshold. Replace return undefined with bare return, and fix formatting in test file.
|
All CI checks green, self-review clean — marked ready for review. Changes: when |
Move root_cause display inside the no-reason branch to avoid redundancy when the API already provides an explanation.
The Seer API uses "N/A" as file_path for external/non-code reproduction steps. Filter these out so only real paths appear.
extractRootCauses only searched state.steps, missing root causes returned in the newer blocks API format. Mirrors the pattern already used by extractSolution and extractNoSolutionReason.
Live testing resultsTested against 3 real issues (DOCS-84Y, CLI-A0, SENTRY-5PE8). The no-solution context now shows root cause description + examined files instead of the bare message. While testing, discovered a pre-existing issue: |
…d polling - extractSolution() now reads step.solution[] + step.description (current API shape) with artifact-level as legacy fallback - triggerSolutionPlanning() sends select_root_cause to /autofix/update/ with the correct cause_id and stopping_point - shouldStopPolling() stops on NEED_MORE_INFORMATION (solution ready) - Plan command passes stopOnWaitingForUser and selectedCause.id Tested against live API: SENTRY-5K7G (1-step), MCP-SERVER-FTB (2-step), DOCS-84Y (5-step) all return solutions correctly now. Fixes #958
|
fix-ci: attempt 2 — unit test in |
When
sentry issue plancompletes but Seer can't produce a code fix, the output now shows:Previously it just said "No solution found. Check the Sentry web UI for details."
Testing
bun test test/types/seer.test.ts— 22 tests pass (10 new forextractNoSolutionReasonandextractExaminedFiles).Closes #951