While working on T304111 and trying to debug some things on the beta cluster, I think the following should be changed within Hooks::onGetUserPermissionsErrorsExpensive:
- Introduce logging for the odd edge case that happens here. The other early returns in this block shouldn't need logging as they should make themselves apparent in other ways or shouldn't require further debugging.
- The first logging block after checking if a user's IP is deny-listed should only happen when $wgSFSReportOnly is true to avoid mostly redundant logging here. This might mean moving that logging down within the if ( $wgSFSReportOnly ) conditional.