diff --git a/plans/hs-conformance-to-100.md b/plans/hs-conformance-to-100.md index 668b0e4e..3424b46d 100644 --- a/plans/hs-conformance-to-100.md +++ b/plans/hs-conformance-to-100.md @@ -38,7 +38,7 @@ Each cluster below is one commit. Order is rough — a loop agent may skip ahead 2. **[done (+1)] element → HTML via outerHTML** — `asExpression / converts an element into HTML` (1 test) + unlocks response fetches. Mock DOM `El` class in `tests/hs-run-filtered.js` has no `outerHTML` getter. Add a getter computed from `tagName` + `attributes` + `children` (recurse). Expected: +1 direct, + knock-on in fetch. -3. **[in-progress] Values dict insertion order** — `asExpression / Values | FormEncoded` + `| JSONString` (2 tests) — form fields come out `lastName, phone, firstName, areaCode`. Root: `hs-values-absorb` in `runtime.sx` uses `dict-set!` but keys iterate in non-insertion order. Investigate `hs-gather-form-nodes` walk — the recursive `kids` traversal silently fails when `children` is a JS Array (not sx-list), so nested inputs arrive via a different path. Fix: either coerce children to sx-list at the gather boundary OR rewrite gather to explicitly use sx-level iteration helpers. Expected: +2. +3. **[done (+2)] Values dict insertion order** — `asExpression / Values | FormEncoded` + `| JSONString` (2 tests) — form fields come out `lastName, phone, firstName, areaCode`. Root: `hs-values-absorb` in `runtime.sx` uses `dict-set!` but keys iterate in non-insertion order. Investigate `hs-gather-form-nodes` walk — the recursive `kids` traversal silently fails when `children` is a JS Array (not sx-list), so nested inputs arrive via a different path. Fix: either coerce children to sx-list at the gather boundary OR rewrite gather to explicitly use sx-level iteration helpers. Expected: +2. 4. **[pending] `not` precedence over `or`** — `expressions/not` 3 tests (`not has higher precedence than or`, `not with numeric truthy/falsy`, `not with string truthy/falsy`). Check parser precedence — `not` should bind tighter than `or`. Fix in `parser.sx` expression-level precedence. Expected: +3. @@ -158,6 +158,9 @@ Many tests are `SKIP (untranslated)` because `tests/playwright/generate-sx-tests (Reverse chronological — newest at top.) +### 2026-04-23 — cluster 3 Values dict insertion order +- **e59c0b8e** — `HS: Values dict insertion order (+2 tests)`. Root cause was the OCaml kernel's dict implementation iterating keys in scrambled (non-insertion) order. Added `_order` hidden list tracked by `hs-values-absorb`, and taught `hs-coerce` FormEncoded/JSONString branches to iterate via `_order` when present (filtering the `_order` marker out). Suite hs-upstream-expressions/asExpression: 28/42 → 30/42. Smoke 0-195: 162/195 unchanged. + ### 2026-04-23 — cluster 2 element→HTML via outerHTML - **e195b5bd** — `HS: element → HTML via outerHTML (+1 test)`. Added an `outerHTML` getter on the mock `El` class in `tests/hs-run-filtered.js`. Merges `.id`/`.className` (host-set! targets) with `.attributes`, falls back to `innerText`/`textContent`. Suite hs-upstream-expressions/asExpression: 27/42 → 28/42. Smoke 0-195: 162/195 unchanged.