Repository navigation
feat(dashboard-api): management route for the projected billing profile - #3672
Draft
michalsuba-e2b wants to merge 1 commit into
Draft
michalsuba-e2b wants to merge 1 commit into
michalsuba-e2b wants to merge 1 commit into
Conversation
PUT /v1/management/projects/{projectID}/billing-profile stores the global
billing plane's answer per project: has_payment_method, enterprise, plan.
Same ledger-fenced delivery as project limits (projection.billing_profiles,
revision advances only forward, values written in the same transaction).
Receiver for e2b-dev/belt EN-3221; regional readers (bot-detection payment
signal, LD tier context, tier labels) switch to public.team_billing_profiles.
EN-3221
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Receiving side of EN-3221: teams born on global billing have no billing state on their control plane, which breaks regional readers (EN-3220 — bot-detection drops them entirely; the LaunchDarkly tier context and tier labels read a
base_v1that never updates). This adds the plane-side endpoint and tables the global plane pushes the profile into; the belt sender is https://github.com/e2b-dev/belt/pull/4397.Current state:
PUT /v1/management/projects/{projectID}/billing-profile(AdminJWTAuth), body{revision, has_payment_method, enterprise, plan?, decided_at?}— exactManagementUpsertProjectLimitssemantics: ledger-fenced (projection.billing_profiles), values written in the same transaction (public.team_billing_profiles), stale deliveries answered 204, team cache invalidated after commit (failed eviction logged, not returned — the limits convention).public.team_billing_profiles(has_payment_method,enterprise,plannullable — a team without a row is unknown, never defaulted). No touch ofproject_limits,team_limits, or the auth path. By the mirroring convention the canonical copies of the migration and spec change live in beltgo/oss/...; the belt PR carries them — whichever lands second is a no-op diff.make generateinpackages/dbandpackages/dashboard-api);api.gen.gochurn is the generator's.Draft until the belt sender PR is up and the contract has a billing-owner nod.
Sponsor: @michalsuba-e2b
🤖 Generated with Claude Code