fast-qa: SSE streaming execution to fix Vercel timeout + bug fixes#47
fast-qa: SSE streaming execution to fix Vercel timeout + bug fixes#47causehacker wants to merge 1 commit intotinyfish-io:mainfrom
Conversation
- Add /api/execute-test endpoint with SSE streaming to avoid Vercel timeout issues - Client-side parallelism (3 concurrent) with real-time step progress - Fix gpt-5-nano (reasoning model) returning empty content - switch to gpt-4.1-nano - Fix type error in generate-report route (extractedData parsing) - Fix frontend data key mismatch (testCases vs tests) - Mark old /api/execute-tests as deprecated The original /api/execute-tests blocks until all tests complete, causing 504 Gateway Timeout on Vercel free tier (30s edge limit). The new /api/execute-test (singular) streams Mino SSE events to the client, keeping the connection alive and providing real-time progress updates.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
We were deploying Fast QA on Vercel's free tier and ran into 504 timeouts - Mino automation typically takes 30-90s which exceeds the 30s edge function limit. Rearchitected test execution to stream Mino's SSE events through the edge function to the client, which keeps the connection alive and has the nice side effect of giving users real-time step progress. Also fixed a few bugs we hit along the way (gpt-5-nano returns empty Ran a bunch of tests and all came back healthy, hope this helps! |
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.