ci/woodpecker/push/woodpecker Pipeline was canceled
credits_drawn could exceed credit_balance after an admin set/correction (or a negative adjustment), so a later pack was only partly usable: available = max(0, purchased - drawn) swallowed the difference. Cap credits_drawn at the row's balance on every add_credits movement; ledger history is unchanged. Tests cover reduction-then-repurchase.