feat(api): Add a PUBLIC_EXPERIMENTAL publish status - #123914
Merged
DominikB2014 merged 2 commits intoSep 11, 2026
Merged
Conversation
ApiPublishStatus offered only a permanent stability commitment or invisibility, so endpoints that were ready to document but not to freeze parked in EXPERIMENTAL indefinitely. Add PUBLIC_EXPERIMENTAL between them: published, but free to change incompatibly. Publication is now expressed once, as ApiPublishStatus.is_published, and every gate keyed on PUBLIC reads it -- the OpenAPI filter, the S022 response-shape lint, and the Seer public-API matrix -- so the new status is held to the exact same bar as PUBLIC. Published operations carry x-sentry-experimental so docs can distinguish them. The trace-items/metrics endpoint adopts it as the first user. Publishing it pulled it into the Seer matrix, which needs its feature flag registered, and it gains a response example; the response TypedDicts move to a *_types.py so the examples module can import them without a cycle.
Nothing renders x-sentry-experimental, so on its own the marker ships inert and a PUBLIC_EXPERIMENTAL endpoint reads as stable. Prepend a notice to the operation description instead, which the docs already render. Four endpoints had hand-written variants of this warning in their docstrings, in four different wordings and one buried at the end of the text; the notice adopts the most common of them.
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e15807c. Configure here.
narsaynorath
approved these changes
Sep 11, 2026
skaasten
approved these changes
Sep 11, 2026
DominikB2014
deleted the
dominikbuszowiecki/feat/api-public-experimental-status
branch
September 11, 2026 16:26
DominikB2014
added a commit
that referenced
this pull request
Sep 11, 2026
…124192) Four `PUBLIC` endpoints (the two AI conversation endpoints, the autofix state `GET`, and release threshold statuses) already warned in their docstrings that they may change. This moves them to `PUBLIC_EXPERIMENTAL` and removes the hand-written warnings, since the docs hook added in #123914 now prepends a single notice.
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.

This Pr makes two changes:
PUBLIC_EXPERIMENTALtoApiPublishStatus, filling the gap between an endpoint being invisible and being frozen under a permanent stability commitment — it is published, but free to change incompatibly. Plan is to make most of our private apis have this status, so code mode and external agents immediately benefitThere is a complementary docs pr here getsentry/sentry-docs#19320, with a screenshot from me testing this all locally
Publication is now expressed once as
ApiPublishStatus.is_published, and every gate that keyed onPUBLICreads it (the OpenAPI filter, the S022 response-shape lint, and the Seer public-API matrix), so the new status clears the exact same documentation bar asPUBLICrather than offering a shortcut past it. Because nothing downstream renders thex-sentry-experimentalmarker these operations now carry, the build also prepends a short notice to the rendered description — four endpoints were already hand-writing that warning into their docstrings in four different wordings, one of them buried at the end, and this standardizes on the most common of them. Thetrace-items/metricsendpoint adopts the status as the first user: publishing it pulls it into the Seer matrix, which needs its feature flag registered there, and it gains a response example, with its response TypedDicts moving to a*_types.pyso the examples module can import them without a circular import. Follow-ups: a sentry-docs badge readingx-sentry-experimentalto replace the text notice, the Sentaur bot tolerating the newpublic_experimentalkey in the ownership stats JSON, and migrating those four hand-rolled endpoints onto the status.