diff --git a/plans/hs-conformance-to-100.md b/plans/hs-conformance-to-100.md index 7d440c0d..3fac8a7d 100644 --- a/plans/hs-conformance-to-100.md +++ b/plans/hs-conformance-to-100.md @@ -40,7 +40,7 @@ Each cluster below is one commit. Order is rough — a loop agent may skip ahead 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. **[in-progress] `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. +4. **[done (+3)] `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. 5. **[pending] `some` selector for nonempty match** — `expressions/some / some returns true for nonempty selector` (1 test). `some .class` probably returns the list, not a boolean. Runtime fix. Expected: +1. @@ -158,6 +158,9 @@ Many tests are `SKIP (untranslated)` because `tests/playwright/generate-sx-tests (Reverse chronological — newest at top.) +### 2026-04-23 — cluster 4 not precedence over or +- **4fe0b649** — `HS: not precedence over or + truthy/falsy coercion (+3 tests)`. `parse-atom`'s `not` branch emitted `(not (parse-expr))`, which let or/and capture the whole RHS, and also used SX's `not` which treats only nil/false as falsy. Fixed to emit `(hs-falsy? (parse-atom))` — tight binding + hyperscript truthiness (0, "", nil, false, []). Suite hs-upstream-expressions/not: 6/9 → 9/9. Smoke 0-195: 162/195 unchanged. + ### 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.