Catalog sync updates/deletes features, plan features, credit mappings, and plan membership without invalidating entitlement caches. Affected area: apps/api/src/routes/api/sync.ts. Impact: cached entitlement decisions can continue granting removed features or old limits until cache expiry after SDK sync changes. Expected: entitlement cache reflects catalog mutations promptly. Fix: invalidate affected feature, planFeatures, subscription, and customer entitlement cache keys when sync changes catalog data, or introduce an organization catalog version in cache keys and bump it on sync. Add tests proving removed/lowered features are not granted after sync.
Catalog sync updates/deletes features, plan features, credit mappings, and plan membership without invalidating entitlement caches. Affected area: apps/api/src/routes/api/sync.ts. Impact: cached entitlement decisions can continue granting removed features or old limits until cache expiry after SDK sync changes. Expected: entitlement cache reflects catalog mutations promptly. Fix: invalidate affected feature, planFeatures, subscription, and customer entitlement cache keys when sync changes catalog data, or introduce an organization catalog version in cache keys and bump it on sync. Add tests proving removed/lowered features are not granted after sync.