It feels excessive bootstrapping MW to just run ReleaseNotesTest (e.g. T297826: Composer command to just validate RELEASE-NOTES)...
AFAIS, it only needs MW_VERSION (can we load in defines.php instead?) and $IP (must be able to find the root directory someother way..)