Skip to content

test(domain): expand Node parity coverage - #6864

Merged
proggeramlug merged 1 commit into
mainfrom
test/expand-node-domain-parity
Jul 27, 2026
Merged

test(domain): expand Node parity coverage#6864
proggeramlug merged 1 commit into
mainfrom
test/expand-node-domain-parity

Conversation

@TheHypnoo

@TheHypnoo TheHypnoo commented Jul 26, 2026

Copy link
Copy Markdown
Member

Summary

Expands the granular node:domain parity suite from 3 broad fixtures to 48 deterministic, single-contract fixtures based on Node.js 26.5.0.

Changes

  • Covers exports, descriptors, aliases, classes, prototypes, receiver checks, lifecycle, membership, bind/intercept, nested domains, EventEmitter/EventTarget behavior, and async context propagation.
  • Replaces the three broad fixtures with focused probes that restore domain state and avoid network, fixed ports, sleeps, subprocess races, signals, and GC behavior.
  • Records pinned Node, Deno, and Bun sources, direct runtime comparisons, stable Perry differences, exclusions, normalization, and the stopping rule.
  • Updates the domain baseline from 3/3 to a clean, repeatable 18/48 Perry match.

Related issue

n/a

Test plan

  • cargo build --release -p perry
  • Node 26.5.0: 48/48 fixtures exited cleanly in three byte-identical rounds
  • Perry: 18/48 exact matches and 30 stable diffs in three repeated rounds
  • Deno 2.9.3: 17 exact matches, 29 diffs, and 2 runtime failures in two repeated rounds
  • Bun 1.2.18: 2 exact matches, 18 diffs, and 28 runtime failures in two repeated rounds
  • deno fmt --check test-parity/node-suite/domain
  • python3 -m json.tool test-parity/node_suite_baseline.json
  • git diff --check
  • cargo test --workspace --exclude perry-ui-ios --exclude perry-ui-tvos --exclude perry-ui-watchos --exclude perry-ui-gtk4 --exclude perry-ui-android --exclude perry-ui-windows passes
  • (if user-facing) Added or updated a test under test-files/ or a #[test] in the affected crate
  • (if CLI / stdlib / runtime API changed) Updated docs/src/
  • (if touching a platform UI backend) Built -p perry-ui-<backend> locally on that platform

Screenshots / output

Node aggregate SHA-256 for all three rounds:

5110542e52596f8c820b7278ecd0afb0856ecbf8cf64352eeb1d88b6bda16d30

Checklist

  • I have NOT bumped the workspace version or edited CLAUDE.md / CHANGELOG.md (maintainer handles these at merge)
  • My commits follow the loose feat: / fix: / docs: / chore: prefix convention used in the log
  • I've read CONTRIBUTING.md and agree to the Code of Conduct

Summary by CodeRabbit

  • Tests

    • Expanded runtime parity coverage for legacy domain behavior, including membership, activation, error handling, callbacks, inheritance, exports, and asynchronous context propagation.
    • Added checks for EventEmitter, EventTarget, Promise, timer, and next-tick interactions.
    • Updated parity results to reflect 48 total scenarios, with 18 passing in the recorded baseline.
  • Documentation

    • Added guidance covering test scope, reference runtimes, comparison rules, normalization, exclusions, and termination criteria.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ff4a69ed-a256-4faf-b43c-db0bdf5fc1d4

📥 Commits

Reviewing files that changed from the base of the PR and between 563c359 and 693d834.

📒 Files selected for processing (53)
  • test-parity/node-suite/domain/README.md
  • test-parity/node-suite/domain/add-domain-cycle.ts
  • test-parity/node-suite/domain/add-duplicate.ts
  • test-parity/node-suite/domain/add-member.ts
  • test-parity/node-suite/domain/add-plain-object.ts
  • test-parity/node-suite/domain/add-transfers-domain.ts
  • test-parity/node-suite/domain/bind-call-contract.ts
  • test-parity/node-suite/domain/bind-error-metadata.ts
  • test-parity/node-suite/domain/bind-properties.ts
  • test-parity/node-suite/domain/create-state.ts
  • test-parity/node-suite/domain/detached-receiver-validation.ts
  • test-parity/node-suite/domain/domain-class.ts
  • test-parity/node-suite/domain/domain-constructor-requires-new.ts
  • test-parity/node-suite/domain/domain-eventemitter-inheritance.ts
  • test-parity/node-suite/domain/emitter-error-routing.ts
  • test-parity/node-suite/domain/emitter-event-context.ts
  • test-parity/node-suite/domain/emitter-implicit-membership.ts
  • test-parity/node-suite/domain/emitter-local-error-listener.ts
  • test-parity/node-suite/domain/emitter-nested-restore.ts
  • test-parity/node-suite/domain/enter-duplicate.ts
  • test-parity/node-suite/domain/enter-exit-active.ts
  • test-parity/node-suite/domain/enter-exit-process-domain.ts
  • test-parity/node-suite/domain/eventemitter-using-domains.ts
  • test-parity/node-suite/domain/eventtarget-membership.ts
  • test-parity/node-suite/domain/exit-middle.ts
  • test-parity/node-suite/domain/exit-unmatched.ts
  • test-parity/node-suite/domain/export-aliases.ts
  • test-parity/node-suite/domain/export-descriptors.ts
  • test-parity/node-suite/domain/exports.ts
  • test-parity/node-suite/domain/immediate-context.ts
  • test-parity/node-suite/domain/intercept-call-contract.ts
  • test-parity/node-suite/domain/intercept-callback-error.ts
  • test-parity/node-suite/domain/intercept-error-metadata.ts
  • test-parity/node-suite/domain/intercept-non-error-first-argument.ts
  • test-parity/node-suite/domain/intercept-properties.ts
  • test-parity/node-suite/domain/members-descriptor.ts
  • test-parity/node-suite/domain/members-emitter-errors.ts
  • test-parity/node-suite/domain/members-live-array.ts
  • test-parity/node-suite/domain/nexttick-context.ts
  • test-parity/node-suite/domain/nexttick-identity.ts
  • test-parity/node-suite/domain/process-domain-descriptor.ts
  • test-parity/node-suite/domain/promise-context.ts
  • test-parity/node-suite/domain/promise-handler-domain.ts
  • test-parity/node-suite/domain/prototype-surface.ts
  • test-parity/node-suite/domain/remove-member.ts
  • test-parity/node-suite/domain/remove-unlisted-member.ts
  • test-parity/node-suite/domain/run-contract.ts
  • test-parity/node-suite/domain/run-error-metadata.ts
  • test-parity/node-suite/domain/run-nested-restore.ts
  • test-parity/node-suite/domain/run-primitive-error.ts
  • test-parity/node-suite/domain/surface-run-bind-intercept.ts
  • test-parity/node-suite/domain/timeout-context.ts
  • test-parity/node_suite_baseline.json
💤 Files with no reviewable changes (3)
  • test-parity/node-suite/domain/enter-exit-process-domain.ts
  • test-parity/node-suite/domain/members-emitter-errors.ts
  • test-parity/node-suite/domain/surface-run-bind-intercept.ts

📝 Walkthrough

Walkthrough

Adds 48 Node domain parity fixtures covering module surface, lifecycle, membership, callbacks, error routing, and asynchronous context. Documents the suite and updates the modules.domain baseline from 3/3 to 18/48.

Changes

Domain parity suite

Layer / File(s) Summary
Module surface and baseline
test-parity/node-suite/domain/README.md, test-parity/node-suite/domain/*surface*.ts, test-parity/node_suite_baseline.json
Documents the parity contract, adds export and descriptor checks, and updates the domain baseline to 18 passing cases out of 48.
Lifecycle and membership behavior
test-parity/node-suite/domain/add-*.ts, test-parity/node-suite/domain/enter-*.ts, test-parity/node-suite/domain/exit-*.ts, test-parity/node-suite/domain/remove-*.ts
Covers domain creation, enter/exit state, member attachment and removal, duplicates, transfers, cycles, and EventTarget membership.
Run, bind, and intercept contracts
test-parity/node-suite/domain/bind-*.ts, test-parity/node-suite/domain/intercept-*.ts, test-parity/node-suite/domain/run-*.ts
Checks callback receivers, arguments, return values, function properties, nested restoration, and error metadata.
EventEmitter routing
test-parity/node-suite/domain/emitter-*.ts
Checks implicit membership, event context, local and domain error listeners, and active-domain restoration.
Asynchronous context propagation
test-parity/node-suite/domain/*context.ts, test-parity/node-suite/domain/promise-handler-domain.ts
Checks domain context across nextTick, promises, setImmediate, and setTimeout.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • PerryTS/perry#6698: Changes how the shared regression script derives and prints overall baseline results.

Suggested labels: parity

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: expanding Node parity coverage.
Description check ✅ Passed All required template sections are present and filled with concrete summary, changes, issue, test plan, output, and checklist details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/expand-node-domain-parity

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@proggeramlug
proggeramlug merged commit 78ccb59 into main Jul 27, 2026
30 of 31 checks passed
@proggeramlug
proggeramlug deleted the test/expand-node-domain-parity branch July 27, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants