From fd1dfea9b3492a1d0fb481cdf6451464d1c5c8de Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 22 Apr 2026 20:27:22 +0000 Subject: [PATCH] HS tests: scrape v0.9.90 upstream in full, flip silent stubs to loud SKIPs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - scrape-hs-upstream.py: new scraper walks /tmp/hs-upstream/test/**/*.js and emits body-style records for all 1,496 v0.9.90 tests (up from 831). Widens coverage into 66 previously-missing categories — templates, reactivity, behavior, worker, classRef, make, throw, htmx, tailwind, viewTransition, and more. - build-hs-manifest.py + hyperscript-upstream-manifest.{json,md}: coverage manifest tagging each upstream test with a status (runnable / skip-listed / untranslated / missing) and block reason. - generate-sx-tests.py: emit (error "SKIP (...)") instead of silent (hs-cleanup!) no-op for both skip-listed tests and generator- untranslatable bodies. Stub counter now reports both buckets. - hyperscript-feature-audit-0.9.90.md: gap audit against the 0.9.90 spec; pre-0.9.90.json backs up prior 831-test snapshot. New honest baseline (ocaml runner, test-hyperscript-behavioral): 831 -> 1,496 tests; 645 -> 1,013 passing (67.7% conformance). 483 failures split: 45 skip-list, 151 untranslated, 287 real. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../tests/hyperscript-feature-audit-0.9.90.md | 446 + spec/tests/hyperscript-upstream-manifest.json | 13466 +++++++++++ spec/tests/hyperscript-upstream-manifest.md | 163 + spec/tests/hyperscript-upstream-tests.json | 19638 +++++++++------- ...hyperscript-upstream-tests.pre-0.9.90.json | 8936 +++++++ tests/playwright/build-hs-manifest.py | 549 + tests/playwright/generate-sx-tests.py | 48 +- tests/playwright/scrape-hs-upstream.py | 297 + 8 files changed, 35232 insertions(+), 8311 deletions(-) create mode 100644 spec/tests/hyperscript-feature-audit-0.9.90.md create mode 100644 spec/tests/hyperscript-upstream-manifest.json create mode 100644 spec/tests/hyperscript-upstream-manifest.md create mode 100644 spec/tests/hyperscript-upstream-tests.pre-0.9.90.json create mode 100644 tests/playwright/build-hs-manifest.py create mode 100644 tests/playwright/scrape-hs-upstream.py diff --git a/spec/tests/hyperscript-feature-audit-0.9.90.md b/spec/tests/hyperscript-feature-audit-0.9.90.md new file mode 100644 index 00000000..041c84e8 --- /dev/null +++ b/spec/tests/hyperscript-feature-audit-0.9.90.md @@ -0,0 +1,446 @@ +# _hyperscript 0.9.90 Gap Audit + +**Date:** 2026-04-22 +**Target release:** upstream 0.9.90 (2026-04-13), with awareness of 0.9.91 bugfixes (2026-04-14) +**Supersedes:** `hyperscript-feature-audit.md` (2026-04-09) + +Our implementation lives in `/root/rose-ash/lib/hyperscript/`: +- `tokenizer.sx` (618 lines), `parser.sx` (2414 lines), `compiler.sx` (1739 lines), `runtime.sx` (1609 lines), `integration.sx` (109 lines). + +Tests in `spec/tests/test-hyperscript-*.sx` + extracted fixture `hyperscript-upstream-tests.json` (831 entries). + +--- + +## 1. Version alignment + +### What release is our JSON snapshot from? + +The fixture `spec/tests/hyperscript-upstream-tests.json` and the prior audit were both written on **2026-04-09** (four days before 0.9.90 tagged on 2026-04-13). File timestamps confirm this; there is no earlier git history for the JSON (it first appears in commit `7492ceac`). + +The contents are clearly **0.9.90 (pre-tag) or equivalent**: + +- 63 `on` tests, 44 `bind`, 41 `when`, 23 `live`, 10 `liveTemplate`, 19 `component`, 4 `reactive-properties` — all new-in-0.9.90 reactivity features +- 10 `morph`, 8 `reset`, 13 `empty`, 10 `dialog`, 4 `swap`, 7 `halt`, 5 `askAnswer`, 3 `focus`, 8 `scroll`, 23 `fetch` including `fetch:beforeRequest`/`fetch:error` lifecycle — all 0.9.90 features or overhauls +- Keywords `between`, `ignoring` (case), `precedes`/`follows`, `where`, `sorted`/`mapped`/`split`/`joined by` — 0.9.90 collection expressions +- Total 831 tests vs upstream's "~1332 tests" claim for 0.9.90 — we have the subset that was non-sinon, non-script-tag, non-dialog-API when extracted + +**Conclusion:** the JSON is a valid 0.9.90-era snapshot. No re-extraction is strictly required, but upstream added tests post-tag (changelog mentions 1332 tests at 0.9.90 release) — we may be missing late additions. + +### What 0.9.90 added over 0.9.8 / 0.9.14 + +Full changelog consulted at `github.com/bigskysoftware/_hyperscript/blob/master/CHANGELOG.md`. + +**Breaking changes in 0.9.90:** +- `processNode()` → `process()` +- `as JSON` now parses a string; old stringify behavior → `as JSONString`; `as Values | JSONString` / `as Values | FormEncoded` replace `Values:JSON` / `Values:Form` +- `default` uses **nullish** check (no longer overwrites `0`/`false`) +- `go to url ...` deprecated → `go to /path` or `go to "url"` +- `go to the top of ...` deprecated → `scroll to the top of` +- `async` keyword removed (was confusing) +- `/* */` block comments removed +- `transition width` → `transition *width` (explicit `*` style ref) +- `fetch` throws on non-2xx by default; `do not throw` or `as Response` restores old behavior +- `[@attr]` bracket-style attribute access **deprecated** (still parsed, use `@attr`) + +**New features in 0.9.90:** +- **Reactivity** (`live`, `when ... changes`, `bind`) — dependency tracking + UI updates +- **Templates in core** — `render` command + `