f3d89ca9b9
Previous behavior: Used billingSubscription.updatedAt (when the subscription record was last modified) Problem: updatedAt changes for ANY update, not just status changes, making it unreliable for tracking when payment problems started Current behavior: Uses currentPeriodStart when subscription status is Unpaid or Canceled Why it works: WORKSPACE_INACTIVE_DAYS_BEFORE_SOFT_DELETION is shorter than the minimum billing interval (1 month). Then if a workspace is unpaid for the entire current billing period, it will always exceed the deletion threshold before the next period starts Ideal fix: Track workspace.suspendedAt explicitly, giving you the exact timestamp of when payment problems began, regardless of billing periods.