feat(billing): add workspace credit allowance arrangements

Merged
ET
9d ago
+648-57

Stacked on #29321. Limit overrides moved to #29469.

What

  • An active WORKSPACE_CREDIT_ALLOWANCE replaces the plan's included workspace credits with a fixed amount per month (x12 on yearly). It also replaces the trial credits, with one monthly amount for the whole trial. The paid credit pack and staff grants still add on top.
  • Override credits do not roll over: at a period transition the allowance takes the seat-credit slot, which is spent first and never carried forward.
  • The current billing subscription cache keeps the unexpired allowance rows and the active one is picked at read time, so an allowance starts and ends on time. Nothing writes these arrangements yet; the writer has to refresh that cache when it adds or revokes one.
  • The billing page shows the allowance through the seat-credit field (no GraphQL change), so it reads as seat credits for now.

Testing

  • Server typecheck clean, unit tests pass (107 suites, 700 tests), lint and format clean.