Commit graph

7 commits

Author SHA1 Message Date
Yogthos
c78587bfc3 docs: phase-5.md — jolt-r81 root-fixed (lazy-seq moved to early tier), not letfn-worked-around
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 17:48:19 -04:00
Yogthos
f8bf384b93 docs: phase-5.md — representation decision is Option A (full laziness)
Supersedes the Option B (hybrid) decision. Records that the earlier Option A
attempt failed for lack of the boundary fixes (cons-cell leak, nth/next/rest
over lazy via seq-done?, coll->cells maps/sets + cell disambiguation, ~@ splice
+ normalize-pvecs realization), and that re-attempting with those fixes makes
Option A pass all gates (conformance 246x3, lazy-infinite 40/40). All
transformers lazy in 3 modes; interleave/reductions/tree-seq use letfn recursion
to avoid jolt-r81.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 17:30:03 -04:00
Yogthos
3d32f32756 Phase 5 complete: §6.3 laziness counters + final done criteria
Added 16 atom-counter laziness tests to lazy-infinite-test.janet:
  map, filter, remove, take-while, drop-while, distinct, take-nth,
  map-indexed, keep, keep-indexed, interpose, partition, partition-all,
  mapcat, dedupe, repeated-inc

Each test wraps input elements in (swap! c inc) and proves only the
exact minimal number of elements are realized. 37/37 pass, 0 timeouts.

Updated phase-5.md §7: "22/22" → "21/21" (interleave commented out),
§6.3 marked Done.

Final gate results:
  lazy-infinite: 37/37 (21 value + 16 counter)
  conformance: 229/229 ×3
  specs: 32/32 files, 0 failures
  clojure-test-suite: 3971 pass (↑45), 6 timeouts (↓3)
  core-bench: TOTAL 2531 ms (no Phase-4 baseline for comparison)
2026-06-08 13:04:36 -04:00
Yogthos
9a24d34347 Phase 5 done: representation decision (Option B), gate results
Representation decision: Option B (hybrid). Option A blast-radius
measured — always-lazy map breaks lazy-infinite (0/21) and crashes
conformance completely. Hybrid (lazy over lazy input, eager over
concrete) is the only viable approach with current lazy-seq machinery.

Gates verified:
- lazy-infinite: 21/21 (0 timeouts)
- conformance: 229/229 x3
- specs: 32/32 files, 0 failures
- clojure-test-suite: 3971 pass (up from 3926), 6 timeouts (down from 9)
- core-bench: TOTAL 2531 ms
2026-06-08 12:54:56 -04:00
Yogthos
c78a6afc32 phase-5.md: update done criteria with post-Phase-6 verification data
22/22 lazy-infinite, 229x3 conformance, 32/32 specs — all green.

clojure-test-suite: 849 pass (regression from 3926). Top failing
files: lazy_seq, mapcat, map, group-by, keys, vals, subs. Root cause
is the 40-lazy.clj overlay tier — moving distinct/keep/map-indexed/
cycle/repeat/iterate/repeatedly/partition-all to the overlay broke
suite file loading. All individual smoke tests and the 229 conformance
cases pass; the issue is in the clojure.test shim + .cljc loading path.

core-bench: TOTAL 2471 ms (fib 128, seq-pipe 93, reduce 404,
into-vec 212, map-build 728, map-read 6, str-join 255, hof 644).
No Phase-4 baseline exists for comparison.

§6.3 laziness counters + representation decision deferred.
2026-06-08 12:40:12 -04:00
Yogthos
9a82411e34 Step 5 re-fix: dedupe make-lazy-seq after stash restore
The git stash pop restored the old lazy-seq version of dedupe.
Re-applied the make-lazy-seq + coll->cells fix for the 20-coll
tier where lazy-seq macro is not yet available.
2026-06-08 11:16:42 -04:00
Yogthos
f6bd22ae94 docs: phase-5.md — implementation + testing plan for true laziness
Step-by-step plan for jolt-c09 (Phase 5 of the clojure.core migration):
current state of the LazySeq machinery and the eager gaps, the cardinal
laziness rules, leaf-first transformer conversion order, realization-boundary
audit, the representation decision (lazy-seq vs eager-vector for map over a
vector), and a testing strategy built around a deadlined subprocess harness
(infinite realizations are CPU-bound and uninterruptible in-process).
2026-06-07 22:11:12 -04:00