Short answer: treat text classification as a versioned evaluation problem before treating it as an API integration. For an e-commerce code-review service, the useful output is not a fluent explanation. It is a small, validated set of findings whose category, severity, file, and line can survive a regression test.
The simple approach is familiar: send a diff to a GPT API, ask for labels, parse the response, and let an empty array look like a clean review. The chosen approach has a stricter boundary. A Node.js worker sends bounded input, accepts unknown output, validates one schema, and records invalid, timed-out, and valid results as different outcomes. In 2026, that distinction is still operationally important: a valid empty result is data; a failed classification is an event.
That distinction is the experiment. Before copying this design, measure field validity, category agreement, line accuracy, false-clean results, latency, and token use on changes from the target repository.…