Archived
yy_convert enforced its value budget and depth bound in a second pass that ran only after every frame of the document had been collected into a scratch vector. The bound that promises a refused body has not grown memory grew its scratch with the body: a 200k-empty-array swarm counts no scalar at all, and the old code refused it after the whole swarm sat in the frame list. Both bounds are now enforced where a value is DISCOVERED -- every value counted, containers included, which is what the pre-migration parser callback counted and what the tests already pinned -- so a body past either bound ends the walk while the scratch is still budget-sized. What stays proportional to the body is yyjson's own read arena, capped by the byte bound at its open, and oai.cpp's comment now says exactly that. A json_test case carries the swarm.