Skip to content

feat(seer): Add single-project Seer settings endpoint#115230

Open
srest2021 wants to merge 5 commits intomasterfrom
srest2021/CW-1285-single
Open

feat(seer): Add single-project Seer settings endpoint#115230
srest2021 wants to merge 5 commits intomasterfrom
srest2021/CW-1285-single

Conversation

@srest2021
Copy link
Copy Markdown
Member

@srest2021 srest2021 commented May 8, 2026

Relates to CW-1285

Adds an endpoint for managing per-project Seer settings:

  • GET /api/0/projects/{org}/{project}/seer/settings/ — single-project settings read
  • PUT /api/0/projects/{org}/{project}/seer/settings/ — single-project settings update

Uses the update_seer_project_settings helper from #115037 to translate high-level fields (agent, integrationId, stoppingPoint, scannerAutomation) into project options.

Bulk endpoint followup: #115234

Example: GET

GET /api/0/projects/sentry/test-seer-settings/seer/settings/
{
    "projectId": "2",
    "projectSlug": "test-seer-settings",
    "agent": "seer",
    "integrationId": null,
    "stoppingPoint": "off",
    "scannerAutomation": true,
    "reposCount": 0
}
{
    "projectId": "2",
    "projectSlug": "test-seer-settings",
    "agent": "cursor_background_agent",
    "integrationId": "42",
    "stoppingPoint": "open_pr",
    "scannerAutomation": false,
    "reposCount": 3
}

Example: PUT

Update stopping point:

PUT /api/0/projects/sentry/test-seer-settings/seer/settings/

{"stoppingPoint": "open_pr"}
{
    "projectId": "2",
    "projectSlug": "test-seer-settings",
    "agent": "seer",
    "integrationId": null,
    "stoppingPoint": "open_pr",
    "scannerAutomation": true,
    "reposCount": 1
}

Update agent to external coding agent:

PUT /api/0/projects/sentry/test-seer-settings/seer/settings/

{"agent": "cursor_background_agent", "integrationId": 42}
{
    "projectId": "2",
    "projectSlug": "test-seer-settings",
    "agent": "cursor_background_agent",
    "integrationId": "42",
    "stoppingPoint": "open_pr",
    "scannerAutomation": true,
    "reposCount": 1
}

Turn off automation:

PUT /api/0/projects/sentry/test-seer-settings/seer/settings/

{"stoppingPoint": "off"}
{
    "projectId": "2",
    "projectSlug": "test-seer-settings",
    "agent": "seer",
    "integrationId": null,
    "stoppingPoint": "off",
    "scannerAutomation": true,
    "reposCount": 1
}

Add GET/PUT endpoint for reading and updating Seer automation settings
on a single project (agent, stoppingPoint, scannerAutomation).
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 8, 2026

CW-1285

@github-actions github-actions Bot added Scope: Frontend Automatically applied to PRs that change frontend components Scope: Backend Automatically applied to PRs that change backend components labels May 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.46%

Comment thread src/sentry/seer/endpoints/project_seer_settings.py
Comment thread src/sentry/seer/endpoints/project_seer_settings.py Outdated
Comment thread src/sentry/seer/endpoints/project_seer_settings.py Outdated
Comment thread src/sentry/seer/endpoints/project_seer_settings.py Outdated
Comment thread tests/sentry/seer/endpoints/test_project_seer_settings.py
Copy link
Copy Markdown
Member

@JoshFerge JoshFerge left a comment

Choose a reason for hiding this comment

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

couple comments, but looks good 🙏🏼 thanks for splitting out

Comment thread src/sentry/seer/endpoints/project_seer_settings.py
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 Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants