Repository navigation
Conversation
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.
ELI5
Two billing flows previously interpreted the server's billing mode independently. This PR gives them one shared lookup table, so each mode has one reviewable definition while existing routing behavior stays the same.
Motivation
After the billing rollout flags were retired,
billing_railbecame the deciding input for account routing and cancellation eligibility. #14645 — Consolidate billing_rail routing and document the legacy_stripe exit condition identified separate inline predicates whose handling could drift, especially when the backend adds another rail. Centralizing the mapping makes new generated rail values fail typechecking until they are classified, while preserving the current fail-open behavior for values an already-built frontend does not recognize.Provenance
pnpm test:unit src/composables/billing/billingRailPolicy.test.ts: 6 passed; targeted oxfmt, ESLint, and type-aware Oxlint passed; pre-commitpnpm typecheckpassed; GitHub checks: 86 passed and 24 skippedlegacy_stripeexit contract are deferred to Define billing_rail semantics and the legacy_stripe exit condition #15214 — Define billing_rail semantics and the legacy_stripe exit conditionReviewer context
legacy_stripeexit contract; tracked in Define billing_rail semantics and the legacy_stripe exit condition #15214 — Define billing_rail semantics and the legacy_stripe exit conditionSummary
getBillingRailPolicyas the single classification site for known, absent, and unrecognized runtime rails.satisfies neverso a widened generatedBillingRailunion fails typechecking until classified.Test plan
Fixes #14645