Promote test → main: remove Songstats quota ledger + budget gate (#674)

Merged
SW
4mo ago
+42-236

Promotes test to main. Net change vs main: #674 — removes the local quota ledger + budget gate (chat#1797 bullet 2, code half). Songstats is the rate authority; the drain no longer stalls on a stale ledger.

(#673 backoff/logging and #671 measurement-jobs card gate are already on main from #675; included here as part of the test branch history.)

Follow-up: apply recoupable/database#35 (drop songstats_quota_ledger table) AFTER this deploys.


Summary by cubic

Promotes test to main and removes the local Songstats quota ledger and budget gate so the backfill relies on Songstats' own rate limiting and no longer stalls on a stale ledger.

  • Refactors

    • Deleted songstats_quota_ledger insert/select utilities, getBackfillBudgetStep, and related tests.
    • backfillTrackStep: removed quota writes and hitsSpent; now returns { ok, deferred? } and still marks rows done or pending.
    • songstatsBackfillWorkflow: removed budget gating; always claims up to 25, stops on a defer (releases remaining claims), drains until no claimable rows; result now returns { backfilled, terminal, deferred }.
  • Migration

    • Drop the songstats_quota_ledger table after deploy.