I see why it's not working now: the globals are never loaded at all. Currently, the JSCA generation mechanism only loads things that are in the Titanium namespace, which the globals obviously aren't. You'll need to add some code to TiAPIProvider.js to load it in. If you look at lines 151-161 (in the master branch version of the file), it searches for aliases and loads them in. It's an implicit shortcut I took because there is only one alias: "Titanium"->"Ti". There are many many many global objects in the JSCA, and the vast majority are type definitions, not actual global values. The only two (to the best of my knowledge) is "Titanium" and "Globals". Globals isn't aliased, so this code skips it (this was intentional). You will need to manually add a new entry to "typesToInsert" with the global object.

You will need to take care, however, that you don't overwrite globals added by the core engine itself (the spec re-specifies some built in stuff). This will require changes to the createObject method towards the bottom of the page, but great care must be taken because changes to this method carries a high risk of regressions. I would recommend getting the unit tests back up and running and also get a bunch of test apps together. I'll send you an e-mail with some apps to get and some test scripts for the code processor that make it easier to find regressions (it's not easy because most regressions don't cause the code processor to crash).