diff --git a/plans/agent-briefings/sx-gate-loop.md b/plans/agent-briefings/sx-gate-loop.md index a4b2adb8..06efb551 100644 --- a/plans/agent-briefings/sx-gate-loop.md +++ b/plans/agent-briefings/sx-gate-loop.md @@ -98,13 +98,28 @@ Pin each confirmed-and-fixed finding with a minimal repro. Add suites to (`scripts/test-suite-baseline.sh` + `spec/tests/known-failures.txt`, 273 pinned: 271 hs-* + 2 empty-suite-label entries → C9 evidence). New failure OR vanished failure = red; hs loops' scoreboards untouched -- [ ] C9 — empty suite label +- [x] C9 — empty suite labels ELIMINATED: 6 files had suite-less top-level + deftests (chars 43, import-bind 14, ports 12, let-match 8, math + nested-deftests, 4 hs strays) — wrapped/restructured into defsuites; + baseline identities updated in the same commit ### F. Differential battery - [ ] F8 — cross-host differential battery (same source, all hosts agree) ## Progress log (newest first) +- 2026-07-04 — **C9 empty-suite labels (item E.3) — section E COMPLETE**. + The sweep found the defect much wider than the finding: SIX files carried + suite-less top-level deftests (test-chars 43, test-import-bind 14, + test-ports 12, test-let-match 8, test-math as deftest-nested-in-deftest, + test-hyperscript-conformance 4 strays between suites). Fixes: file-level + defsuite wraps (validated via sx_validate after mechanical wrap), + test-math restructured deftest→defsuite (labels now "math > sin"), + hs strays wrapped in section-comment-named suites (hs-compat- + blockLiteral/cookies/some/where). The two baseline-visible identities + renamed in known-failures.txt in the SAME commit. Full-gate validated + GREEN (5798p/273f — −2 passes are the wrapper deftests that no longer + self-report; fail set byte-identical). Test-only. - 2026-07-04 — **F10 baseline gate (item E.2)**. Deliberately NOT a skip-list: skip-listing the hs red band in the runner would rewrite the hs loops' scoreboards mid-flight. Instead diff --git a/spec/tests/known-failures.txt b/spec/tests/known-failures.txt index edcbfcf0..59bcc774 100644 --- a/spec/tests/known-failures.txt +++ b/spec/tests/known-failures.txt @@ -1,7 +1,7 @@ - > can-map-an-array hs-compat-asExpression > converts-a-complete-form-into-values hs-compat-asExpression > converts-strings-into-fragments hs-compat-asExpression > converts-value-as-json +hs-compat-blockLiteral > can-map-an-array hs-compat-in > basic-no-query-return-values hs-compat-typecheck > can-do-basic-non-string-typecheck-failure hs-compat-typecheck > can-do-basic-string-non-null-typecheck @@ -270,4 +270,4 @@ hs-upstream-wait > can wait on event hs-upstream-wait > can wait on event on another element hs-upstream-wait > waiting on an event sets 'it' to the event hs-upstream-when > attribute observers are persistent (not recreated on re-run) - > string->number +math > string->number diff --git a/spec/tests/test-chars.sx b/spec/tests/test-chars.sx index b94b9aa7..81ce58eb 100644 --- a/spec/tests/test-chars.sx +++ b/spec/tests/test-chars.sx @@ -1,3 +1,5 @@ +(defsuite "chars" + ;; Tests for character type (Phase 13) ;; Uses (make-char n) and (char-code "x") instead of #\x literals ;; (char literal parser syntax tested via sx-parse call) @@ -183,3 +185,5 @@ (deftest "char-ci>=? equal case-insensitive" (assert= true (char-ci>=? (make-char 97) (make-char 65)))) + +) diff --git a/spec/tests/test-hyperscript-conformance.sx b/spec/tests/test-hyperscript-conformance.sx index 015905e7..7e2350eb 100644 --- a/spec/tests/test-hyperscript-conformance.sx +++ b/spec/tests/test-hyperscript-conformance.sx @@ -180,11 +180,12 @@ (deftest "converts-foo-bar" (for-each run-hs-fixture (list {:src "1 as String" :expected "1"})))) ;; ── blockLiteral (4 fixtures) ────────────────────────────── +(defsuite "hs-compat-blockLiteral" (deftest "can-map-an-array" (let ((r (eval-hs "['a', 'ab', 'abc'].map(\\ s -> s.length)"))) - (assert= r (list 1 2 3) "map with block"))) + (assert= r (list 1 2 3) "map with block")))) ;; ── boolean (2 fixtures) ────────────────────────────── (defsuite @@ -325,9 +326,10 @@ (for-each run-hs-fixture (list {:src "undefined does not exist" :expected true} {:src "null does not exist" :expected true})))) ;; ── cookies (9 fixtures) ────────────────────────────── +(defsuite "hs-compat-cookies" (deftest "update-cookie-values-work" - (for-each run-hs-fixture (list {:src "cookies.foo" :locals {:cookies {:foo "doh"}} :expected "doh"}))) + (for-each run-hs-fixture (list {:src "cookies.foo" :locals {:cookies {:foo "doh"}} :expected "doh"})))) ;; ── in (4 fixtures) ────────────────────────────── (defsuite @@ -464,9 +466,10 @@ (assert= (len r) 0 "empty query result")))) ;; ── some (6 fixtures) ────────────────────────────── +(defsuite "hs-compat-some" (deftest "some-returns-true-for-nonempty-selector" - (for-each run-hs-fixture (list {:src "some [1]" :expected true}))) + (for-each run-hs-fixture (list {:src "some [1]" :expected true})))) ;; ── stringPostfix (10 fixtures) ────────────────────────────── (defsuite @@ -695,13 +698,14 @@ (deftest "null-not-exist" (for-each run-hs-fixture (list {:src "null does not exist" :expected true}))) (deftest "undef-not-exist" (for-each run-hs-fixture (list {:src "undefined does not exist" :locals {:undefined nil} :expected true})))) +(defsuite "hs-compat-where" (deftest "where-with-property" (let ((items (list {:age 15 :name "Alice"} {:age 30 :name "Bob"}))) (let ((r (eval-hs "items where its age > 20" {:locals {:items items}}))) - (assert= (len r) 1 "one match")))) + (assert= (len r) 1 "one match"))))) (defsuite "hs-0990-collection-ops" diff --git a/spec/tests/test-import-bind.sx b/spec/tests/test-import-bind.sx index f65b74c4..19eaaba0 100644 --- a/spec/tests/test-import-bind.sx +++ b/spec/tests/test-import-bind.sx @@ -1,3 +1,5 @@ +(defsuite "import-bind" + ;; Tests for define-library, import, and the import suspension mechanism ;; ============================================================ @@ -190,3 +192,5 @@ (assert= (cek-try (fn () inner-secret) (fn (e) "not-found")) "not-found")) + +) diff --git a/spec/tests/test-let-match.sx b/spec/tests/test-let-match.sx index 5919f80c..27c2f846 100644 --- a/spec/tests/test-let-match.sx +++ b/spec/tests/test-let-match.sx @@ -1,3 +1,5 @@ +(defsuite "let-match" + ;; Tests for let-match — CEK special form and bytecode compiler desugaring ;; let-match destructures a dict: (let-match {:key var} expr body...) @@ -45,3 +47,5 @@ (let-match {:a a :b b} (dict :a (+ 1 2) :b (* 3 4)) (assert= a 3) (assert= b 12))) + +) diff --git a/spec/tests/test-math.sx b/spec/tests/test-math.sx index 415d38b4..70d5377b 100644 --- a/spec/tests/test-math.sx +++ b/spec/tests/test-math.sx @@ -1,7 +1,10 @@ +;; Math completeness tests. C9 note: this file used NESTED deftests with no +;; defsuite, so every test reported with an empty suite label (" > sin"). +;; Restructured to defsuite/deftest — labels are now "math > sin" etc. -(deftest - "math completeness" - (deftest +(defsuite + "math" + (defsuite "trigonometry" (deftest "sin" @@ -124,7 +127,10 @@ true (< (abs (- (cos (acos 0.5)) 0.5)) 0.0001) "cos(acos(x)) = x") - (assert= true (< (abs (- (exp (log 2)) 2)) 0.0001) "exp(log(x)) = x") + (assert= + true + (< (abs (- (exp (log 2)) 2)) 0.0001) + "exp(log(x)) = x") (assert= (* 12 18) (* (gcd 12 18) (lcm 12 18)) diff --git a/spec/tests/test-ports.sx b/spec/tests/test-ports.sx index a4426d45..aff0d2ce 100644 --- a/spec/tests/test-ports.sx +++ b/spec/tests/test-ports.sx @@ -1,3 +1,5 @@ +(defsuite "ports" + ;; Phase 14 — String ports + eof-object (deftest @@ -230,3 +232,5 @@ (c3 (read-char in)) (when (not (eof-object? c3)) (write-char c3 out))) (assert= "abc" (get-output-string out) "roundtrip via ports"))))) + +)