Committed replacement for the review's ephemeral 130-probe corpus: spec/tests/differential-probes.txt (49 probes: F-1 int/float display, K18 overflow, F-3 apply + dict order, S-4 float printing, strings, collections, special forms, error normalization) evaluated on the native server (epoch protocol printer) and the SHIPPED WASM kernel (eval_wasm_probes.js via guest sx-serialize), diffed by scripts/test-differential.sh with a KNOWN_DIVERGENT heal-detecting ledger. Result: 46/49 agree. All 3 divergences share one root cause, verified live: bare sx_server's `apply` does not spread its argument list — (apply + (list 1 2 3)) errors "Expected number, got list", (apply str l) returns the serialized list; the WASM kernel spreads correctly and the test runner masks the bug with its own apply binding (F-7 class). Finding refinement: F-1's float-display divergence (0.3 vs 0.30000000000000004) is a K.eval JS-boundary artifact — guest-serialized output agrees across hosts; the battery therefore compares guest serialization. This completes the W14 checklist: 7 pin suites, 6 gate scripts/runners, 2 harness capabilities, C9 label cleanup, adapter-dom render coverage. Test-only: no semantics edits, no push. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
66 lines
1.4 KiB
Plaintext
66 lines
1.4 KiB
Plaintext
# W14/F8 differential probe corpus — one expression per line.
|
|
# Same expression evaluated on the native server (epoch protocol) and the
|
|
# shipped WASM kernel (K.eval); scripts/test-differential.sh diffs results.
|
|
# Classes drawn from review findings F-1 (integer arithmetic), F-3 (apply,
|
|
# dict key order), F-8 itemization, S-4 (float printing), K18/K53.
|
|
# integers & display (F-1)
|
|
(+ 1 2)
|
|
(- 10 3)
|
|
(* 6 7)
|
|
(/ 4 2)
|
|
(/ 1 2)
|
|
(/ 10 4)
|
|
(quotient 13 4)
|
|
(mod 10 3)
|
|
# float printing (S-4)
|
|
(+ 0.1 0.2)
|
|
(* 3 0.1)
|
|
(/ 1 3)
|
|
(str 0.3)
|
|
(str 1.5)
|
|
(str 2.0)
|
|
# overflow / expt (K18)
|
|
(expt 2 10)
|
|
(expt 2 62)
|
|
(expt 2 100)
|
|
(+ 9223372036854775807 1)
|
|
# apply (F-3)
|
|
(apply + (list 1 2 3))
|
|
(apply max (list 1 5 2))
|
|
(apply str (list "a" "b"))
|
|
# dict key order (F-3)
|
|
(keys {:b 2 :a 1 :c 3})
|
|
(str {:b 2 :a 1})
|
|
(vals {:b 2 :a 1})
|
|
# strings
|
|
(split "a,b,c" ",")
|
|
(split "a--b" "--")
|
|
(len "héllo")
|
|
(upcase "abc")
|
|
(str (char-code "A"))
|
|
(substring "hello" 1 3)
|
|
(join "-" (list "x" "y"))
|
|
# equality & comparison
|
|
(= 1 1.0)
|
|
(= (list 1 2) (list 1 2))
|
|
(equal? (list 1) (list 1))
|
|
(< 1 2 3)
|
|
# collections
|
|
(sort (list 3 1 2))
|
|
(range 3)
|
|
(reverse (list 1 2 3))
|
|
(nth (list 10 20 30) 1)
|
|
(contains? {:a 1} :a)
|
|
(get {:a 1} :zz 99)
|
|
# quasiquote / quote
|
|
(quasiquote (1 (unquote (+ 1 1)) 3))
|
|
(str (quote sym))
|
|
# conditionals & special forms
|
|
(if true 1 2)
|
|
(and 1 2 3)
|
|
(or nil false 7)
|
|
(do ((fn (x) x) 5) 99)
|
|
# error normalization (both sides should error)
|
|
(undefined-symbol-xyz)
|
|
(/ 1 0)
|