fix(gatorwalk-factory): a factory whose file does not parse stays in the studio (swamp-club #2889) #421
Loading…
Reference in a new issue
No description provided.
Delete branch "cue/2889-gatorwalk-factory-studio"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes swamp-club #2889.
While a factory's model definition file was not valid YAML (an agent mid-edit), swamp's
findAllGlobalskipped it. The studio's list dropped the factory, the page jumped to another one (losing an open Simulate walk), and it stayed there after the file was fixed.Changes
listFactoriestakes an optional memory of the factories it listed before. A factory swamp now skips stays listed while its file is still there and no listed factory claims that path. Its route serves the raw text, so the page shows the YAML problem with the last good graph marked STALE. A factory whose file is gone is forgotten.servekeeps one memory for the life of the process, shared by the 3-second relist and every request. The file watch therefore keeps following the broken file, and fixing it reloads the page in place.Left out (in the decision log): a studio started while a file is already broken does not list that factory until it parses, and swamp's skip warning is not shown.
Testing
studio_server_testcases: a factory swamp skips stays listed, has its text served and stays followed by the watch; it is dropped once its file is deleted; a factory now listed at its file replaces it; with no memory, the listing is unchanged. Newstate_testcase for the removal flash./api/factorieslisted only beta, and the page stayed on beta after the fix. With this change, alpha stays picked with the STALE YAML note, both factories stay listed, and the fix reloads alpha in place.🤖 Generated with Claude Code