Files
BoosAPI/src
boos bd129fc160 fix(billing): new users get zero quota by default not unlimited
A freshly registered user's auto-provisioned default downstream key must
start with a zero spend allowance, not unlimited. Two parts:

- DEFAULT_NEW_USER_MAX_COST_USD changes from 1.0 to 0.0, so new users have no
  free spend until they top up or an admin raises the cap.
- The constant's docs now spell out the failure mode it guards: a NULL
  max_cost is treated as *unlimited* by the proxy, so the column must always
  be bound on INSERT. The registration path (routes::auth::register) and the
  admin create-user path (routes::admin::users) both already include the
  max_cost column and bind this constant, so both now persist 0.0 rather than
  leaving NULL.

Tests (cargo test --lib routes::auth::tests, 10 passed): assert the constant
is 0.0, and run the registration key INSERT against an in-memory DB to verify
the stored max_cost is non-NULL and exactly 0.0. The agent suites
(approval/sandbox/bash_sandbox/toctou) stay green.
2026-06-23 13:25:52 +08:00
..