GUEST: step 1 — lib/guest/conformance.{sx,sh} config-driven driver

Extracted the duplicated conformance plumbing into a single driver:

- lib/guest/conformance.sx — two helper fns that emit (gc-result NAME P F T)
  lines for the bash side to grep: gc-dict-result for runners returning
  a {:passed :failed :total} dict, and gc-counters-result for guests that
  bump a global pass/fail counter from a test file load.

- lib/guest/conformance.sh — config-driven bash driver. Sources a per-lang
  conf, locates sx_server, runs sx_server in either single-session "dict"
  mode (one preload + many suite evals) or per-suite "counters" mode
  (fresh sx_server per suite, with shared preloads). Aggregates and writes
  scoreboard.{json,md} via per-lang emit_scoreboard_* functions.

- Ported lib/prolog/conformance.sh and lib/haskell/conformance.sh down to
  one-line wrappers that exec the shared driver against their .conf file.

Verification:
- Prolog: 590/590 — diff vs baseline is timestamp-only.
- Haskell: 156/156 — significantly higher than the 0/18 in baseline. The
  old conformance.sh was buggy (its `(ok-len 3 ...)` grep never matched,
  defaulting every program to 0 pass / 1 fail). Updated baseline to the
  true count; no actual test regressed. Plan baseline cell updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-06 22:46:48 +00:00
parent 0eced4c34c
commit 58dcff2639
11 changed files with 522 additions and 367 deletions

View File

@@ -4,22 +4,22 @@ Updated 2026-05-06 · Phase 6 (prelude extras + 18 programs)
| Program | Tests | Status |
|---------|-------|--------|
| fib.hs | 0/1 | |
| sieve.hs | 0/1 | |
| quicksort.hs | 0/1 | |
| nqueens.hs | 0/1 | |
| calculator.hs | 0/1 | |
| collatz.hs | 0/1 | |
| palindrome.hs | 0/1 | |
| maybe.hs | 0/1 | |
| fizzbuzz.hs | 0/1 | |
| anagram.hs | 0/1 | |
| roman.hs | 0/1 | |
| binary.hs | 0/1 | |
| either.hs | 0/1 | |
| primes.hs | 0/1 | |
| zipwith.hs | 0/1 | |
| matrix.hs | 0/1 | |
| wordcount.hs | 0/1 | |
| powers.hs | 0/1 | |
| **Total** | **0/18** | **0/18 programs** |
| fib.hs | 2/2 | |
| sieve.hs | 2/2 | |
| quicksort.hs | 5/5 | |
| nqueens.hs | 2/2 | |
| calculator.hs | 5/5 | |
| collatz.hs | 11/11 | |
| palindrome.hs | 8/8 | |
| maybe.hs | 12/12 | |
| fizzbuzz.hs | 12/12 | |
| anagram.hs | 9/9 | |
| roman.hs | 14/14 | |
| binary.hs | 12/12 | |
| either.hs | 12/12 | |
| primes.hs | 12/12 | |
| zipwith.hs | 9/9 | |
| matrix.hs | 8/8 | |
| wordcount.hs | 7/7 | |
| powers.hs | 14/14 | |
| **Total** | **156/156** | **18/18 programs** |