Skip to content

feat(seer): Add seer:read and seer:write scopes - #127501

Merged
sebastianv1 merged 1 commit into
masterfrom
sebastianshanus/aiml-3633-add-seer-scopes
Oct 16, 2026
Merged

sebastianv1 merged 1 commit into
masterfrom
sebastianshanus/aiml-3633-add-seer-scopes

Conversation

@sebastianv1

@sebastianv1 sebastianv1 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Developers who go through the autofix flow and want to modify the generated output for any of the steps (root cause, plan or code changes) now go through the Seer panel. As a result, when they prompt Seer it goes through the Sentry API and makes a POST request to autofix which requires the event:write scope by default for all AI endpoints.

This can be annoying to have to grant permission to the seer agent every 4 hours for something the seer agent logically should be able to write to (it's own output).

Changes

This adds seer:read & seer:write scope pair we can grant the agent and then the subsequent autofix run APIs so that the agent doesn't require permission from the user to run.

Test plan

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 15, 2026
@linear-code

linear-code Bot commented Oct 15, 2026

Copy link
Copy Markdown

AIML-3633

@sebastianv1
sebastianv1 force-pushed the sebastianshanus/aiml-3633-add-seer-scopes branch from 2918d79 to b9aac9a Compare October 15, 2026 14:05
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

This PR has a migration; here is the generated SQL for src/sentry/hybridcloud/migrations/0044_add_seer_scopes.py src/sentry/migrations/1215_add_seer_scopes.py

for 0044_add_seer_scopes in hybridcloud

--
-- Alter field scopes on apikeyreplica
--
-- (no-op)
--
-- Alter field scopes on apitokenreplica
--
-- (no-op)

for 1215_add_seer_scopes in sentry

--
-- Alter field scopes on apiauthorization
--
-- (no-op)
--
-- Alter field scopes on apikey
--
-- (no-op)
--
-- Alter field scopes on apitoken
--
-- (no-op)
--
-- Alter field scopes on sentryapp
--
-- (no-op)

@sebastianv1
sebastianv1 marked this pull request as ready for review October 15, 2026 14:25
@sebastianv1
sebastianv1 requested review from a team as code owners October 15, 2026 14:25
@sebastianv1
sebastianv1 added this pull request to stack #127556 October 15, 2026 15:17
@sebastianv1
sebastianv1 force-pushed the sebastianshanus/aiml-3633-add-seer-scopes branch from b9aac9a to fb1a1ba Compare October 16, 2026 13:13

@markstory markstory left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scope names look good to me. I think you can skip the migrations as the scopes fields were removed earlier this week.

Comment thread src/sentry/hybridcloud/migrations/0044_add_seer_scopes.py
Comment thread src/sentry/migrations/1215_add_seer_scopes.py
Adds a `seer` scope family for work Seer produces inside Sentry, such as
Autofix analysis. Every organization role that already has `event:write`
gets both scopes, in `SENTRY_ROLES` and `SENTRY_GRANULAR_ROLES`.
`seer:read` joins the read-only set, since every `:write` scope must imply
its `:read` counterpart.

No endpoint accepts these scopes yet, so this changes nothing for existing
callers. A follow-up lets `seer:write` run Autofix analysis steps.

Refs AIML-3633
@sebastianv1
sebastianv1 force-pushed the sebastianshanus/aiml-3633-add-seer-scopes branch from fb1a1ba to a8a810f Compare October 16, 2026 16:10
@sebastianv1
sebastianv1 merged commit d775bff into master Oct 16, 2026
88 checks passed
@sebastianv1
sebastianv1 deleted the sebastianshanus/aiml-3633-add-seer-scopes branch October 16, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants