test: add Zod normal and jitless corpus - #320
Conversation
…pat-library-zod-normal-and-jitless-validation-corpus # Conflicts: # CLAUDE.md # scripts/README.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9dc2460762
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ifiers
`?.await` (and other reserved-word IdentifierName properties, newly parseable
on this branch) stored the property as a bare Expression::Identifier. The
async-arrow parameter validator's expr_contains_await_identifier walked the
whole optional-chain tail and wrongly flagged that property name as an illegal
`await` identifier reference, so `async (x = ({await: 1})?.await) => x` threw a
spurious SyntaxError even though `?. IdentifierName` permits reserved words and
Node accepts it (returns 1). Non-optional `obj.await` was unaffected because
static member property names are already skipped by the validator.
Add optional_chain_contains_await_identifier, a chain-aware walker that skips
static property names and placeholder bases but still routes computed subscripts
(`?.[await]`) and call arguments (`?.(await)`) through the full validator, since
those remain genuine identifier references that must stay rejected.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c84349d90
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return "windows1252"; | ||
| case "ucs2": | ||
| case "ucs-2": | ||
| case "utf16le": |
There was a problem hiding this comment.
Reject unsupported TextDecoder aliases
When bundled code uses Buffer-style labels such as utf16le, native Node's TextDecoder throws a RangeError (it accepts utf-16le/ucs-2, not the unhyphenated Buffer alias), but the jsse shim decodes successfully. That makes the same library bundle take different paths under the Node reference and jsse, so tests that verify Node/Web rejection of unsupported labels will fail in the host shim before exercising engine behavior; the other non-standard labels added in this normalizer have the same issue.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Deferred to #339 — real gap, but out of scope for this PR: the zod normal+jitless corpus never constructs TextDecoder with an unhyphenated Buffer-style label, so the 2,184-case Node cross-check is unaffected either way. Tracking the WHATWG label-table fix separately.
|
🎉 This PR is included in version 0.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
jitlessprocesses, with an exact combined 2,184-case Node lockIdentifierNameproperties after optional chaining, as required by the ECMAScript grammarNode reports 2,184/2,184. JSSE reports 2,176 passing (including one visible jitless-only skip) and eight failing assertions: the same four failures in each mode, tracked by #313-#315.
Validation
cargo fmt --check./scripts/lint.shcargo build --releasecargo test --release(294 unit tests + smoke oracle)uv run python scripts/run-custom-tests.py(7/7)./scripts/run-library-tests.sh zod: exact 2,184 count on both engines; Node green, JSSE residuals aboveorigin/main(the exact affected 11 files are 0/22 on both binaries under the same host), sotest262-pass.txtand the README conformance count remain unchanged.Closes #279