Skip to content

ref(mcp): Delete the markdown get_issue_details path after the flip proves out - #2064

Merged
shayna-ch merged 1 commit into
mainfrom
feat/issue-details-markdown-cleanup
Nov 20, 2026
Merged

shayna-ch merged 1 commit into
mainfrom
feat/issue-details-markdown-cleanup

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

The second half of the #2042 split. #2042 flips stable get_issue_details to structured output and keeps the markdown path so rollback is a revert. This PR deletes that path. Land it after the flip has proven out in prod. It is stacked on #2042 and stays a draft until then.

What changed

  • Deletes formatIssueOutput, formatEventOutput and the per-entry markdown renderers in internal/formatting.ts, along with their tests and the tool-helpers/issue.ts re-export.
  • Deletes the markdown stack frame and thread helpers: detectLanguage, formatFrameHeader and its tests, renderInlineContext, renderEnhancedFrame, getThreadDisplayValue, getThreadFlags, formatThreadTable, renderContextLines, formatVariableValue, renderVariablesTable, and the language tables and imports only they used.
  • Deletes formatCodeLocation and the thread test fixtures that only the deleted tests used.
  • Removes experimentalOutputSchema, which no tool declares after feat(mcp): Graduate structured get_issue_details to stable sessions #2042, from the tool types, server, server tests, the structured-output test guard, and the metadata linter. The linter goes back to main's single stale rule.
  • tool-responses.md drops the experimentalOutputSchema policy and the PENDING-vs-EXEMPT linter note.
  • New issue-event-payload.test.ts keeps the coverage that the deleted markdown tests had for the chained exception, CSP, evidence, and metric alert mappings and the metric alert follow-up calls.

The tree matches the reviewed pre-split #2042 head (398461e) exactly. toolDefinitions.json doesn't change, so tools/list costs the same tokens as #2042.

Checks

All run with env -u SENTRY_AUTH_TOKEN, package-scoped only:

  • mocks build
  • mcp-core generate-definitions (no diff)
  • mcp-core tsc
  • full mcp-core vitest: 2145 passed, 3 skipped
  • root pnpm run lint: 0 warnings, 0 errors

Independent reviewer passed on the pre-split #2042, which had this same tree; review fixes applied in 7a0d84d.

via @dcramer.

--

View Session [Sentry]

@vercel

vercel Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Nov 20, 2026 6:20pm UTC
sentry-local Ready Ready Preview Nov 20, 2026 6:20pm UTC

Request Review

@sentry-junior
sentry-junior Bot force-pushed the feat/issue-details-markdown-cleanup branch from 527f350 to 179dafd Compare November 9, 2026 22:53
@sentry-junior
sentry-junior Bot force-pushed the feat/issue-details-markdown-cleanup branch from 179dafd to 4f00e98 Compare November 12, 2026 20:04
@sentry-junior
sentry-junior Bot force-pushed the feat/issue-details-markdown-cleanup branch from 4f00e98 to be02efa Compare November 12, 2026 20:29
@sentry-junior
sentry-junior Bot force-pushed the feat/issue-details-markdown-cleanup branch from be02efa to 23872a0 Compare November 13, 2026 22:21
@sentry-junior
sentry-junior Bot force-pushed the feat/issue-details-markdown-cleanup branch from 23872a0 to be68153 Compare November 13, 2026 22:36
Base automatically changed from feat/issue-details-structured-graduate to main November 16, 2026 18:05
shayna-ch added a commit that referenced this pull request Nov 16, 2026
…2042)

**This switches stable `get_issue_details` clients from markdown to
JSON.** It's the most-used tool. It's stacked on #2041 (which now
includes #2044's `get_event_stacktrace`) and merges after it; it's a
draft until then.

This is the flip only, split out so rollback is simple. The markdown
path stays in the code, so rolling back is a revert of this PR's one
commit. The cleanup that deletes it is #2064, stacked on this, to land
once the flip has proven out in prod.

## What changed

- Drops the experimental gate. Stable sessions now return the same
`structuredContent` that #2041 gives experimental sessions, and they
advertise `outputSchema`.
- Deletes the `get_issue_details` `OUTPUT_SCHEMA_PENDING` entry. The
`experimentalOutputSchema` plumbing stays, unused, so a revert can
restore the gate.
- Keeps the markdown issue formatter (`formatIssueOutput`,
`formatEventOutput`) and its frame and thread helpers in
`internal/formatting.ts`, still covered by `formatting.test.ts`. Nothing
calls them now. Lint has no unused-export rule, so no suppression was
needed. `get_sentry_resource` routes issue and event URLs through the
structured payload, and its tests are updated.
- The `get_event_stacktrace` suggestion now passes `thread`: the first
thread that is neither crashed nor current. If there's no such thread,
it isn't suggested.
- `tool-responses.md` describes `get_issue_details` as structured in
every session. The `experimentalOutputSchema` policy stays documented
until the cleanup removes it.
- `get_event_stacktrace` suggestions skip threads with no frames.

## Tokens (tiktoken gpt-4)

Payloads are the same as #2041, now also in stable sessions:

| Fixture | Markdown | Pretty JSON | Compact JSON |
|---|---|---|---|
| Realistic Django error issue | 1133 | 1821 (1.61x) | 1251 |
| 40-frame Java thread stack | 792 | 1908 (2.4x) | 1168 |

The `get_issue_details` outputSchema adds 2819 tokens to stable
`tools/list`.

## Checks

All run with `env -u SENTRY_AUTH_TOKEN`, package-scoped only:
- mocks build
- mcp-core `generate-definitions` (result committed; same
`toolDefinitions.json` as before the split)
- mcp-core tsc
- full mcp-core vitest: 2197 passed, 3 skipped
- root `pnpm run lint`: 0 warnings, 0 errors

Independent reviewer passed. The review fixes (7a0d84d) and the Warden
fixes (1be2856, 398461e) are folded into a121f63 together with the flip.

<!-- junior-request-attribution:start -->
via @dcramer.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3Ab44fd3158dc6862268d4e3f3d26b1906 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3Ab44fd3158dc6862268d4e3f3d26b1906)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Ab44fd3158dc6862268d4e3f3d26b1906/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: David Cramer <23610+dcramer@users.noreply.github.com>
Co-authored-by: BYK <126780+BYK@users.noreply.github.com>
Co-authored-by: Shayna Chambless <shayna.chambless@sentry.io>
Stable get_issue_details returns structuredContent, so nothing renders an
issue as markdown anymore. Delete:
- formatIssueOutput, formatEventOutput and the per-entry markdown renderers
  in internal/formatting.ts, with their tests and the tool-helpers re-export
- the markdown stack frame and thread helpers: detectLanguage,
  formatFrameHeader, renderInlineContext, renderEnhancedFrame,
  getThreadDisplayValue, getThreadFlags, formatThreadTable,
  renderContextLines, formatVariableValue, renderVariablesTable, and the
  language tables and imports only they used
- formatCodeLocation and the thread fixtures only those tests used
- experimentalOutputSchema, which no tool declares anymore, from the tool
  types, server, test guard, and metadata linter (back to one stale rule)

issue-event-payload.test.ts keeps the coverage for the CSP, chained
exception, evidence, and metric alert mappings that the deleted markdown
tests had.

Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
Co-Authored-By: Shayna Chambless <173110007+shayna-ch@users.noreply.github.com>
@shayna-ch
shayna-ch merged commit 15e266e into main Nov 20, 2026
37 checks passed
@shayna-ch
shayna-ch deleted the feat/issue-details-markdown-cleanup branch November 20, 2026 22:03

This branch was successfully deployed

4 active (1 outdated) deployments
Preview – sentry-local — 8a723e1b Deployed Nov 20, 2026 by vercel[bot]
Preview – cli — 8a723e1b Deployed Nov 20, 2026 by vercel[bot]
Actions — 8a723e1b Deployed Nov 20, 2026 by sentry-junior[bot] via eval #1997
Preview — be681534 Deployed Nov 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants