Relationships
#4428 Cloudflare codegen: a self-referencing request body overflows the stack in normalizeProperty
Opened by zack · 11/5/2026
codegen/cloudflare/pipeline.ts normalizeProperty recurses into object properties and array items with no cycle guard. The fetched spec is dereferenced (226 circular refs), so a request body whose properties refer back to an ancestor makes generation fail with RangeError: Maximum call stack size exceeded. Reproduced on main with a minimal spec: a POST body {type: object, properties: {name, child: }} passed to parseResources. Today's Cloudflare spec does not hit this (full generation succeeds), so it is latent. Expected: normalizeProperty stops at a node already on the current path (emit z.unknown() or a z.lazy reference) instead of overflowing. Found while verifying swamp-club#4419, whose allOf merge (conjoinProperty) is now guarded but cannot make such a body generate end to end until this is fixed.
Open
No activity in this phase yet.
Sign in to post a ripple.