Relationships
#3964 stagecraft studio ticket columns: round-5 review lows from #3828 (source watch cost, relationText lookup, cross-instance claim)
Opened by skunk-ape · 10/26/2026
Repository: swamp-extensions, @swamp/stagecraft studio. Follow-up to swamp-club#3828 (the Board's Not started and Claimed ticket columns). verify-reviews on 35898df74 passed, with these three low findings left for later:
The local source watch re-lists every definition on each poll tick (studio_server.ts, tickets()). The askRead "source" watch builds a fresh listing and works out ticketSource on every 3-second tick. So a local serve with a Board open calls findAllGlobal once per open factory per tick. It is correct, but a repo with many definitions pays that I/O for as long as a page is open. Fix: share one listing per tick across the watched factories, or use a cheaper signature, such as the factory's and the tracker's definition file paths and mtimes. A remote serve is unaffected: it reads the model copies its poll already refreshed.
relationText indexes a plain-object map with an untrusted type (studio/src/board.ts). RELATION_TEXT[r.type] is an ordinary object lookup. A relation type such as "constructor" resolves to an Object.prototype function, and the destructuring then throws. The record schema makes this unlikely, but Object.hasOwn or a Map would make it robust. The code moved from work_item_view and now also runs on Board cards.
A claim whose key was started under another tracker instance shows as Claimed (studio_tickets.ts, readTickets). instanceRuns keeps only the runs bound to the factory's tracker instance. So a work item started with the reserved key but bound to a different instance is not found, and the ticket stays under Claimed, "start not run". The reviewer calls this a defensible reading. Decide whether to keep it, look the key up across all runs, or note it in DESIGN.md.
Open
No activity in this phase yet.
system commented 10/26/2026, 3:06:59 PM
Classified automatically when this issue was filed.
- Type: Bug
- Source: Extensions
If you feel this classification is incorrect, add a ripple to tell us so.
Sign in to post a ripple.