Audited all 43 realize-for-iteration call sites. Result: every? was the one transformer-style leak — it realized the whole coll before iterating, so (every? pos? (range)) hung instead of short-circuiting on the first false (Clojure short-circuits). Now walks lazy input cell-by-cell via realize-ls and stops at the first false; not-every? inherits the fix. Everything else is a legitimate realization boundary (reverse/sort/into/vec/set/ list/str-join/doall/apply/transient/to-array/hash-*/shuffle/rand-nth — must see all elements) or forces only finite/concrete input (drop-while's eager branch, cycle's seed, nth's concrete branch). some is already lazy (overlay). realized? reads the :realized flag without forcing. first/nth/take pull only as far as needed. Regression: deadlined (every?/not-every? pos? (range)) cases — would hang if the leak returned. Gate: conformance 249x3, lazy-infinite 42/42, fixpoint, self-host, specs+unit green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| bench | ||
| clojure-stdlib/clojure | ||
| integration | ||
| spec | ||
| support | ||
| unit | ||