Skip to content

test: add Zod normal and jitless corpus - #320

Merged
pmatos merged 4 commits into
mainfrom
sym/jsse/279-node-compat-library-zod-normal-and-jitless-validation-corpus
Jul 20, 2026
Merged

test: add Zod normal and jitless corpus#320
pmatos merged 4 commits into
mainfrom
sym/jsse/279-node-compat-library-zod-normal-and-jitless-validation-corpus

Conversation

@pmatos

@pmatos pmatos commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Node 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.sh
  • cargo build --release
  • cargo test --release (294 unit tests + smoke oracle)
  • uv run python scripts/run-custom-tests.py (7/7)
  • optional chaining: 76/76 upstream + 2/2 focused extra scenarios
  • RegExp 3,756/3,756; BigInt 154/154; Proxy 607/607; Reflect 306/306; Symbol 192/192
  • harness self-test; Node-shim self-test; Buffer/TextDecoder fixtures 265/265 on JSSE and Node
  • ./scripts/run-library-tests.sh zod: exact 2,184 count on both engines; Node green, JSSE residuals above
  • full test262 completed at 99,546/99,568. Its 22 reported Intl baseline regressions reproduce identically on untouched origin/main (the exact affected 11 files are 0/22 on both binaries under the same host), so test262-pass.txt and the README conformance count remain unchanged.

Closes #279

…pat-library-zod-normal-and-jitless-validation-corpus

# Conflicts:
#	CLAUDE.md
#	scripts/README.md

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/parser/expressions.rs
…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.
@pmatos
pmatos merged commit d475d49 into main Jul 20, 2026
8 checks passed
@pmatos
pmatos deleted the sym/jsse/279-node-compat-library-zod-normal-and-jitless-validation-corpus branch July 20, 2026 08:06

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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":

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Node-compat library: zod normal and jitless validation corpus

1 participant