Skip to content

feat(billing): share Seer billing feature identifiers - #521

Merged
sehr-m merged 5 commits into
mainfrom
codex/shared-seer-billing-feature
Nov 10, 2026
Merged

sehr-m merged 5 commits into
mainfrom
codex/shared-seer-billing-feature

Conversation

@sehr-m

@sehr-m sehr-m commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Seer billing attribution currently uses service-local feature definitions, which can let Sentry's credit checks and Seer's LLM usage tags disagree. Add a shared SeerBillingFeature enum with 35 concrete labels plus UNSPECIFIED, based on the Seer Feature Map.

Cross-repository adoption

  1. Merge and let the existing release workflow publish sentry-protos. Update the dependency minimum and lockfile in Sentry and Seer to that release.
  2. In Seer, add optional billing_feature support to feature-run creation and returned run state, persist it, and preserve it across continuations/retries. Use it for proxy attribution. Add an explicit compatibility fallback for older runs; deploy this support before Sentry starts sending the field.
  3. In Sentry, select the feature at trusted creation entrypoints, check credits using it, and send it to Seer. On existing runs, validate ownership, resolve attribution from Seer state, and use one billing policy for steps, pushes, replies, and PR feedback. This replaces local extras["seer_feature"] storage.
  4. Return UI/agent eligibility on initial load and enforce a fresh check at each operation. Do not recalculate billing eligibility on progress-only polls.
  5. Update billing's feature-to-category/free-policy configuration before emitting the new canonical labels. Keep the existing CheckSeerCreditsRequest.feature_id string field compatible using an enum-to-label adapter. UNSPECIFIED is not a free feature; require concrete attribution for new runs and handle old missing attribution explicitly.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow ci / buf-checks (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedNov 10, 2026, 10:21 PM

@sehr-m
sehr-m marked this pull request as ready for review November 10, 2026 21:49
@sehr-m
sehr-m requested a review from a team as a code owner November 10, 2026 21:49
SEER_BILLING_FEATURE_AUTOFIX_WEB = 1;
SEER_BILLING_FEATURE_AUTOFIX_HEADLESS = 2;
SEER_BILLING_FEATURE_AUTOFIX_INTEGRATIONS = 3;
SEER_BILLING_FEATURE_AUTOFIX_AGENTIC_TRIAGE = 4;

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.

could be worth a quick comment differentiating this from SEER_BILLING_FEATURE_AGENTIC_TRIAGE

@sehr-m
sehr-m merged commit 6097365 into main Nov 10, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants