The unrefactorable ball of mud problem is real, which is why both Stripe and Shopify have highly statically typed code bases (via Sorbet).
Btw Stripe uses Ruby, but not Rails.
Btw Stripe uses Ruby, but not Rails.
Having types helps, but it's not a necessity. When I was at Chime we faired very well with just rails and no types.