You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
environments.json does not record which Viron server an environment was created on #63
environments.json is keyed by grid count and grid size alone (getEnvironmentKey in main.py, for example 1x50). Each entry records an environment_id but not the server it was created on.
While the Viron address was fixed, one server was the only possibility. Once PR #62 lets the address be set through PATCHWORK_VIRON_URL and PATCHWORK_VIRON_PORT, a cache written against one Viron is read against another:
If the new server does not know the ID, Error loading environment, please check logs. is shown and the program exits with status 0.
If the new server has an unrelated environment with that ID, it is rendered with no warning. Its locations are scaled by the requested grid size, not the environment's own, so the picture could also be wrong.
PR #62 documents this in the README's Starting Viron section and says to delete the file or use another working directory. The file format is not changed there.
Possible directions
Include the address in the key, or in a per-server section of the file. Existing files would need a migration or would be ignored.
Record the address in each entry, and treat a mismatch as a cache miss or an error.
Keep the file as it is and rely on the README.
Acceptance criteria
A decision is recorded on which direction is intended.
If the file changes, a unit test under tests/ shows that an entry written for one address is not loaded for another, and existing environments.json files keep working or fail with a clear message.
Activity