mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 18:41:08 +02:00
The shared-hono credits client returns DEFAULT_BALANCE=1000 when /api/v1/internal/credits/balance/:userId responds with no row, so local-dev accounts silently diverge from production — credit-gated flows look free in dev and only blow up after deploy. Seeding a real credits.balances row makes the fallback unreachable and the dev stack exercises the same code path as prod. Default is 10_000 credits (overridable via CREDITS env var) and is applied alongside the existing tier + role + sync-gift upserts, so setup-dev-user.sh stays a single idempotent pass. Existing dev accounts (tills95, tilljkb, rajiehq) were backfilled manually once; re-running the script won't clobber a higher balance because the ON CONFLICT uses GREATEST. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| setup-dev-user.sh | ||