Global variable in the Project Script failing to update in perspective

For my application, I am bringing a significant amount of information into ignition through a get request (system.util.netClient). I've written a function definition to create a list of dictionaries, with each dictionary containing the data for up to 25 devices. My original plan was to store that information in a global list "robots" which was initialized in a script in the Gateway Scripting Project. My thought was that I would be able to access that data from perspective or any other location within ignition because it was present on the gateway. I've run into an issue where this variable updates for references within a tag event script, but not in the script console or in perspective references.

Some Documentation:
Relevant code in the script library:
image

Call from a memory tag script:

Ignition Log:
RefreshRobotData prints the data when the global variable is updated from a tag event script.
TestTag indicates that the memory tag event script called the function getrobot3, the data matches the updated data in RefreshRobotData.
When getrobot3 is not followed by a log from the Test Tag, the definition is called from perspective and returns old data from when the script was last saved.

Tag event scripts are running on the gateway, would the perspective bindings be on a separate client scope which causes them to read old data from when the project script was last saved?

Every project has its own scripting scope. To get a universally-accessible variable, you will need to use system.util.getGlobals() or system.util.globalVarMap() (the latter in my Integration Toolkit module, supporting refreshing in Perspective UIs).

It is best to keep the object identity constant--don't reassign to the global var, but replace/update its contents instead.

Just confirming, but does Ignition's documentation shows replace/update or are you recommending something different than what they show here:

Nothing at all like that. It is unwise to blindly access any persistent variable directly in .getGlobals().

Use .setdefault() to conditionally initialize/return a dictionary or list within .getGlobals() and assign that to a script library top-level variable. Never replace that variable.

Many, many discussions about .getGlobals() and its hazards:

https://forum.inductiveautomation.com/search?q=%40pturmel%20getGlobals