test: add TypeScript FFI surface coverage#694
Merged
proggeramlug merged 8 commits intoMay 12, 2026
Conversation
This was referenced May 11, 2026
This was referenced May 13, 2026
proggeramlug
pushed a commit
that referenced
this pull request
May 14, 2026
Converts deterministic entries from `test_ffi_surface_stdlib_integrations.ts` into focused behavioral parity fixtures, per the follow-up to #694. - `test_parity_argon2.ts` + expected output: round-trip `argon2.hash` / `argon2.verify` (async path — the only one wired in the dispatch table) with random-salt shape assertions. - `test_parity_ethers.ts` + expected output: deterministic helpers `getAddress`, `parseEther`/`formatEther`, `parseUnits`/`formatUnits`. - Adds `@covers` block to `test_parity_crypto.ts` for the crypto/webcrypto/crypto_e2e FFI surface it already exercises (digest, hash, hmac-via-pbkdf2/hkdf, subtle.sign/verify). Both new fixtures use the `test-parity/expected/` mechanism: Perry routes the npm-style imports to its bundled `perry-ext-*` wrappers, but Node can't load the same names without `node_modules`, so they fall through to the stored expected-output comparison. After `./test-coverage/regen_ts_surface_inventory.py`: - stdlib integrations inventory: 156 → 138 unique FFI names. - `./test-coverage/audit.sh --markdown` still reports 100% TS FFI coverage.
proggeramlug
pushed a commit
that referenced
this pull request
May 14, 2026
…#760) Converts deterministic entries from `test_ffi_surface_stdlib_integrations.ts` into focused behavioral parity fixtures, per the follow-up to #694. - `test_parity_argon2.ts` + expected output: round-trip `argon2.hash` / `argon2.verify` (async path — the only one wired in the dispatch table) with random-salt shape assertions. - `test_parity_ethers.ts` + expected output: deterministic helpers `getAddress`, `parseEther`/`formatEther`, `parseUnits`/`formatUnits`. - Adds `@covers` block to `test_parity_crypto.ts` for the crypto/webcrypto/crypto_e2e FFI surface it already exercises (digest, hash, hmac-via-pbkdf2/hkdf, subtle.sign/verify). Both new fixtures use the `test-parity/expected/` mechanism: Perry routes the npm-style imports to its bundled `perry-ext-*` wrappers, but Node can't load the same names without `node_modules`, so they fall through to the stored expected-output comparison. After `./test-coverage/regen_ts_surface_inventory.py`: - stdlib integrations inventory: 156 → 138 unique FFI names. - `./test-coverage/audit.sh --markdown` still reports 100% TS FFI coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds explicit TypeScript FFI surface coverage accounting and splits the generated coverage inventory into domain-focused parity fixtures.
Changes
test-coverage/audit.shto report TypeScript, Rust, and combined FFI coverage separately.test_compat_core_surface.tswith deterministic behavioral parity checks for core JS runtime features.--experimental-strip-typeswarning.test-coverage/COVERAGE.mdwith 100% TypeScript FFI surface coverage under the audit metric.Related issue
n/a
Follow-up issues
Test plan
./test-coverage/regen_ts_surface_inventory.py./test-coverage/audit.sh --markdown./run_parity_tests.sh --filter test_ffi_surface./run_parity_tests.sh --filter test_compat_core_surfacegit diff --checkNotes
This improves FFI surface coverage accounting. The inventory entries are not a replacement for deeper semantic compatibility tests; they are intended to provide a complete map that can be converted into behavioral parity fixtures over follow-up work.
Checklist