Optionalfilter: { pspCustomerId?: string; status?: SubscriptionStatus }OptionallistOptional scale path for chargeDueSubscriptions: return records that are
due — active/trialing with currentPeriodEnd <= dueBefore, or past_due
with nextRetryAt <= dueBefore — never canceled or paused ones, in a
stable order, at most limit of them. Leave out records that only
resolvePendingRenewal moves on: those with a pendingRenewal, or whose
renewalAttempt for the current period holds a frozen replay. The cron
does nothing for them, and a full batch of them would hold back every due
record after it. Push the predicate into a database index; the manager
pages until a short batch and still re-checks due-ness per record, so
this filter is an optimization, not a trust boundary.
Without it the manager falls back to per-status list() scans.
The persistence seam — implemented by the HOST over its own database.
saveupserts by record.id. Implementations must persist every field verbatim; the manager treats the store as the single source of truth.