Merge "merge hasOrphanEffectsForSessionAndType to hasOrphansForSession" into main