The unit tests in test/chez/_*.janet now drive bin/joltc (the zero-Janet spine) and judge against baked expected values instead of a live build/jolt run. Ten of them captured the oracle from build/jolt per case; their values are now literals (one env-dependent javastatic case became a predicate so it stays portable). The rest already had literal expecteds with a redundant build/jolt sanity check, now dropped. Retire emit-test/emit-parity/reader-parity: they compared the Chez/Clojure path against a live Janet evaluation, emitter, or reader. That migration check is done, and run-corpus-zero-janet (Chez analyzer vs the JVM corpus) plus certify.clj cover correctness now. Rewrite the README for the current zero-Janet gate. jolt-5oci |
||
|---|---|---|
| .. | ||
| _atomwatch.janet | ||
| _class.janet | ||
| _dotform.janet | ||
| _dynbind.janet | ||
| _insttime.janet | ||
| _io.janet | ||
| _ioreader.janet | ||
| _javastatic.janet | ||
| _ns.janet | ||
| _reader.janet | ||
| _seqpred.janet | ||
| _stdlib.janet | ||
| _str.janet | ||
| _strns.janet | ||
| _type.janet | ||
| _var_meta.janet | ||
| _walk.janet | ||
| bench-chez.ss | ||
| bench-pipeline.janet | ||
| bootstrap-test.janet | ||
| cli-test.janet | ||
| core-prelude-probe.janet | ||
| corpus.edn | ||
| extract-corpus.janet | ||
| fixpoint-test.janet | ||
| nil-names-probe.janet | ||
| README.md | ||
| run-corpus-zero-janet.janet | ||
| spine-test.janet | ||
| values-test.ss | ||
Chez test harness
The correctness gate for jolt on Chez (epic jolt-cf1q). Correctness is judged
against the JVM-sourced conformance spec — no Janet decides pass/fail. The spec
itself lives in test/conformance/ (see its SPEC.md); this directory holds the
Chez runners and unit tests.
The spec corpus
corpus.edn— the contract: ~2920 rows{:suite :label :expected :actual}, with:expectedsourced from reference JVM Clojure. Valid as both EDN and Janet data. Generated bytest/conformance/regen-corpus.clj(the answers) over the case list fromextract-corpus.janet(the:actualstrings, pulled fromtest/spec/*.janetandconformance-test.janet).extract-corpus.janet— re-derives the case list when spec rows change. Writes only whenJOLT_EXTRACT_CORPUS_OUTis set, so a gate run never clobbers the JVM-sourcedcorpus.edn. After re-deriving, re-source the answers withregen-corpus.clj.
The standing gate
run-corpus-zero-janet.janet runs every corpus case through the zero-Janet
spine: read → analyze → IR → emit → eval, all on Chez (the analyzer is
jolt.analyzer cross-compiled to Scheme over host-contract.ss). Each result is
compared by value-equality against the JVM :expected. A known-fail allowlist
covers cases jolt can't match because Chez has no JVM host (Java classes, arrays,
BigDecimal, opaque host-object printers, …); the gate fails only on a NEW
divergence or if the pass count drops below the floor.
JOLT_CHEZ_ZEROJANET_CORPUS=1 janet test/chez/run-corpus-zero-janet.janet
JOLT_CORPUS_LIMIT=200 … # every-Nth stride, fast iteration
Floor: 2678 (JOLT_CHEZ_ZJ_FLOOR overrides). Raise it as host gaps close.
Unit tests
_*.janet drive bin/joltc (the pure-Chez CLI; JOLT_BIN overrides) one
subprocess per case and compare the last stdout line against a baked expected
value. :throws asserts a non-zero exit. Each file targets one area —
_type/_class/_seqpred (taxonomy + predicates), _str/_strns/_reader
(strings + reader), _io/_ioreader/_insttime/_javastatic (host interop),
_dynbind/_var_meta/_ns (vars + namespaces), _atomwatch/_walk/_dotform
/_stdlib (refs, walk, dot-forms, stdlib). Run one with
janet test/chez/_type.janet.
Self-host gates
spine-test.janet— the zero-Janet compile/eval spine end to end.cli-test.janet—bin/joltc -ebehavior.bootstrap-test.janet—host/chez/bootstrap.ssrebuilds the prelude + image from source on Chez and matches the checked-in seed (host/chez/seed/).fixpoint-test.janet— the on-Chez compiler reproduces itself (stage2 == stage3, prelude pstage3 == pstage4).
Bench
bench-pipeline.janet (opt-in via JOLT_CHEZ_BENCH=1) times fib + mandelbrot
through the real pipeline against the spike ceiling. Skipped in the gate.
All Chez runners skip cleanly when chez is not on PATH.