feat: SCI bootstrap loads completely (422/422) — fix with-meta + select-keys

The last two keystone forms in namespaces.cljc now load, so the entire SCI
source in the harness's load order evaluates with ZERO failures (was 420/2).

Two real bugs fixed to get there:
- with-meta crashed on non-collections: (with-meta a-fn {...}) did (keys fn) ->
  'expected iterable, got function'. SCI marks core fns private this way. Now
  returns functions/scalars unchanged (Jolt can't attach meta to a raw fn).
- select-keys ignored a vector key-list: (each k ks) iterated the pvec's table
  instead of its elements, so (select-keys m [:a]) returned {}. Now realizes ks.

Plus: add clojure.set/join (the only missing clojure.set fn), assert 0 failures
in test-load-sci so it's a real regression guard, drop debug instrumentation.

Jolt now fully loads SCI's reader-independent implementation: every pure-Clojure
module, the entire clojure.core aggregation map, and the clojure.* namespace
wiring. conformance 218/218, features 78/78, jank 120.
This commit is contained in:
Yogthos 2026-06-04 23:35:19 -04:00
parent 4eead1ac0f
commit bf754693b5
3 changed files with 50 additions and 11 deletions

View file

@ -42,8 +42,9 @@
(flush)
(if (try
(do (eval-form ctx @{} form) true)
([err]
([err fib]
(printf " FAIL: %q\n" err)
(when (os/getenv "SCI_TRACE") (debug/stacktrace fib ""))
(array/push failures {:form-number count :error (string err) :form (string form)})
false))
(do
@ -104,3 +105,8 @@
(each f all-failures
(printf "[%s:%d] %s\n" (f :file) (f :form-number) (f :error))
(printf " form: %s\n" (f :form))))
# Regression guard: every form in the loaded SCI modules must evaluate cleanly.
(assert (= 0 total-fail)
(string total-fail " SCI form(s) failed to load (see FAILURES above)"))
(print "\nAll SCI bootstrap forms loaded successfully.")