Not sure where this problem comes from, could be config or software, but I just noticed that on test.wikipedia.org, I see the gadgets from test2.wikipedia.org
Definition for test.wp: https://test.wikipedia.org/wiki/MediaWiki:Gadgets-definition
Does not match with the gadgets actually shown on test.wp
https://test.wikipedia.org/wiki/Special:Gadgets
https://test.wikipedia.org/wiki/Special:Preferences#mw-prefsection-gadgets
which instead reflects what seems to be https://test2.wikipedia.org/wiki/MediaWiki:Gadgets-definition
This seems concerning that one wiki shows content from another wiki all of a sudden. Check with MediaWiki-extensions-GlobalPreferences team and they don't think it's something that they are triggering. Not sure where else to look.