mirror of
https://github.com/stablyai/orca.git
synced 2026-11-15 18:37:24 +00:00
- migration 0008: plans, immutable plan_versions, plan_prices (Stripe mirror), entitlement_grants, entitlement_audit, entitlement_shadow_diffs, stripe_sync_state; subscriptions.seat_price_id - catalog/catalog.json (catalog-as-code: Team, Enterprise, Trial; no prices) + scripts/catalog-apply.ts - typed entitlement registry (entitlement-keys.ts) with sum/max/union/or aggregation - grants.ts: idempotent projection of each subscription (Stripe mirror) and trial into grants, hold/release/revoke, out-of-order guard, terminal revocation, audit; manual/promo grants - entitlements.ts: one builder fed by legacy terms or grant terms; ENTITLEMENTS_MODE off|shadow|on; shadow records every disagreement; lazy re-projection; cron backfill - trial hours come from the catalog's trial plan when on (granted trials keep their hours) - the whole suite runs in legacy, shadow (zero diffs enforced) and on modes