Skip to main content
← Back to list
01Issue
BugOpenExtensionsPublic
AssigneesNone

Relationships

#3229 stagecraft: studio state_test 'after its event stream reconnects' is timing-flaky under load

Opened by skunk-ape · 10/10/2026

What happened

In verify-build run 31e08ac6-cb1e-404f-8db2-245e9628ed37 (commit 39f445d42, branch cue/3190-stagecraft-let-method), stagecraft/studio/src/state_test.ts:382 failed at its last assertion (line 433): after the reconnect, an open with no error before it was expected to read nothing, but the factory definition (/api/factories/build-swamp-extension) was read again.

The same test passed in the previous verify-build of the branch, in the full local suite, and 20 of 20 times run alone. The change on the branch does not touch the studio's state code.

Likely cause

settled() waits until no request arrives for 100 ms. A reload reads the list, then the definition; under load (verify-build runs the stagecraft integration suite in the same step) the second read can arrive after the 100 ms quiet window. It then lands after asked.length = 0 and is counted against the next expectation.

Expected

The test waits for the reload it triggered to finish (or for both reads), not for a fixed quiet period, so it passes under load.

02Bog Flow
◉OPEN○TRIAGED○IN PROGRESS○SHIPPED

Open

10/10/2026, 6:09:52 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.