Skip to content

fix: make Node middleware callback errors catchable#478

Open
willkill07 wants to merge 2 commits into
NVIDIA:release/0.6from
willkill07:wkk_fix-node-middleware-callback-errors
Open

fix: make Node middleware callback errors catchable#478
willkill07 wants to merge 2 commits into
NVIDIA:release/0.6from
willkill07:wkk_fix-node-middleware-callback-errors

Conversation

@willkill07

@willkill07 willkill07 commented Jul 18, 2026

Copy link
Copy Markdown
Member

Overview

Catch synchronous exceptions from registered Node middleware callbacks instead of allowing N-API to terminate the process.

  • I confirm this contribution is my own work, or I have the right to submit it under this project's license.
  • I searched existing issues and open pull requests, and this does not duplicate existing work.

Details

  • Add an internal safe synchronous callback bridge for Node guardrails and request intercepts.
  • Preserve middleware failure contracts: conditional guardrails and request intercepts reject the managed call; event sanitizers fail open and expose the error through getLastCallbackError().
  • Cover global, scope-local, and dynamic-plugin registrations, including post-error calls in the same Node process.
  • Document the Node middleware callback failure behavior.

Where should the reviewer start?

Start with crates/node/src/callable.rs for the callback envelope, then crates/node/src/api/mod.rs for the registration surfaces and the Node regression tests.

Related Issues: (use one of the action keywords, "Resolves", "Fixes", "Closes")

  • Closes: RELAY-508

Checklist

  • Tests are included and pass locally.
  • Documentation has been updated where applicable.

Summary by CodeRabbit

  • New Features
    • Node.js guardrails, sanitizers, and request intercepts now register using standard JavaScript functions directly (with an updated callback registration signature).
    • Scope-local callbacks follow the same improved registration and error-handling behavior.
  • Bug Fixes
    • Guardrail/intercept callback failures are now properly surfaced (as catchable rejected calls) without breaking later executions.
    • Event/sanitizer failures “fail open” by preserving the currently emitted payload while recording the callback error for getLastCallbackError().
  • Documentation
    • Added/updated callback contract guidance for failure and sanitizer fallback semantics.
  • Tests
    • Expanded coverage for catchable errors and sanitizer fail-open regressions.

@willkill07
willkill07 requested review from a team and lvojtku as code owners July 18, 2026 17:18
@github-actions github-actions Bot added size:L PR is large Bug issue describes bug; PR fixes bug lang:js PR changes/introduces Javascript/Typescript code lang:rust PR changes/introduces Rust code labels Jul 18, 2026
Signed-off-by: Will Killian <wkillian@nvidia.com>
@willkill07
willkill07 force-pushed the wkk_fix-node-middleware-callback-errors branch from 32eb785 to 0661bcd Compare July 18, 2026 17:19
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: f2886de9-929e-450e-b46e-ba6f27bed0fc

📥 Commits

Reviewing files that changed from the base of the PR and between 0661bcd and 47fe559.

📒 Files selected for processing (2)
  • crates/node/src/callable.rs
  • crates/node/tests/llm_tests.mjs
📜 Recent review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Check / Run
  • GitHub Check: Preview docs
🧰 Additional context used
📓 Path-based instructions (12)
crates/node/**/*.{js,mjs,cjs,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use camelCase for Node.js public APIs.

Files:

  • crates/node/tests/llm_tests.mjs
**/*.{rs,py,js,mjs,cjs,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{rs,py,js,mjs,cjs,ts,tsx}: Use Json = serde_json::Value in Rust-facing runtime APIs where the existing code expects JSON payloads.
Use Result<T> with FlowError in core runtime paths, and keep errors explicit and binding-appropriate at the wrapper layer.
Keep async behavior on the existing tokio-based model; bindings should preserve callback and future lifetimes rather than blocking or hiding async work unexpectedly.

Files:

  • crates/node/tests/llm_tests.mjs
  • crates/node/src/callable.rs
**/*

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

**/*: Format changed files with the language-native formatter before the final lint/test pass.
If dynamic plugin behavior changed, use maintain-dynamic-plugins and include the native SDK, worker protocol, Python SDK, docs, packaging, and Codecov surfaces in the validation plan.
If code changes alter APIs, bindings, commands, paths, packaging behavior, observability/adaptive semantics, or documented best practices, update any dependent maintainer or consumer skills in the same branch.
During iteration, prefer uv run pre-commit run --files <changed files...>.
Before review or handoff, run uv run pre-commit run --all-files.

Files:

  • crates/node/tests/llm_tests.mjs
  • crates/node/src/callable.rs
crates/{python,ffi,node}/**/*

⚙️ CodeRabbit configuration file

crates/{python,ffi,node}/**/*: Treat binding changes as public API changes. Check for parity with the other language bindings, FFI ownership/lifetime safety,
callback error propagation, stable type conversion, and consistent async/stream semantics.
Flag changes that update one binding without corresponding tests or documentation for the same surface elsewhere.

Files:

  • crates/node/tests/llm_tests.mjs
  • crates/node/src/callable.rs
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • crates/node/tests/llm_tests.mjs
**/*.rs

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

**/*.rs: Any Rust change must run just test-rust
Any Rust change must run cargo fmt --all
Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for all FFI work since it is Rust work
Run just test-rust to validate FFI changes
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting on FFI work

When Rust files changed as part of Go work, also run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all when Rust files are changed as part of Node work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files are changed as part of Node work
Run just test-rust when Rust files are changed as part of Node work

When changing the core Rust runtime or Rust-facing API surface, format Rust code with cargo fmt (rustfmt defaults), keep cargo clippy -- -D warnings clean, and satisfy cargo deny check per deny.toml.

**/*.rs: If any Rust code changed, always run just test-rust.
If any Rust code changed, also run cargo fmt --all.
If any Rust code changed, also run cargo clippy --workspace --all-targets -- -D warnings.
For Rust changes headed for review, run cargo fmt --all and cargo clippy --workspace --all-targets -- -D warnings even if relying on pre-commit.

Files:

  • crates/node/src/callable.rs
**/*.{rs,py}

📄 CodeRabbit inference engine (AGENTS.md)

Follow binding naming conventions in Rust and Python: use snake_case.

Files:

  • crates/node/src/callable.rs
**/*.{rs,py,go,js,ts,c,h}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use language-appropriate naming conventions: Rust snake_case, C FFI exports prefixed nemo_relay_, Go PascalCase, Node.js camelCase, and Python snake_case.

Files:

  • crates/node/src/callable.rs
**/*.{rs,go,js,ts}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Add the SPDX license header to all Rust, Go, JavaScript, and TypeScript source files using the corresponding // comment form.

Files:

  • crates/node/src/callable.rs
{crates/**/src/**/*.rs,python/**/*.py}

📄 CodeRabbit inference engine (.agents/skills/maintain-dynamic-plugins/SKILL.md)

Do not add tests under src; Rust tests belong in crate tests/ trees, and Python SDK tests belong under python/tests.

Files:

  • crates/node/src/callable.rs
**/*.{rs,py,go,js,ts}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

If a language surface changed, always run that language's test target even when Rust core did not change.

Files:

  • crates/node/src/callable.rs
**/*.{rs,py,js,ts,tsx,go,java,kt,swift}

📄 CodeRabbit inference engine (.agents/skills/add-middleware/SKILL.md)

Add tests covering registration and duplicate names, deregistration and missing names, priority ordering, callback failure policy, scope-local inheritance and cleanup, event payload semantics, immutable mark and scope fields, and parity across affected bindings.

Files:

  • crates/node/src/callable.rs
🔇 Additional comments (2)
crates/node/tests/llm_tests.mjs (1)

37-38: LGTM!

Also applies to: 386-432, 515-554

crates/node/src/callable.rs (1)

109-113: 📐 Maintainability & Code Quality

Run the required Rust validation before merge.

Please run cargo fmt --all, just test-rust, cargo clippy --workspace --all-targets -- -D warnings, and uv run pre-commit run --all-files.

As per coding guidelines, Rust changes require these formatting, test, lint, and pre-commit checks before handoff.

Source: Coding guidelines


Walkthrough

The Node bindings route JavaScript guardrails, intercepts, and sanitizers through middleware callbacks that capture exceptions, preserve sanitizer payloads on failure, and expose catchable errors. Registration APIs now accept Env and JsFunction, with expanded tests and documentation.

Changes

Node middleware callback handling

Layer / File(s) Summary
Middleware callback contracts and receivers
crates/node/src/callable.rs, crates/node/src/types/mod.rs
Middleware envelopes and receivers convert JavaScript exceptions into recorded errors, fallback values, or managed-call errors; event sanitizer results are deserialized from JSON.
Registration wiring and sanitizer execution
crates/node/src/api/mod.rs
Plugin, global, and scope-local registration APIs accept JavaScript functions, construct middleware thread-safe callbacks, and apply failure-open event sanitization.
Error behavior validation and documentation
crates/node/tests/*, docs/instrument-applications/advanced-guide.mdx, docs/reference/event-sanitizers.mdx
Tests cover catchable guardrail/intercept errors, payload preservation, and callback error recording; documentation describes the resulting failure semantics.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant JavaScript
  participant NodeMiddleware
  participant CallbackWrapper
  participant CoreExecution
  JavaScript->>NodeMiddleware: invoke registered callback
  NodeMiddleware->>CallbackWrapper: return success or error envelope
  CallbackWrapper->>CoreExecution: provide value, fallback payload, or managed error
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title follows Conventional Commits and accurately summarizes the main change.
Description check ✅ Passed The description includes the required overview, details, reviewer start point, related issue, and checklist items.
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 unit tests (beta)
  • Create PR with unit tests

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

@willkill07 willkill07 self-assigned this Jul 18, 2026
@willkill07 willkill07 added this to the 0.6 milestone Jul 18, 2026
@github-actions

Copy link
Copy Markdown

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/node/src/callable.rs`:
- Around line 108-109: Make the catch handler around the callable invocation
exception-safe by wrapping error formatting in a nested fallback that cannot
rethrow when accessing error.message or converting the value to a string; always
return the { ok: false, error: ... } result. Add a regression test for an object
whose message getter or string conversion throws, verifying the wrapper still
returns a failure result without propagating the exception.

In `@crates/node/tests/llm_tests.mjs`:
- Around line 494-521: Extend the LLM sanitizer adapter tests for
wrap_js_llm_sanitize_request_fn and wrap_js_llm_response_fn with throwing
callbacks. Assert each failure preserves the original request or response,
records the thrown error through getLastCallbackError(), and allows a subsequent
successful call to complete normally.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: d4a9f43e-555e-4215-9dd3-dd8507a77873

📥 Commits

Reviewing files that changed from the base of the PR and between edd3aee and 0661bcd.

📒 Files selected for processing (11)
  • crates/node/src/api/mod.rs
  • crates/node/src/callable.rs
  • crates/node/src/types/mod.rs
  • crates/node/tests/adaptive_tests.mjs
  • crates/node/tests/callback_error_tests.mjs
  • crates/node/tests/event_sanitizers_tests.mjs
  • crates/node/tests/llm_tests.mjs
  • crates/node/tests/scope_local_tests.mjs
  • crates/node/tests/tools_tests.mjs
  • docs/instrument-applications/advanced-guide.mdx
  • docs/reference/event-sanitizers.mdx
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Check / Run
  • GitHub Check: Preview docs
🧰 Additional context used
📓 Path-based instructions (19)
**/*.mdx

📄 CodeRabbit inference engine (.agents/skills/review-doc-style/SKILL.md)

MDX top-of-file SPDX comments must use {/* ... */} delimiters instead of HTML comment delimiters (Must-Fix)

In MDX files, top-of-file comments must use JSX comment delimiters ({/* to open and */} to close); do not use HTML comments for MDX SPDX headers

Files:

  • docs/instrument-applications/advanced-guide.mdx
  • docs/reference/event-sanitizers.mdx
**/*.{md,mdx}

📄 CodeRabbit inference engine (AGENTS.md)

Update README.md, fern/, package READMEs, and binding-support notes when public behavior, package names, examples, or supported bindings change.

**/*.{md,mdx}: Prefer the documented public API, not internal shortcuts
Keep package names, repo references, and build commands current
Keep release-process and release-notes guidance in repo-maintainer docs such as RELEASING.md, not as user-facing docs pages or CHANGELOG.md
Keep stable user-facing wrappers at scripts/ root in docs and examples; only point at namespaced helper paths when documenting internal maintenance work
When detailed dynamic plugin guides exist, keep Rust native plugin examples, Python worker plugin examples, and grpc-v1 protocol details on separate pages

If links in documentation change, run just docs-linkcheck.

Files:

  • docs/instrument-applications/advanced-guide.mdx
  • docs/reference/event-sanitizers.mdx
**/*.{md,markdown,mdx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Add the SPDX license header to all Markdown/MDX documentation files using the HTML comment block form.

Files:

  • docs/instrument-applications/advanced-guide.mdx
  • docs/reference/event-sanitizers.mdx
{docs,examples}/**/*

📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)

Update docs and examples.

Files:

  • docs/instrument-applications/advanced-guide.mdx
  • docs/reference/event-sanitizers.mdx
**/*

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

**/*: Format changed files with the language-native formatter before the final lint/test pass.
If dynamic plugin behavior changed, use maintain-dynamic-plugins and include the native SDK, worker protocol, Python SDK, docs, packaging, and Codecov surfaces in the validation plan.
If code changes alter APIs, bindings, commands, paths, packaging behavior, observability/adaptive semantics, or documented best practices, update any dependent maintainer or consumer skills in the same branch.
During iteration, prefer uv run pre-commit run --files <changed files...>.
Before review or handoff, run uv run pre-commit run --all-files.

Files:

  • docs/instrument-applications/advanced-guide.mdx
  • docs/reference/event-sanitizers.mdx
  • crates/node/tests/event_sanitizers_tests.mjs
  • crates/node/tests/callback_error_tests.mjs
  • crates/node/tests/scope_local_tests.mjs
  • crates/node/tests/llm_tests.mjs
  • crates/node/tests/adaptive_tests.mjs
  • crates/node/tests/tools_tests.mjs
  • crates/node/src/types/mod.rs
  • crates/node/src/callable.rs
  • crates/node/src/api/mod.rs
docs/**/*

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

If documentation examples or commands under docs/ change, run the targeted docs checks appropriate to the change.

Files:

  • docs/instrument-applications/advanced-guide.mdx
  • docs/reference/event-sanitizers.mdx
{docs/**,README.md,CONTRIBUTING.md,RELEASING.md,SECURITY.md}

⚙️ CodeRabbit configuration file

{docs/**,README.md,CONTRIBUTING.md,RELEASING.md,SECURITY.md}: Review documentation for technical accuracy against the current API, command correctness, and consistency across language bindings.
Flag stale examples, missing SPDX headers where required, and instructions that no longer match CI or pre-commit behavior.

Files:

  • docs/instrument-applications/advanced-guide.mdx
  • docs/reference/event-sanitizers.mdx
crates/node/**/*.{js,mjs,cjs,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use camelCase for Node.js public APIs.

Files:

  • crates/node/tests/event_sanitizers_tests.mjs
  • crates/node/tests/callback_error_tests.mjs
  • crates/node/tests/scope_local_tests.mjs
  • crates/node/tests/llm_tests.mjs
  • crates/node/tests/adaptive_tests.mjs
  • crates/node/tests/tools_tests.mjs
**/*.{rs,py,js,mjs,cjs,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{rs,py,js,mjs,cjs,ts,tsx}: Use Json = serde_json::Value in Rust-facing runtime APIs where the existing code expects JSON payloads.
Use Result<T> with FlowError in core runtime paths, and keep errors explicit and binding-appropriate at the wrapper layer.
Keep async behavior on the existing tokio-based model; bindings should preserve callback and future lifetimes rather than blocking or hiding async work unexpectedly.

Files:

  • crates/node/tests/event_sanitizers_tests.mjs
  • crates/node/tests/callback_error_tests.mjs
  • crates/node/tests/scope_local_tests.mjs
  • crates/node/tests/llm_tests.mjs
  • crates/node/tests/adaptive_tests.mjs
  • crates/node/tests/tools_tests.mjs
  • crates/node/src/types/mod.rs
  • crates/node/src/callable.rs
  • crates/node/src/api/mod.rs
crates/{python,ffi,node}/**/*

⚙️ CodeRabbit configuration file

crates/{python,ffi,node}/**/*: Treat binding changes as public API changes. Check for parity with the other language bindings, FFI ownership/lifetime safety,
callback error propagation, stable type conversion, and consistent async/stream semantics.
Flag changes that update one binding without corresponding tests or documentation for the same surface elsewhere.

Files:

  • crates/node/tests/event_sanitizers_tests.mjs
  • crates/node/tests/callback_error_tests.mjs
  • crates/node/tests/scope_local_tests.mjs
  • crates/node/tests/llm_tests.mjs
  • crates/node/tests/adaptive_tests.mjs
  • crates/node/tests/tools_tests.mjs
  • crates/node/src/types/mod.rs
  • crates/node/src/callable.rs
  • crates/node/src/api/mod.rs
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • crates/node/tests/event_sanitizers_tests.mjs
  • crates/node/tests/callback_error_tests.mjs
  • crates/node/tests/scope_local_tests.mjs
  • crates/node/tests/llm_tests.mjs
  • crates/node/tests/adaptive_tests.mjs
  • crates/node/tests/tools_tests.mjs
**/*.rs

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

**/*.rs: Any Rust change must run just test-rust
Any Rust change must run cargo fmt --all
Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for all FFI work since it is Rust work
Run just test-rust to validate FFI changes
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting on FFI work

When Rust files changed as part of Go work, also run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all when Rust files are changed as part of Node work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files are changed as part of Node work
Run just test-rust when Rust files are changed as part of Node work

When changing the core Rust runtime or Rust-facing API surface, format Rust code with cargo fmt (rustfmt defaults), keep cargo clippy -- -D warnings clean, and satisfy cargo deny check per deny.toml.

**/*.rs: If any Rust code changed, always run just test-rust.
If any Rust code changed, also run cargo fmt --all.
If any Rust code changed, also run cargo clippy --workspace --all-targets -- -D warnings.
For Rust changes headed for review, run cargo fmt --all and cargo clippy --workspace --all-targets -- -D warnings even if relying on pre-commit.

Files:

  • crates/node/src/types/mod.rs
  • crates/node/src/callable.rs
  • crates/node/src/api/mod.rs
**/*.{rs,py}

📄 CodeRabbit inference engine (AGENTS.md)

Follow binding naming conventions in Rust and Python: use snake_case.

Files:

  • crates/node/src/types/mod.rs
  • crates/node/src/callable.rs
  • crates/node/src/api/mod.rs
**/*.{rs,py,go,js,ts,c,h}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use language-appropriate naming conventions: Rust snake_case, C FFI exports prefixed nemo_relay_, Go PascalCase, Node.js camelCase, and Python snake_case.

Files:

  • crates/node/src/types/mod.rs
  • crates/node/src/callable.rs
  • crates/node/src/api/mod.rs
**/*.{rs,go,js,ts}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Add the SPDX license header to all Rust, Go, JavaScript, and TypeScript source files using the corresponding // comment form.

Files:

  • crates/node/src/types/mod.rs
  • crates/node/src/callable.rs
  • crates/node/src/api/mod.rs
{crates/**/src/**/*.rs,python/**/*.py}

📄 CodeRabbit inference engine (.agents/skills/maintain-dynamic-plugins/SKILL.md)

Do not add tests under src; Rust tests belong in crate tests/ trees, and Python SDK tests belong under python/tests.

Files:

  • crates/node/src/types/mod.rs
  • crates/node/src/callable.rs
  • crates/node/src/api/mod.rs
**/*.{rs,py,go,js,ts}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

If a language surface changed, always run that language's test target even when Rust core did not change.

Files:

  • crates/node/src/types/mod.rs
  • crates/node/src/callable.rs
  • crates/node/src/api/mod.rs
**/*.{rs,py,js,ts,tsx,go,java,kt,swift}

📄 CodeRabbit inference engine (.agents/skills/add-middleware/SKILL.md)

Add tests covering registration and duplicate names, deregistration and missing names, priority ordering, callback failure policy, scope-local inheritance and cleanup, event payload semantics, immutable mark and scope fields, and parity across affected bindings.

Files:

  • crates/node/src/types/mod.rs
  • crates/node/src/callable.rs
  • crates/node/src/api/mod.rs
{crates/python/src/py_api/mod.rs,python/nemo_relay/**/*.py,python/nemo_relay/**/*.pyi,go/nemo_relay/**/*.go,crates/node/src/api/**/*.rs}

📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)

Update the language-native bindings for every exposed surface in Python, Go, and Node.js.

Files:

  • crates/node/src/api/mod.rs
🔇 Additional comments (12)
crates/node/src/callable.rs (1)

17-17: LGTM!

Also applies to: 41-41, 88-107, 110-182, 213-235, 252-263, 274-288, 350-361, 409-424, 445-452, 467-478, 614-658

crates/node/src/types/mod.rs (1)

312-328: LGTM!

crates/node/src/api/mod.rs (2)

721-725: 📐 Maintainability & Code Quality

Confirm the required Rust, Node, and dynamic-plugin validation.

Please provide CI or local-run confirmation for:

  • cargo fmt --all
  • cargo clippy --workspace --all-targets -- -D warnings
  • just test-rust
  • The repository’s Node test target
  • The maintain-dynamic-plugins validation plan
  • uv run pre-commit run --all-files

As per coding guidelines, Rust changes require the listed Rust checks, language-surface changes require that language’s tests, dynamic-plugin changes require maintain-dynamic-plugins, and handoff requires the all-files pre-commit pass.

Source: Coding guidelines


81-81: LGTM!

Also applies to: 567-600, 765-811, 853-947, 987-987, 1115-1116, 1273-1304, 1334-1386, 1526-1527, 2383-2386, 2434-2440, 2456-2457, 2473-2474, 2489-2501, 2525-2532, 2548-2548, 2612-2685, 2707-2724, 2864-2867, 2925-2934, 2953-2954, 2971-2972, 2987-3002, 3032-3042, 3061-3061, 3138-3154, 3178-3194, 3217-3232, 3260-3281

crates/node/tests/adaptive_tests.mjs (1)

9-9: LGTM!

Also applies to: 170-202

crates/node/tests/callback_error_tests.mjs (1)

70-81: LGTM!

crates/node/tests/event_sanitizers_tests.mjs (1)

167-189: LGTM!

Also applies to: 245-270

crates/node/tests/llm_tests.mjs (1)

607-633: LGTM!

crates/node/tests/scope_local_tests.mjs (1)

208-223: LGTM!

Also applies to: 714-729

crates/node/tests/tools_tests.mjs (1)

30-31: LGTM!

Also applies to: 525-590, 677-701

docs/instrument-applications/advanced-guide.mdx (1)

195-202: LGTM!

docs/reference/event-sanitizers.mdx (1)

52-54: LGTM!

Comment thread crates/node/src/callable.rs Outdated
Comment thread crates/node/tests/llm_tests.mjs
Signed-off-by: Will Killian <wkillian@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug issue describes bug; PR fixes bug lang:js PR changes/introduces Javascript/Typescript code lang:rust PR changes/introduces Rust code size:L PR is large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant