Skip to content

fix(seer): Keep night shift to orgs that had it before token billing - #130888

Open
vaind wants to merge 1 commit into
masterfrom
ivan/night-shift-token-billed-history-gate
Open

vaind wants to merge 1 commit into
masterfrom
ivan/night-shift-token-billed-history-gate

Conversation

@vaind

@vaind vaind commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Token billing makes the Seer quota check pass for every pay-as-you-go org. Night shift finds candidate orgs through Seer repo picks, and many orgs picked repos at some point without ever having a Seer plan. Today the quota check keeps those orgs out. Once they move to token billing on 12/8 they would start getting night shift runs, which the 12/8 Autofix decisions rule out: orgs that had agentic triage keep it, and orgs new to Seer don't get it yet so we scale them up incrementally.

Scheduled runs for token-billed orgs now also need a scheduled night shift run in the 30 days before the switch (TOKEN_BILLING_CUTOFF). A scheduled run row is only created after the quota check passes, so this keeps night shift with the orgs that had access before the switch, whether or not one of their projects qualified. Orgs that aren't token-billed and manual runs (the project endpoint and the admin trigger) are unchanged. The check runs after the quota check, so only orgs that pass it pay for the extra feature check and the indexed run lookup.

For reviewers:

  • If the switch date moves, TOKEN_BILLING_CUTOFF has to move with it. Orgs that migrate later, for example annual plans at renewal, are judged on the same window.
  • feat(seer): Make token-billed orgs eligible for night shift #130664 left a follow-up to schedule token-billed orgs that have no Seer repo picks. With this gate that follow-up would not change who runs, so it can wait until agentic triage ships as an automation.

context in CW-2255

Token billing makes the Seer quota check pass for every pay-as-you-go org, so orgs that picked Seer repos but never had a Seer plan would start getting free scheduled night shift runs. Scheduled runs for token-billed orgs now need a scheduled run in the 30 days before the switch. Manual runs are unchanged.

Refs CW-2255
@vaind
vaind requested a review from a team as a code owner November 12, 2026 10:00
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 12, 2026
@vaind
vaind requested review from srest2021 and wedamija November 12, 2026 10:07
@vaind vaind closed this Nov 12, 2026
@vaind vaind reopened this Nov 12, 2026

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.

1 participant