Skip to content

fix(seer-billing): Keep token-billed orgs off the legacy usage-based Seer paths - #130825

Open
sentry-junior[bot] wants to merge 5 commits into
masterfrom
srest2021/token-billed-seer-skip-legacy-paths
Open

sentry-junior[bot] wants to merge 5 commits into
masterfrom
srest2021/token-billed-seer-skip-legacy-paths

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Problem: Token-billed orgs don't have seat-based-seer-enabled, so every place that only checks is_seer_seat_based_tier_enabled sends them down the legacy usage-based path.

This PR adds is_seer_seat_or_token_billed_enabled and uses it at those checks, so token-billed orgs behave like seat-based ones:

  • Skip post-process automations (agentic triage handles this instead)
  • Skip the legacy autofix rate limit in the agentic triage cron and delivery
  • Stop passing per-project automation tuning to agentic triage
  • Get the seat-based set of stopping points (no solution step) when validating settings
  • Use the seat-based serializers for project and bulk settings PUTs (open_pr also sets auto_create_pr and tuning is limited to off/medium)
  • Skip first-assignment issue summaries
  • New project defaults (tuning, scanner, stopping point and handoff) follow the seat-based branch

is_free_cohort_org now also excludes token-billed orgs, so a free cohort org that moves to token billing is treated as paid. For these orgs:

  • Don't show a paywall on issues without an existing run
  • Automated PR footer used to say the PR was generated "at no cost". Now it uses the standard footer without that wording. Technically agentic triage runs would be generated at no cost to the user right now, but we're working on keeping feature billing in billing and keeping the footer as is would require adding extra wiring.

Relates to CW-3061

via sofia.

--

View Session in Sentry

Token-billed orgs were treated as legacy usage-based orgs anywhere we only
checked for seat-based Seer: post-process automation, agentic triage rate
limits and tuning, valid stopping points, project settings serializers,
first-assignment summaries, and new-project defaults. Route them through
the seat-based path instead.

Refs CW-3061

Co-Authored-By: sofia <sofia.rest@sentry.io>
@linear-code

linear-code Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

CW-3061

CW-3097

AIML-3860

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 11, 2026
@srest2021 srest2021 changed the title fix(seer): Keep token-billed orgs off the legacy usage-based Seer paths fix(seer-billing): Keep token-billed orgs off the legacy usage-based Seer paths Nov 11, 2026
A free cohort org that moved to token billing kept the cohort option, so it still got
free-cohort behavior: the group setup check showed a paywall on issues without a run, and
automated PRs said they were generated at no cost.

Refs CW-3061
@srest2021
srest2021 marked this pull request as ready for review November 11, 2026 22:05
@srest2021
srest2021 requested review from a team as code owners November 11, 2026 22:05

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 736ae80. Configure here.

Comment thread src/sentry/tasks/post_process.py Resolved
sentry-junior Bot and others added 3 commits November 11, 2026 22:12
Post-process now skips automation for all token-billed orgs, but the
agentic triage cron only counted token-billed orgs as paid when they also
had the token-based billing onboarding flag. The free cohort excludes
token-billed orgs, so ones without that flag got no automation at all.
Treat every seat-based or token-billed org as paid in the cron.
This reverts commit 43e1fb7.

Co-Authored-By: Sofia Rest <sofia.rest@sentry.io>

This branch has not been deployed

No deployments
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