Registry Mirror
Skip to content

Conversation

@andrewtdiz

Copy link
Copy Markdown
Contributor

Summary

Closes #3082
Closes #3085
Closes #3086
Closes #3084

Fixes a diagnostics_channel tracing/store semantics cluster:

  • preserves all Channel#runStores callback arguments through bound and unbound channels
  • preserves non-callable bindStore transforms so runStores reports Node-compatible asynchronous TypeErrors while continuing the callback without that store context
  • honors TracingChannel#traceCallback callback position and forwards all target/callback arguments
  • rejects symbol tracingChannel(nameOrChannels) inputs with ERR_INVALID_ARG_TYPE while keeping channel(Symbol(...)) valid
  • routes high-arity closure calls through rest/arity metadata so synthetic-arguments native methods receive full argument lists

Why These Were Batched

These issues share diagnostics_channel's store/tracing method dispatch path and depend on the same native callback argument plumbing. Fixing them together avoids separate partial fixes around synthetic argument forwarding, tracing callback wrapping, and store transform validation.

Tests Added

  • node-suite/diagnostics_channel/stores/run-stores-rest-args.ts
  • node-suite/diagnostics_channel/stores/non-callable-transform.ts
  • node-suite/diagnostics_channel/tracing/trace-callback-position-args.ts
  • node-suite/diagnostics_channel/tracing/symbol-name-validation.ts

Verification

  • PATH="/tmp/perry-node25-wrapper:$PATH" node --experimental-strip-types test-parity/node-suite/diagnostics_channel/stores/non-callable-transform.ts
  • PATH="/tmp/perry-node25-wrapper:$PATH" node --experimental-strip-types test-parity/node-suite/diagnostics_channel/stores/run-stores-rest-args.ts
  • PATH="/tmp/perry-node25-wrapper:$PATH" node --experimental-strip-types test-parity/node-suite/diagnostics_channel/tracing/trace-callback-position-args.ts
  • PATH="/tmp/perry-node25-wrapper:$PATH" node --experimental-strip-types test-parity/node-suite/diagnostics_channel/tracing/symbol-name-validation.ts
  • PATH="/tmp/perry-node25-wrapper:$PATH" ./run_parity_tests.sh --suite node-suite --module diagnostics_channel --filter run-stores-rest-args
  • PATH="/tmp/perry-node25-wrapper:$PATH" ./run_parity_tests.sh --suite node-suite --module diagnostics_channel --filter non-callable-transform
  • PATH="/tmp/perry-node25-wrapper:$PATH" ./run_parity_tests.sh --suite node-suite --module diagnostics_channel --filter symbol-name-validation
  • PATH="/tmp/perry-node25-wrapper:$PATH" ./run_parity_tests.sh --suite node-suite --module diagnostics_channel/tracing --filter trace-callback
  • PATH="/tmp/perry-node25-wrapper:$PATH" ./run_parity_tests.sh --suite node-suite --module diagnostics_channel/stores -> 5 pass, 0 fail
  • PATH="/tmp/perry-node25-wrapper:$PATH" ./run_parity_tests.sh --suite node-suite --module diagnostics_channel/tracing -> 24 pass, 0 fail
  • PATH="/tmp/perry-node25-wrapper:$PATH" ./run_parity_tests.sh --suite node-suite --module diagnostics_channel -> 64 pass, 0 fail
  • cargo build --release --quiet -p perry -p perry-runtime -p perry-stdlib
  • cargo fmt --all -- --check
  • git diff --check origin/main...HEAD
  • ./scripts/check_file_size.sh
  • jq empty test-parity/known_failures.json

Known Limitations

  • No diagnostics_channel worker-policy semantics were changed; existing expected-output worker fixtures remain as-is.

Non-Goals

  • No node:async_hooks API changes beyond using existing AsyncLocalStorage store behavior.
  • No tracing_channel worker propagation changes.
  • No diagnostics_channel import/export surface changes.

# Conflicts:
#	crates/perry-runtime/src/closure/dispatch.rs
#	crates/perry-runtime/src/node_submodules/diagnostics.rs
#	crates/perry-runtime/src/node_submodules/mod.rs
#	test-parity/node-suite/diagnostics_channel/stores/non-callable-transform.ts
#	test-parity/node-suite/diagnostics_channel/stores/run-stores-rest-args.ts
#	test-parity/node-suite/diagnostics_channel/tracing/symbol-name-validation.ts
@proggeramlug
proggeramlug merged commit 967cbf3 into PerryTS:main May 31, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants