*in* is a Reader, not a map

(map? *in*) was true because *in* was a plain map of read-line-fn/read-fn
closures; the JVM *in* is a java.io.Reader so map? is false. A defrecord
doesn't help (records are maps). Make the reader a reify over a new IReader
protocol — a non-map value — and route read/read-line/read+string/line-seq
through its -read-line/-read-form/-read+string methods instead of keyword
access. with-in-str's __string-reader and the stdin *in* both reify it.
Closes *in*-bound + *in*-is-bound.
This commit is contained in:
Yogthos 2026-06-21 23:45:24 -04:00
parent 8ce00d29fd
commit d1c2811d13
4 changed files with 551 additions and 543 deletions

View file

@ -11,7 +11,7 @@
;; reset between cases so there is no leakage — same isolation a fresh process gives.
;;
;; chez --script host/chez/run-corpus.ss
;; JOLT_CHEZ_ZJ_FLOOR=N override the regression floor (default 2723)
;; JOLT_CHEZ_ZJ_FLOOR=N override the regression floor (default 2725)
;; JOLT_CORPUS_LIMIT=N every-Nth stride (fast iteration; floor drops to 0)
;; JOLT_DUMP_CRASH_LABELS=1 list crash + allowlisted labels
(import (chezscheme))
@ -91,7 +91,6 @@
"^Type tag on var"
"close on throw" "macroexpand-1"
"bean is the map" "proxy resolves nil"
"*in* is bound" "*in* bound"
"bigdec" "bigdec int M" "bigdec suffix M"
"transient vector" "transient map"
"atom override fires nested"
@ -192,7 +191,7 @@
;; Regression floor: fail on any NEW divergence or if pass drops below the floor.
(define base-floor (let ((s (getenv "JOLT_CHEZ_ZJ_FLOOR")))
(if s (string->number s) 2723)))
(if s (string->number s) 2725)))
(define floor (if limit 0 base-floor))
(when (or (> (length diverged) 0) (< pass floor))
(printf "REGRESSION: pass ~a < floor ~a or ~a new divergence(s)\n"