Solo dev discovers all 155 tests passed while every real AI request silently failed
A solo developer building GigLegal, a contract tool for freelancers on Next.js 15, found that all 155 Playwright end-to-end tests were passing while every real AI request was failing in production. The root cause was a provider resolver that automatically switched to a mock AI service during tests, meaning the test suite never interacted with the actual API. Behind this masking issue lay three stacked bugs: an invalid structured output configuration, a schema with 66 optional fields that exceeded the vendor's undocumented 24-field limit, and a timeout problem on a 20-field policy step. Splitting the large single AI call into smaller, focused requests ultimately resolved the failures, with the developer noting that mocks reflect assumptions rather than real API behavior.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in