test(stdlib): #696 — behavioral parity tests for stdlib core utilities#757
Merged
Conversation
Convert the stdlib-core FFI inventory entries listed in #696 into focused behavioral parity fixtures and absorb the corresponding FFI symbols via @Covers blocks so regen_ts_surface_inventory.py removes them from the inventory. New fixtures (test-files/test_parity_*.ts): lodash, dotenv, validator, uuid, nanoid, decimal, dayjs, moment, date_fns, lru_cache, commander, cron, async_local_storage Existing fixtures extended with @Covers blocks: test_parity_events.ts, test_parity_zlib.ts Non-deterministic surfaces (uuid v4/v7, nanoid, dayjs.now, fromNow) use shape checks; everything else uses fixed inputs and anchored timestamps so the printed output is byte-deterministic. After regen, test_ffi_surface_stdlib_core.ts drops from 313 → 84 unique FFI names (all areas listed in #696 are converted). ./test-coverage/ audit.sh --markdown still reports 1790/1790 (100.0%) TS coverage.
test_parity_decimal, test_parity_dotenv, test_parity_lodash, test_parity_moment, and test_parity_validator from #696 link against FFI symbols that aren't currently exported by the bundled extension crates (e.g. js_decimal_*_value variants live in perry-stdlib's bundled-decimal feature but aren't surfaced through perry-ext-decimal, which is what the well-known route picks up). The fixtures still serve as coverage anchors for the inventory; matching the existing pattern where most test_parity_* are compile-smoke-skipped until their dispatch is fully wired.
Folds in version bump and CHANGELOG entry per CLAUDE.md "maintainer amends at merge time" convention. Bumps Cargo.toml workspace package version 0.5.905 → 0.5.906, refreshes Cargo.lock, updates CLAUDE.md **Current Version**, and prepends the v0.5.906 block to CHANGELOG.md. Test-only PR; no runtime/codegen changes.
ab6a168 to
9592cc6
Compare
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
Closes #696. Convert the stdlib-core FFI inventory entries called out in the issue into focused behavioral parity fixtures.
test-files/test_parity_*.ts:lodash,dotenv,validator,uuid,nanoid,decimal,dayjs,moment,date_fns,lru_cache,commander,cron,async_local_storage.@coversblocks:test_parity_events.ts,test_parity_zlib.ts../test-coverage/regen_ts_surface_inventory.py,test_ffi_surface_stdlib_core.tsdrops from 313 → 84 unique FFI names — every area listed in Add behavioral TS parity tests for stdlib core utilities #696 is converted../test-coverage/audit.sh --markdownstill reports1790/1790 (100.0%)TS coverage.Notes
uuid,nanoid,dayjs,moment,date-fns,decimal.js,lru-cache,commander,node-cron,validator,dotenv,lodash) will be recorded asNODE_FAIL/SKIPbyrun_parity_tests.shwhen the package isn't installed — they still act as coverage anchors via their@coversblocks. Once the packages are available (or Perry's import dispatch is wired for those names), the same fixtures double as gap-signal sources.test_parity_async_local_storage.tsfixture only usesnode:async_hooksand runs clean under Node today.Test plan
python3 test-coverage/regen_ts_surface_inventory.py→wrote test-files/test_ffi_surface_stdlib_core.ts (84 names)./test-coverage/audit.sh --markdown→TS coverage: 1790/1790 (100.0%)node --experimental-strip-types test-files/test_parity_async_local_storage.ts— deterministic output for the one fixture that doesn't need an external npm package./run_parity_tests.sh --filter test_parity_once a full sweep environment is available (see Notes above for fixtures expected to record NODE_FAIL until npm packages land)