On the beta cluster, Lexeme Lua access is enabled now, and the mw.wikibase.lexeme package is loaded, but mw.wikibase.lexeme is not available:
=package.loaded['mw.wikibase.lexeme'] table =mw.wikibase.lexeme nil
Similarly, on Commons, Lua access is enabled but the mw.wikibase.mediainfo global isn’t set properly:
=mw.wikibase.mediainfo nil =package.loaded['mw.wikibase.mediainfo'] table
I now think this is a Scribunto bug (T294545), happening because we register these modules before the main mw.wikibase module, due to how the extensions are loaded in mediawiki-config. The rest of the original description below, and the first comments on the task, are red herrings.
I think this is a load order problem. In the file mw.wikibase.lexeme.lua, setupInterface() has this code:
mw = mw or {} mw.wikibase = mw.wikibase or {} mw.wikibase.lexeme = wikibaseLexeme package.loaded['mw.wikibase.lexeme'] = wikibaseLexeme wikibaseLexeme.setupInterface = nil
But in mw.wikibase.lua, it looks like this:
mw = mw or {} mw.wikibase = wikibase package.loaded['mw.wikibase'] = wikibase wikibase.setupInterface = nil
This looks like the Lexeme module tries to make its registration work regardless of whether it or the Wikibase module is loaded first, but the Wikibase module is not so careful, and overwrites any existing mw.wikibase value. So I suspect that for some reason, the Lexeme setupInterface() gets called before the Wikibase one on Beta, and that’s (one reason?) why Lexeme access doesn’t work properly.