these kinds of marketplace edge cases are brutal bc they sit at the billing boundary. one mitigation ive used is treating every entitlement change as an event with a monotonic version and making the consumer idempotent (ignore stale versions).
also worth adding a reconciliation job: periodically recompute entitlements from source of truth and repair drift. its annoying but it turns races into eventual consistency instead of permanent weird states.
these kinds of marketplace edge cases are brutal bc they sit at the billing boundary. one mitigation ive used is treating every entitlement change as an event with a monotonic version and making the consumer idempotent (ignore stale versions).
also worth adding a reconciliation job: periodically recompute entitlements from source of truth and repair drift. its annoying but it turns races into eventual consistency instead of permanent weird states.