fix(gatorwalk-factory): a factory whose file does not parse stays in the studio (swamp-club #2889) #421

Merged
seth merged 1 commit from cue/2889-gatorwalk-factory-studio into main 2026-10-01 18:21:59 +00:00
Owner

Fixes swamp-club #2889.

While a factory's model definition file was not valid YAML (an agent mid-edit), swamp's findAllGlobal skipped 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

  • listFactories takes 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.
  • serve keeps 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.
  • The page flashes "factory 'X' was removed" when the selected factory really goes away.
  • The studio bundle is rebuilt. DESIGN.md updates the studio server section and adds a decision-log entry.

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

  • New studio_server_test cases: 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. New state_test case for the removal flash.
  • All 730 unit tests and the studio integration tests pass.
  • Headless Chromium against a scratch repo, with alpha's YAML broken. On main, the picker moved to beta, /api/factories listed 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

Fixes swamp-club #2889. While a factory's model definition file was not valid YAML (an agent mid-edit), swamp's `findAllGlobal` skipped 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 - `listFactories` takes 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. - `serve` keeps 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. - The page flashes "factory 'X' was removed" when the selected factory really goes away. - The studio bundle is rebuilt. DESIGN.md updates the studio server section and adds a decision-log entry. 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 - New `studio_server_test` cases: 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. New `state_test` case for the removal flash. - All 730 unit tests and the studio integration tests pass. - Headless Chromium against a scratch repo, with alpha's YAML broken. On main, the picker moved to beta, `/api/factories` listed 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](https://claude.com/claude-code)
fix(gatorwalk-factory): a factory whose file does not parse stays in the studio (swamp-club #2889)
All checks were successful
CI / Review Integrity (pull_request) Successful in 1m14s
CI / Validate Attestation (pull_request) Successful in 1m9s
aeab23647b
swamp's findAllGlobal skips a model definition file it cannot parse, so a
factory an agent had mid-edit dropped off the studio's list, the page moved
to another factory (dropping an open walk), and stayed there after the fix.

serve now remembers the factories it has listed. One swamp skips stays
listed while its file is there and no listed factory claims it, so the
page keeps it, shows the YAML problem with the last good graph marked
STALE, and reloads it in place once fixed. A factory whose file is gone is
forgotten, and the page says when the selected factory was removed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
seth merged commit 287baaee43 into main 2026-10-01 18:21:59 +00:00
seth deleted branch cue/2889-gatorwalk-factory-studio 2026-10-01 18:22:00 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
swamp-club/swamp-extensions!421
No description provided.