jolt/test/chez
Yogthos 5c1fdfc336 Pure-Chez test gates (no Janet)
Add a Janet-free gate so correctness can be judged with only Chez + Clojure:
- host/chez/run-corpus.ss: corpus.edn vs JVM expecteds, lifting the per-case ns
  isolation from the old Janet driver; reads corpus.edn via the jolt reader.
- host/chez/run-unit.ss + test/chez/unit.edn: the host-specific unit cases,
  evaluated in-process and compared to baked expecteds.
- host/chez/selfcheck.sh: self-host fixpoint (bootstrap.ss rebuild == checked-in seed).
- host/chez/smoke.sh: real bin/joltc CLI smoke.
- host/chez/remint.sh: re-mint the seed to a byte-fixpoint after a source change.
- Makefile: 'make test' runs the lot; 'make remint' rebuilds the seed.

Numbers match the Janet gate: corpus 2679/2757 0 new div, unit 450/450, certify
0 new/0 stale.

jolt-cf1q.6
2026-06-21 11:22:32 -04:00
..
_atomwatch.janet Move the Chez test oracle off Janet 2026-06-21 09:48:49 -04:00
_class.janet Move the Chez test oracle off Janet 2026-06-21 09:48:49 -04:00
_dotform.janet Move the Chez test oracle off Janet 2026-06-21 09:48:49 -04:00
_dynbind.janet Move the Chez test oracle off Janet 2026-06-21 09:48:49 -04:00
_insttime.janet Move the Chez test oracle off Janet 2026-06-21 09:48:49 -04:00
_io.janet Move the Chez test oracle off Janet 2026-06-21 09:48:49 -04:00
_ioreader.janet Move the Chez test oracle off Janet 2026-06-21 09:48:49 -04:00
_javastatic.janet Move the Chez test oracle off Janet 2026-06-21 09:48:49 -04:00
_ns.janet Move the Chez test oracle off Janet 2026-06-21 09:48:49 -04:00
_reader.janet Move the Chez test oracle off Janet 2026-06-21 09:48:49 -04:00
_seqpred.janet Move the Chez test oracle off Janet 2026-06-21 09:48:49 -04:00
_stdlib.janet Move the Chez test oracle off Janet 2026-06-21 09:48:49 -04:00
_str.janet Move the Chez test oracle off Janet 2026-06-21 09:48:49 -04:00
_strns.janet Move the Chez test oracle off Janet 2026-06-21 09:48:49 -04:00
_type.janet Move the Chez test oracle off Janet 2026-06-21 09:48:49 -04:00
_var_meta.janet Move the Chez test oracle off Janet 2026-06-21 09:48:49 -04:00
_walk.janet Move the Chez test oracle off Janet 2026-06-21 09:48:49 -04:00
bench-chez.ss Chez Phase 4: perf probe (test/chez/bench-chez.ss) 2026-06-20 14:30:36 -04:00
bench-pipeline.janet Chez Phase 1 close-out: truthy? elision + end-to-end compute bench (jolt-nkcb) 2026-06-18 09:05:54 -04:00
bootstrap-test.janet Chez Phase 3 inc9a: self-contained Chez bootstrap (no Janet in the loop) 2026-06-20 06:46:05 -04:00
cli-test.janet Chez concurrency pt.3: async agents (per-agent serialized dispatch) 2026-06-20 14:22:37 -04:00
core-prelude-probe.janet Chez Phase 1 (increment 3i): regex via vendored irregex 2026-06-17 19:44:18 -04:00
corpus.edn Source the conformance corpus from JVM Clojure; retire the prelude gate 2026-06-21 01:45:04 -04:00
extract-corpus.janet Source the conformance corpus from JVM Clojure; retire the prelude gate 2026-06-21 01:45:04 -04:00
fixpoint-test.janet Chez Phase 3 inc8: prelude fixpoint + fully-Chez-emitted system 2026-06-20 05:21:23 -04:00
nil-names-probe.janet Chez Phase 2 (inc F): jolt.host ref primitives + sorted collections 2026-06-18 13:14:13 -04:00
README.md Move the Chez test oracle off Janet 2026-06-21 09:48:49 -04:00
run-corpus-zero-janet.janet Source the conformance corpus from JVM Clojure; retire the prelude gate 2026-06-21 01:45:04 -04:00
spine-test.janet Chez Phase 3 inc6b: runtime macros on the zero-Janet spine 2026-06-19 23:21:13 -04:00
unit.edn Pure-Chez test gates (no Janet) 2026-06-21 11:22:32 -04:00
values-test.ss Chez Phase 0c + 0a hardening: collections decision + value-model fixes 2026-06-17 13:10:19 -04:00

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 :expected sourced from reference JVM Clojure. Valid as both EDN and Janet data. Generated by test/conformance/regen-corpus.clj (the answers) over the case list from extract-corpus.janet (the :actual strings, pulled from test/spec/*.janet and conformance-test.janet).
  • extract-corpus.janet — re-derives the case list when spec rows change. Writes only when JOLT_EXTRACT_CORPUS_OUT is set, so a gate run never clobbers the JVM-sourced corpus.edn. After re-deriving, re-source the answers with regen-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.janetbin/joltc -e behavior.
  • bootstrap-test.janethost/chez/bootstrap.ss rebuilds 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.