fast-qa: SSE streaming execution to fix Vercel timeout + bug fixes #47
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Rearchitects Fast QA's test execution to use SSE streaming, fixing 504 Gateway Timeout errors on Vercel's free tier.
Changes
New:
/api/execute-test(SSE streaming)text/event-streamresponse - keeps connection alive, no timeouttest_start,streaming_url,step_progress,test_complete,test_errorUpdated:
useTestExecutionhookBug fixes
contentfield, breaking AI SDK'sgenerateTextextractedDatawasn't being parsed correctlytestCasesbut frontend expectedtestsDeprecated
/api/execute-tests(plural) marked deprecated - blocks until all tests complete, causing 504s on Vercel free tier (30s edge limit)Problem
The original
/api/execute-testsendpoint runs all tests server-side, consuming Mino's SSE stream internally. Mino browser automation typically takes 30-90s per test, exceeding Vercel's free tier edge timeout (30s).Solution
Move SSE consumption to the client by streaming Mino events through the edge function. Edge functions can stream responses indefinitely as long as data flows, sidestepping the execution timeout.