TanStack Oracles is an early-stage framework for turning intended software behavior into checks that coding agents can run against real implementations. Its premise is that AI makes producing code cheaper and faster, shifting the engineering bottleneck toward verifying that changes meet requirements. Developers define a “law” - a plain-language behavioral rule - then connect it to generated action sequences, an independent model of expected results, a driver for the production code, and a comparison check. Oracles combines property-based and model-based testing, fuzzing, and mutation testing; it can also shrink a failing sequence into a concise reproduction. The author reports testing it in more than 100 repositories, where it found bugs in every one.
Examples show how the method works and why the checks need scrutiny. A rule that a scrolling header’s wrapper must track its changing height exposed a layout bug. For a live task query, a simple model recomputes the ten highest-priority open tasks after changes, then compares its result with TanStack DB’s incremental query; this can expose errors across sequences that hand-written examples would miss. The model must be independent of production logic, and the intended law - not either implementation - defines correct behavior. A flaw in an oracle’s subscriber checker showed that verification itself can be wrong: it accepted updates to missing rows. Enforcing valid insert and update rules caused 26 of 378 existing histories to fail, revealing a production bug that the earlier checker had overlooked.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.