managarten/services/mana-sync
Till JS ceed8ccd64 feat(mana-sync): per-app billing exemption — Cards bypasses sync gate
mana-sync's billing middleware short-circuited every push/pull with
402 for users without a sync subscription. Cards promises free Sync
in its Phase-1 GUIDELINES, so it shouldn't gate its own users on a
mana-credits subscription it never sells.

Implementation:
  • billing.NewChecker now takes an exemptApps slice. The middleware
    extracts {appId} from the URL path and short-circuits before the
    user lookup if the app is in the set.
  • Configurable via the BILLING_EXEMPT_APPS env var (comma-separated).
  • Set BILLING_EXEMPT_APPS=cards on the mana-sync container so the
    cards.mana.how Sync loop stops 402-ing.
  • Tests cover the exemption + the empty/whitespace edge cases. All
    other apps keep the original behaviour (fail-open if mana-credits
    is unreachable, 402 if it explicitly says inactive).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 15:01:54 +02:00
..
cmd/server feat(mana-sync): per-app billing exemption — Cards bypasses sync gate 2026-05-07 15:01:54 +02:00
internal feat(mana-sync): per-app billing exemption — Cards bypasses sync gate 2026-05-07 15:01:54 +02:00
test refactor: rename ManaDeck to Cards across entire monorepo 2026-04-01 11:45:21 +02:00
CLAUDE.md docs(plans): mark llm-fallback-aliases SHIPPED, add M-by-M commit table 2026-04-26 21:27:57 +02:00
Dockerfile fix(mana-sync): update Dockerfile to copy workspace shared-go dependency 2026-04-11 15:49:01 +02:00
go.mod chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
go.sum refactor(shared-go): extract shared auth package from 3 Go services 2026-04-02 13:27:44 +02:00
package.json feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00