Skip to content

fix(cli): Keep response validation working with @sentry/api 1.53.0 - #2117

Merged
BYK merged 5 commits into
mainfrom
build/sentry-api-1.52.0
Nov 9, 2026
Merged

BYK merged 5 commits into
mainfrom
build/sentry-api-1.52.0

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

#2113 already moved main to @sentry/api 1.53.0. This PR fixes what that bump left broken. The branch started as a 1.52.0 bump and merges main, so it doesn't change any dependencies. 1.53.0 only adds docs for the 2 AI-conversation operations on top of 1.52.0. Its validators are identical once descriptions are stripped.

1.52.0 gives types to many response fields that used to be open records. It adds about 250 patterns and 140 enums, and replaces about 125 additionalProperties: {} objects with typed ones. I diffed every valibot schema the CLI validates responses with against 1.51.0. Two of them can reject real responses:

  • Trace meta. transactionChildCountMap[].transaction.event_id is now a required string. Sentry returns null there for spans that belong to no transaction (fix: Allow nullable transaction.event_id in trace metadata schema #494). With 1.52.0 or later, getTraceMeta throws on those traces, and replay view drops their counts. The CLI now accepts null. The spec is wrong here, see Trace meta types transaction.event_id as never null sentry#130461.
  • Sentry App components. schema is now the UI element union that Sentry checks apps against when they're saved. Main still validates every component against it. One installed app whose stored schema doesn't match it would fail the whole listing and block linking through every app. The CLI now leaves schema unchecked and still validates the selected app's link form with LinkFormSchema.

The output-schema field extractor now recognizes strictObject, which 1.52.0 emits for closed objects. Alert config shows as object again in the skill reference instead of unknown. Monitor config still has no description, because the generated validators drop the description on anyOf unions (getsentry/sentry-api-schema#139).

I checked the other changes against the Sentry serializers:

  • The integration status enum and the typed aspects match every provider.
  • Timeseries groupBy.value only got looser.
  • The replay segment, external issue and installation schemas didn't change.
  • Toolkit doesn't use the removed targetSampleRate, samplingMode and invite_link fields.

Testing: tsc and lint pass on the merged branch. CLI test:unit passes except for the 5 known file-permission tests (EACCES/EPERM). Before the merge, the full pnpm run test, measure-tokens and CLI ci:policy also passed, except for those tests and the codemod test, which needs glibc 2.35. New tests cover a null trace-meta id, a non-conforming component from another app, and strict objects in the field extractor.

via @BYK.

--

View Session in Sentry

sentry-junior Bot and others added 5 commits November 9, 2026 16:52
1.52.0 tightens many response schemas: about 250 new `pattern`s,
140 new `enum`s and 125 typed objects in place of
`additionalProperties: {}`. It also drops `uint64` formats and names
the bound client type `PreparedClient` (sentry-api-schema#136).
1.52.0 types several response fields that used to be open records. Three
of them affect the CLI:

- Trace meta: `transactionChildCountMap[].transaction.event_id` is now a
  required string, but Sentry returns null for spans that belong to no
  transaction (MCP-SERVER-EFR, #494). `replay view` would drop the trace
  counts for those traces. Accept null there.
- Sentry App components: `schema` is now the UI element union Sentry
  checks apps against when they are saved. One installed app whose stored
  schema doesn't match it would fail the whole listing and block linking
  through every other app. Leave `schema` unchecked and keep validating
  only the selected app's link form. The test fixtures now use real UUIDs,
  which the new schema checks.
- Issue releases: `firstRelease`/`lastRelease` can be a release with only
  `version`, so narrow before reading `shortVersion`.

The output-schema field extractor also learns `strict_object`, which
1.52.0 now emits for objects with `additionalProperties: false`.
The field tables pick up the new API descriptions for event `contexts`
and release `status` and `adoptionStages`.

Monitor `config` loses its description because 1.52.0 turns it into a
union and the generated valibot schema doesn't keep the description the
spec puts on that union. Event `occurrence` now shows `unknown`, because
its spec union has an untyped member.
Main now has #2113, which bumps @sentry/api to 1.53.0 and fixes the same
two type errors this branch fixed. Conflicts resolved toward main for the
bump, the release-version fallback in human.ts and its tests, and the
issue-app-links fixture UUIDs. This branch's tolerant component listing
and its test stay.

Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
…nces

After merging #2113, the link-form comment in issue-app-links.ts still
said the component schema is typed per component type. The component
listing on this branch leaves each app's schema unchecked, so say that.

The regenerated alert reference shows `config` as `object` again. Main's
copy shows `unknown` because #2113 ran the extractor before it handled
`strictObject`.

Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
@vercel

vercel Bot commented Nov 9, 2026

Copy link
Copy Markdown

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

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

Request Review

@BYK
BYK merged commit facbf35 into main Nov 9, 2026
29 checks passed
@BYK
BYK deleted the build/sentry-api-1.52.0 branch November 9, 2026 18:48

This branch was successfully deployed

1 active deployment
Preview — d1688964 Deployed Nov 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant