feat: support dynamic plugin discovery via plugins.toml#290
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (11)**/*.rs📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)
Files:
**/*config*.{rs,ts,py,go,js,json,yaml,yml}📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)
Files:
{crates/adaptive/**/*.rs,**/*test*.{rs,py,go,ts,js},**/*adaptive*test*.{rs,py,go,ts,js},docs/plugins/adaptive/**}📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)
Files:
**/{Cargo.toml,**/*.rs}📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Files:
**/*.{h,hpp,c,cpp,rs}📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Files:
**/*.{rs,toml}📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)
Files:
**/*.{rs,py,js,ts,tsx,jsx,go,sh,toml,yaml,yml,md}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{rs,py,go,js,ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
crates/**/*.rs📄 CodeRabbit inference engine (AGENTS.md)
Files:
**⚙️ CodeRabbit configuration file
Files:
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (1)
WalkthroughAdds first-class dynamic plugin support to ChangesDynamic Plugin Loading and Reporting
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/cli/src/config.rs`:
- Around line 1022-1032: The unconditional assignment on line 1031 of
plugin_toml.value to resolved.gateway.plugin_config causes a plugins.toml file
with only dynamic plugins (where plugin_toml.value is None) to erase any plugin
config previously loaded from config.toml. Guard the assignment so that
resolved.gateway.plugin_config is only updated when plugin_toml.value is Some,
preventing None values from overwriting existing configuration. The conflict
check already ensures both sources don't define config simultaneously, so this
guard will preserve config from config.toml when plugins.toml contains only
dynamic plugins.
🪄 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: 5663ca62-17de-47b7-abfe-4da8a74d1364
📒 Files selected for processing (6)
crates/cli/src/config.rscrates/cli/src/doctor.rscrates/cli/tests/coverage/config_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/tests/coverage/launcher_tests.rscrates/core/src/plugin.rs
📜 Review details
🧰 Additional context used
📓 Path-based instructions (15)
**/*.rs
📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)
Use
snake_casenaming convention for Rust identifiers (e.g.,nemo_relay_tool_call)
**/*.rs: Any Rust change must runjust test-rust
Any Rust change must runcargo fmt --all
Any Rust change must runcargo clippy --workspace --all-targets -- -D warnings
**/*.rs: Runcargo fmt --allfor all FFI work since it is Rust work
Runjust test-rustto validate FFI changes
Runcargo clippy --workspace --all-targets -- -D warningsto enforce strict linting on FFI workWhen Rust files changed as part of Go work, also run
cargo fmt --all,just test-rust, andcargo clippy --workspace --all-targets -- -D warnings
**/*.rs: Runcargo fmt --allwhen Rust files are changed as part of Node work
Runcargo clippy --workspace --all-targets -- -D warningswhen Rust files are changed as part of Node work
Runjust test-rustwhen Rust files are changed as part of Node work
**/*.rs: Runcargo fmt --allto format all Rust code
Runcargo clippy --workspace --all-targets -- -D warningsto enforce all clippy lints as errors
**/*.rs: Runcargo fmt --allwhen Rust files changed as part of WebAssembly work
Runcargo clippy --workspace --all-targets -- -D warningswhen Rust files changed as part of WebAssembly work
**/*.rs: If any Rust code changed, always runjust test-rust
If any Rust code changed, also runcargo fmt --all
If any Rust code changed, also runcargo clippy --workspace --all-targets -- -D warnings
Run Rust formatting withcargo fmt --all
Run Rust linting withcargo clippy --workspace --all-targets -- -D warnings
**/*.rs: Usecargo fmtfor Rust code formatting
Runcargo clippy -- -D warningsto lint Rust code and treat all warnings as errors
Use Rust snake_case naming convention for Rust identifiers
Include SPDX license header in all Rust source files using double-slash comment syntax
Validate Rust code withuv run pre-commit run --all-filesto enforce cargo fmt formatting check, cargo clippy lints, and cargo deny aud...
Files:
crates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/src/doctor.rscrates/core/src/plugin.rscrates/cli/src/config.rs
{crates/adaptive/**/*.rs,**/*test*.{rs,py,go,ts,js},**/*adaptive*test*.{rs,py,go,ts,js},docs/plugins/adaptive/**}
📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)
Maintain documented and tested validation and report behavior for adaptive surfaces
Files:
crates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rscrates/cli/tests/coverage/doctor_tests.rs
**/{Cargo.toml,**/*.rs}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Maintain consistency between Rust package names in
Cargo.tomland their actual usage across the codebase
Files:
crates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/src/doctor.rscrates/core/src/plugin.rscrates/cli/src/config.rs
**/*.{h,hpp,c,cpp,rs}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Ensure FFI header and library naming follows consistent conventions across platform-specific builds
Files:
crates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/src/doctor.rscrates/core/src/plugin.rscrates/cli/src/config.rs
**/*.{rs,toml}
📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)
Update Rust crate names and module prefixes during coordinated rename operations
Files:
crates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/src/doctor.rscrates/core/src/plugin.rscrates/cli/src/config.rs
**/*.{rs,py,js,ts,tsx,jsx,go,sh,toml,yaml,yml,md}
📄 CodeRabbit inference engine (AGENTS.md)
Keep SPDX headers on source, docs, scripts, and configuration files. The project is Apache-2.0.
Files:
crates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/src/doctor.rscrates/core/src/plugin.rscrates/cli/src/config.rs
**/*.{rs,py,go,js,ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Follow binding naming conventions: Rust and Python use
snake_case, C FFI exports prefixednemo_relay_, Go usesPascalCasefor public APIs, Node.js usescamelCase.
Files:
crates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/src/doctor.rscrates/core/src/plugin.rscrates/cli/src/config.rs
crates/**/*.rs
📄 CodeRabbit inference engine (AGENTS.md)
crates/**/*.rs: Keep async behavior on the existing tokio-based model. Bindings should preserve callback and future lifetimes rather than blocking or hiding async work unexpectedly.
UseJson = serde_json::Valuein Rust-facing runtime APIs for JSON payload handling.
Files:
crates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/src/doctor.rscrates/core/src/plugin.rscrates/cli/src/config.rs
**
⚙️ CodeRabbit configuration file
**:AGENTS.md
This file provides guidance to agents, including Claude Code and OpenAI Codex, when working in this repository.
Project Overview
NeMo Relay is a multi-language agent runtime framework for execution scopes, lifecycle events, middleware, plugins, and observability around tool and LLM calls. The core runtime is Rust. Primary supported bindings are Rust, Python, and Node.js. Go, WebAssembly, and the raw C FFI are experimental and source-first.
The shared runtime model is:
- Scope stacks decide where work belongs and which scope-local behavior is visible.
- Middleware registries decide what guardrails and intercepts run around managed calls.
- Plugins install reusable runtime behavior from configuration.
- Events record runtime behavior in ATOF form.
- Subscribers and exporters consume events in-process or export them to ATIF, OpenTelemetry, OpenInference, or other backends.
Repository Structure
The repository layout separates the Rust runtime, language bindings, documentation,
integration patches, and agent-facing skills.crates/ core/ # Rust core runtime crate, published as nemo-relay adaptive/ # Adaptive runtime primitives and plugin components python/ # PyO3 native extension for the Python package ffi/ # Raw C ABI layer used by downstream bindings such as Go node/ # NAPI Node.js binding and JavaScript/TypeScript entry points wasm/ # wasm-bindgen WebAssembly binding and JS wrappers python/ nemo_relay/ # Python wrapper package: scopes, tools, LLM, middleware, typed helpers, plugins, adaptive helpers tests/ # Python tests go/ nemo_relay/ # Experimental Go CGo binding and tests fern/ # Fern documentation site scripts/ # Stable wrappers and helper scripts; build/test/docs entry points live in justfile third_party/ # P...
Files:
crates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/src/doctor.rscrates/core/src/plugin.rscrates/cli/src/config.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/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rscrates/cli/tests/coverage/doctor_tests.rs
**/*config*.{rs,ts,py,go,js,json,yaml,yml}
📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)
Ensure dynamic config shape still matches the documented canonical model
Files:
crates/cli/tests/coverage/config_tests.rscrates/cli/src/config.rs
{crates/core,crates/adaptive}/**/*
📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)
Changes to
crates/coreorcrates/adaptivemust run the full language matrix
Files:
crates/core/src/plugin.rs
crates/core/**/*.rs
📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)
If the change touched
crates/coreor shared runtime semantics, also usevalidate-changefor broader validation
crates/core/**/*.rs: UseJson = serde_json::Valuein Rust-facing runtime APIs where the existing code expects JSON payloads.
UseResult<T>withFlowErrorin core runtime paths. Keep errors explicit and binding-appropriate at the wrapper layer.
Files:
crates/core/src/plugin.rs
crates/{core,adaptive}/**
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
If
crates/coreorcrates/adaptivechanged, run the full matrix across Rust, Python, Go, Node.js, and WebAssembly
Files:
crates/core/src/plugin.rs
crates/{core,adaptive}/**/*.rs
⚙️ CodeRabbit configuration file
crates/{core,adaptive}/**/*.rs: Review the Rust runtime for async correctness, scope isolation, middleware ordering, and event lifecycle regressions.
Pay close attention to task-local/thread-local scope propagation, callback lifetimes, stream finalization, and root_uuid isolation.
Public API changes should preserve existing behavior unless tests and docs show the intended migration path.
Files:
crates/core/src/plugin.rs
🔇 Additional comments (7)
crates/cli/tests/coverage/config_tests.rs (1)
25-56: LGTM!Also applies to: 409-442, 486-506, 557-576, 577-691
crates/cli/src/doctor.rs (2)
30-32: 📐 Maintainability & Code QualityConfirm required Rust validation commands were run for this change.
Please provide confirmation/output for:
just test-rustcargo fmt --allcargo clippy --workspace --all-targets -- -D warningsAs per coding guidelines: “Any Rust change must run
just test-rust”, “Any Rust change must runcargo fmt --all”, and “Any Rust change must runcargo clippy --workspace --all-targets -- -D warnings”.Source: Coding guidelines
89-98: LGTM!Also applies to: 159-159, 195-195, 217-260, 1407-1435
crates/cli/tests/coverage/doctor_tests.rs (1)
123-123: LGTM!Also applies to: 305-330, 405-405, 590-590, 606-634
crates/cli/tests/coverage/launcher_tests.rs (1)
248-248: LGTM!Also applies to: 325-325, 472-472, 498-498, 544-544, 577-577, 626-626, 702-702, 729-729, 772-772, 815-815, 851-851, 1046-1046, 1165-1165
crates/core/src/plugin.rs (1)
1124-1156: LGTM!crates/cli/src/config.rs (1)
486-518: LGTM!
fbf9a05 to
ee3385a
Compare
Signed-off-by: Alex Fournier <afournier@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/cli/tests/coverage/doctor_tests.rs`:
- Around line 309-329: The JSON coverage in
format_json_reports_discovered_dynamic_plugin_fields only asserts the
DynamicPluginHostConfigStatus::Present wire value; add a second assertion case
for the same report path using DynamicPluginHostConfigStatus::Absent so both
enum values are locked in the contract. Reuse the existing format_json,
serde_json parsing, and plugin["host_config_status"] checks to verify the absent
variant serializes to the expected string alongside the current present case.
🪄 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: 7d5d0052-fffb-4332-8977-c681d4ad272c
📒 Files selected for processing (6)
crates/cli/src/config.rscrates/cli/src/doctor.rscrates/cli/tests/coverage/config_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/tests/coverage/launcher_tests.rscrates/core/src/plugin.rs
📜 Review details
🧰 Additional context used
📓 Path-based instructions (15)
**/*.rs
📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)
Use
snake_casenaming convention for Rust identifiers (e.g.,nemo_relay_tool_call)
**/*.rs: Any Rust change must runjust test-rust
Any Rust change must runcargo fmt --all
Any Rust change must runcargo clippy --workspace --all-targets -- -D warnings
**/*.rs: Runcargo fmt --allfor all FFI work since it is Rust work
Runjust test-rustto validate FFI changes
Runcargo clippy --workspace --all-targets -- -D warningsto enforce strict linting on FFI workWhen Rust files changed as part of Go work, also run
cargo fmt --all,just test-rust, andcargo clippy --workspace --all-targets -- -D warnings
**/*.rs: Runcargo fmt --allwhen Rust files are changed as part of Node work
Runcargo clippy --workspace --all-targets -- -D warningswhen Rust files are changed as part of Node work
Runjust test-rustwhen Rust files are changed as part of Node work
**/*.rs: Runcargo fmt --allto format all Rust code
Runcargo clippy --workspace --all-targets -- -D warningsto enforce all clippy lints as errors
**/*.rs: Runcargo fmt --allwhen Rust files changed as part of WebAssembly work
Runcargo clippy --workspace --all-targets -- -D warningswhen Rust files changed as part of WebAssembly work
**/*.rs: If any Rust code changed, always runjust test-rust
If any Rust code changed, also runcargo fmt --all
If any Rust code changed, also runcargo clippy --workspace --all-targets -- -D warnings
Run Rust formatting withcargo fmt --all
Run Rust linting withcargo clippy --workspace --all-targets -- -D warnings
**/*.rs: Usecargo fmtfor Rust code formatting
Runcargo clippy -- -D warningsto lint Rust code and treat all warnings as errors
Use Rust snake_case naming convention for Rust identifiers
Include SPDX license header in all Rust source files using double-slash comment syntax
Validate Rust code withuv run pre-commit run --all-filesto enforce cargo fmt formatting check, cargo clippy lints, and cargo deny aud...
Files:
crates/core/src/plugin.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/src/doctor.rscrates/cli/tests/coverage/config_tests.rscrates/cli/src/config.rs
**/{Cargo.toml,**/*.rs}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Maintain consistency between Rust package names in
Cargo.tomland their actual usage across the codebase
Files:
crates/core/src/plugin.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/src/doctor.rscrates/cli/tests/coverage/config_tests.rscrates/cli/src/config.rs
**/*.{h,hpp,c,cpp,rs}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Ensure FFI header and library naming follows consistent conventions across platform-specific builds
Files:
crates/core/src/plugin.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/src/doctor.rscrates/cli/tests/coverage/config_tests.rscrates/cli/src/config.rs
{crates/core,crates/adaptive}/**/*
📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)
Changes to
crates/coreorcrates/adaptivemust run the full language matrix
Files:
crates/core/src/plugin.rs
**/*.{rs,toml}
📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)
Update Rust crate names and module prefixes during coordinated rename operations
Files:
crates/core/src/plugin.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/src/doctor.rscrates/cli/tests/coverage/config_tests.rscrates/cli/src/config.rs
crates/core/**/*.rs
📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)
If the change touched
crates/coreor shared runtime semantics, also usevalidate-changefor broader validation
crates/core/**/*.rs: UseJson = serde_json::Valuein Rust-facing runtime APIs where the existing code expects JSON payloads.
UseResult<T>withFlowErrorin core runtime paths. Keep errors explicit and binding-appropriate at the wrapper layer.
Files:
crates/core/src/plugin.rs
crates/{core,adaptive}/**
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
If
crates/coreorcrates/adaptivechanged, run the full matrix across Rust, Python, Go, Node.js, and WebAssembly
Files:
crates/core/src/plugin.rs
**/*.{rs,py,js,ts,tsx,jsx,go,sh,toml,yaml,yml,md}
📄 CodeRabbit inference engine (AGENTS.md)
Keep SPDX headers on source, docs, scripts, and configuration files. The project is Apache-2.0.
Files:
crates/core/src/plugin.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/src/doctor.rscrates/cli/tests/coverage/config_tests.rscrates/cli/src/config.rs
**/*.{rs,py,go,js,ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Follow binding naming conventions: Rust and Python use
snake_case, C FFI exports prefixednemo_relay_, Go usesPascalCasefor public APIs, Node.js usescamelCase.
Files:
crates/core/src/plugin.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/src/doctor.rscrates/cli/tests/coverage/config_tests.rscrates/cli/src/config.rs
crates/**/*.rs
📄 CodeRabbit inference engine (AGENTS.md)
crates/**/*.rs: Keep async behavior on the existing tokio-based model. Bindings should preserve callback and future lifetimes rather than blocking or hiding async work unexpectedly.
UseJson = serde_json::Valuein Rust-facing runtime APIs for JSON payload handling.
Files:
crates/core/src/plugin.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/src/doctor.rscrates/cli/tests/coverage/config_tests.rscrates/cli/src/config.rs
**
⚙️ CodeRabbit configuration file
**:AGENTS.md
This file provides guidance to agents, including Claude Code and OpenAI Codex, when working in this repository.
Project Overview
NeMo Relay is a multi-language agent runtime framework for execution scopes, lifecycle events, middleware, plugins, and observability around tool and LLM calls. The core runtime is Rust. Primary supported bindings are Rust, Python, and Node.js. Go, WebAssembly, and the raw C FFI are experimental and source-first.
The shared runtime model is:
- Scope stacks decide where work belongs and which scope-local behavior is visible.
- Middleware registries decide what guardrails and intercepts run around managed calls.
- Plugins install reusable runtime behavior from configuration.
- Events record runtime behavior in ATOF form.
- Subscribers and exporters consume events in-process or export them to ATIF, OpenTelemetry, OpenInference, or other backends.
Repository Structure
The repository layout separates the Rust runtime, language bindings, documentation,
integration patches, and agent-facing skills.crates/ core/ # Rust core runtime crate, published as nemo-relay adaptive/ # Adaptive runtime primitives and plugin components python/ # PyO3 native extension for the Python package ffi/ # Raw C ABI layer used by downstream bindings such as Go node/ # NAPI Node.js binding and JavaScript/TypeScript entry points wasm/ # wasm-bindgen WebAssembly binding and JS wrappers python/ nemo_relay/ # Python wrapper package: scopes, tools, LLM, middleware, typed helpers, plugins, adaptive helpers tests/ # Python tests go/ nemo_relay/ # Experimental Go CGo binding and tests fern/ # Fern documentation site scripts/ # Stable wrappers and helper scripts; build/test/docs entry points live in justfile third_party/ # P...
Files:
crates/core/src/plugin.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/src/doctor.rscrates/cli/tests/coverage/config_tests.rscrates/cli/src/config.rs
crates/{core,adaptive}/**/*.rs
⚙️ CodeRabbit configuration file
crates/{core,adaptive}/**/*.rs: Review the Rust runtime for async correctness, scope isolation, middleware ordering, and event lifecycle regressions.
Pay close attention to task-local/thread-local scope propagation, callback lifetimes, stream finalization, and root_uuid isolation.
Public API changes should preserve existing behavior unless tests and docs show the intended migration path.
Files:
crates/core/src/plugin.rs
{crates/adaptive/**/*.rs,**/*test*.{rs,py,go,ts,js},**/*adaptive*test*.{rs,py,go,ts,js},docs/plugins/adaptive/**}
📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)
Maintain documented and tested validation and report behavior for adaptive surfaces
Files:
crates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/tests/coverage/config_tests.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/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/tests/coverage/config_tests.rs
**/*config*.{rs,ts,py,go,js,json,yaml,yml}
📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)
Ensure dynamic config shape still matches the documented canonical model
Files:
crates/cli/tests/coverage/config_tests.rscrates/cli/src/config.rs
🔇 Additional comments (8)
crates/cli/tests/coverage/config_tests.rs (1)
25-56: LGTM!Also applies to: 409-442, 486-506, 557-575, 577-691
crates/cli/src/doctor.rs (2)
30-31: 📐 Maintainability & Code QualityPlease attach proof of required Rust validation commands.
I don’t see execution evidence in this diff for the required Rust checks (
just test-rust,cargo fmt --all, andcargo clippy --workspace --all-targets -- -D warnings). Please include results before merge.As per coding guidelines, “Any Rust change must run
just test-rust”, “Any Rust change must runcargo fmt --all”, and “Any Rust change must runcargo clippy --workspace --all-targets -- -D warnings.”Source: Coding guidelines
88-97: LGTM!Also applies to: 157-157, 193-193, 215-224, 227-252, 1398-1426
crates/cli/tests/coverage/doctor_tests.rs (1)
123-123: LGTM!Also applies to: 305-306, 403-403, 588-588, 604-630
crates/cli/tests/coverage/launcher_tests.rs (1)
248-248: LGTM!Also applies to: 325-325, 472-472, 498-498, 544-544, 577-577, 626-626, 702-702, 729-729, 772-772, 815-815, 851-851, 1046-1046, 1165-1165
crates/cli/src/config.rs (2)
1012-1022: Previously flagged overwrite is still present.Line 1021 still assigns
plugin_toml.valueunconditionally, so aplugins.tomlcontaining only dynamic plugins can replace an existingconfig.tomlplugin config withNone. Guard the assignment withif plugin_toml.value.is_some()as previously suggested.
4-13: LGTM!Also applies to: 480-508, 759-768, 923-1002, 1026-1106
crates/core/src/plugin.rs (1)
1120-1155: 📐 Maintainability & Code QualityConfirm the core-change validation matrix.
The helper extraction looks behavior-preserving, but this touches
crates/core, and the PR objective only mentions Rust tests/clippy/pre-commit. Please confirmvalidate-changeplus the affected binding matrix was run, or document why it is not applicable. As per coding guidelines,crates/core/**/*.rs: “If the change touchedcrates/coreor shared runtime semantics, also usevalidate-change”;{crates/core,crates/adaptive}/**: “Changes tocrates/coreorcrates/adaptivemust run the full language matrix.”Source: Coding guidelines
Signed-off-by: Alex Fournier <afournier@nvidia.com>
ee3385a to
9140401
Compare
|
/ok to test 9140401 |
There was a problem hiding this comment.
♻️ Duplicate comments (1)
crates/cli/tests/coverage/doctor_tests.rs (1)
308-329: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winAdd JSON assertion for
host_config_status = "absent"too.The test validates
"present"wire value but not"absent". Adding a second assertion case locks both enum values in the JSON contract.🤖 Prompt for 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. In `@crates/cli/tests/coverage/doctor_tests.rs` around lines 308 - 329, The test function format_json_reports_discovered_dynamic_plugin_fields only validates the JSON serialization when host_config_status is set to DynamicPluginHostConfigStatus::Present. Add a second DynamicPluginReferenceInfo entry to the report.dynamic_plugins vector with host_config_status set to DynamicPluginHostConfigStatus::Absent, then add corresponding assertions to verify that the second plugin entry in the parsed JSON has its host_config_status field equal to "absent". This ensures both enum variants of host_config_status are properly tested in the JSON contract.
🤖 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.
Duplicate comments:
In `@crates/cli/tests/coverage/doctor_tests.rs`:
- Around line 308-329: The test function
format_json_reports_discovered_dynamic_plugin_fields only validates the JSON
serialization when host_config_status is set to
DynamicPluginHostConfigStatus::Present. Add a second DynamicPluginReferenceInfo
entry to the report.dynamic_plugins vector with host_config_status set to
DynamicPluginHostConfigStatus::Absent, then add corresponding assertions to
verify that the second plugin entry in the parsed JSON has its
host_config_status field equal to "absent". This ensures both enum variants of
host_config_status are properly tested in the JSON contract.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 21ba38a0-c51b-4187-a5ea-70ba943982d9
📒 Files selected for processing (6)
crates/cli/src/config.rscrates/cli/src/doctor.rscrates/cli/tests/coverage/config_tests.rscrates/cli/tests/coverage/doctor_tests.rscrates/cli/tests/coverage/launcher_tests.rscrates/core/src/plugin.rs
📜 Review details
🧰 Additional context used
📓 Path-based instructions (15)
**/*.rs
📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)
Use
snake_casenaming convention for Rust identifiers (e.g.,nemo_relay_tool_call)
**/*.rs: Any Rust change must runjust test-rust
Any Rust change must runcargo fmt --all
Any Rust change must runcargo clippy --workspace --all-targets -- -D warnings
**/*.rs: Runcargo fmt --allfor all FFI work since it is Rust work
Runjust test-rustto validate FFI changes
Runcargo clippy --workspace --all-targets -- -D warningsto enforce strict linting on FFI workWhen Rust files changed as part of Go work, also run
cargo fmt --all,just test-rust, andcargo clippy --workspace --all-targets -- -D warnings
**/*.rs: Runcargo fmt --allwhen Rust files are changed as part of Node work
Runcargo clippy --workspace --all-targets -- -D warningswhen Rust files are changed as part of Node work
Runjust test-rustwhen Rust files are changed as part of Node work
**/*.rs: Runcargo fmt --allto format all Rust code
Runcargo clippy --workspace --all-targets -- -D warningsto enforce all clippy lints as errors
**/*.rs: Runcargo fmt --allwhen Rust files changed as part of WebAssembly work
Runcargo clippy --workspace --all-targets -- -D warningswhen Rust files changed as part of WebAssembly work
**/*.rs: If any Rust code changed, always runjust test-rust
If any Rust code changed, also runcargo fmt --all
If any Rust code changed, also runcargo clippy --workspace --all-targets -- -D warnings
Run Rust formatting withcargo fmt --all
Run Rust linting withcargo clippy --workspace --all-targets -- -D warnings
**/*.rs: Usecargo fmtfor Rust code formatting
Runcargo clippy -- -D warningsto lint Rust code and treat all warnings as errors
Use Rust snake_case naming convention for Rust identifiers
Include SPDX license header in all Rust source files using double-slash comment syntax
Validate Rust code withuv run pre-commit run --all-filesto enforce cargo fmt formatting check, cargo clippy lints, and cargo deny aud...
Files:
crates/cli/tests/coverage/doctor_tests.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rscrates/core/src/plugin.rscrates/cli/src/config.rscrates/cli/src/doctor.rs
{crates/adaptive/**/*.rs,**/*test*.{rs,py,go,ts,js},**/*adaptive*test*.{rs,py,go,ts,js},docs/plugins/adaptive/**}
📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)
Maintain documented and tested validation and report behavior for adaptive surfaces
Files:
crates/cli/tests/coverage/doctor_tests.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rs
**/{Cargo.toml,**/*.rs}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Maintain consistency between Rust package names in
Cargo.tomland their actual usage across the codebase
Files:
crates/cli/tests/coverage/doctor_tests.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rscrates/core/src/plugin.rscrates/cli/src/config.rscrates/cli/src/doctor.rs
**/*.{h,hpp,c,cpp,rs}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Ensure FFI header and library naming follows consistent conventions across platform-specific builds
Files:
crates/cli/tests/coverage/doctor_tests.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rscrates/core/src/plugin.rscrates/cli/src/config.rscrates/cli/src/doctor.rs
**/*.{rs,toml}
📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)
Update Rust crate names and module prefixes during coordinated rename operations
Files:
crates/cli/tests/coverage/doctor_tests.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rscrates/core/src/plugin.rscrates/cli/src/config.rscrates/cli/src/doctor.rs
**/*.{rs,py,js,ts,tsx,jsx,go,sh,toml,yaml,yml,md}
📄 CodeRabbit inference engine (AGENTS.md)
Keep SPDX headers on source, docs, scripts, and configuration files. The project is Apache-2.0.
Files:
crates/cli/tests/coverage/doctor_tests.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rscrates/core/src/plugin.rscrates/cli/src/config.rscrates/cli/src/doctor.rs
**/*.{rs,py,go,js,ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Follow binding naming conventions: Rust and Python use
snake_case, C FFI exports prefixednemo_relay_, Go usesPascalCasefor public APIs, Node.js usescamelCase.
Files:
crates/cli/tests/coverage/doctor_tests.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rscrates/core/src/plugin.rscrates/cli/src/config.rscrates/cli/src/doctor.rs
crates/**/*.rs
📄 CodeRabbit inference engine (AGENTS.md)
crates/**/*.rs: Keep async behavior on the existing tokio-based model. Bindings should preserve callback and future lifetimes rather than blocking or hiding async work unexpectedly.
UseJson = serde_json::Valuein Rust-facing runtime APIs for JSON payload handling.
Files:
crates/cli/tests/coverage/doctor_tests.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rscrates/core/src/plugin.rscrates/cli/src/config.rscrates/cli/src/doctor.rs
**
⚙️ CodeRabbit configuration file
**:AGENTS.md
This file provides guidance to agents, including Claude Code and OpenAI Codex, when working in this repository.
Project Overview
NeMo Relay is a multi-language agent runtime framework for execution scopes, lifecycle events, middleware, plugins, and observability around tool and LLM calls. The core runtime is Rust. Primary supported bindings are Rust, Python, and Node.js. Go, WebAssembly, and the raw C FFI are experimental and source-first.
The shared runtime model is:
- Scope stacks decide where work belongs and which scope-local behavior is visible.
- Middleware registries decide what guardrails and intercepts run around managed calls.
- Plugins install reusable runtime behavior from configuration.
- Events record runtime behavior in ATOF form.
- Subscribers and exporters consume events in-process or export them to ATIF, OpenTelemetry, OpenInference, or other backends.
Repository Structure
The repository layout separates the Rust runtime, language bindings, documentation,
integration patches, and agent-facing skills.crates/ core/ # Rust core runtime crate, published as nemo-relay adaptive/ # Adaptive runtime primitives and plugin components python/ # PyO3 native extension for the Python package ffi/ # Raw C ABI layer used by downstream bindings such as Go node/ # NAPI Node.js binding and JavaScript/TypeScript entry points wasm/ # wasm-bindgen WebAssembly binding and JS wrappers python/ nemo_relay/ # Python wrapper package: scopes, tools, LLM, middleware, typed helpers, plugins, adaptive helpers tests/ # Python tests go/ nemo_relay/ # Experimental Go CGo binding and tests fern/ # Fern documentation site scripts/ # Stable wrappers and helper scripts; build/test/docs entry points live in justfile third_party/ # P...
Files:
crates/cli/tests/coverage/doctor_tests.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rscrates/core/src/plugin.rscrates/cli/src/config.rscrates/cli/src/doctor.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/cli/tests/coverage/doctor_tests.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/config_tests.rs
**/*config*.{rs,ts,py,go,js,json,yaml,yml}
📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)
Ensure dynamic config shape still matches the documented canonical model
Files:
crates/cli/tests/coverage/config_tests.rscrates/cli/src/config.rs
{crates/core,crates/adaptive}/**/*
📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)
Changes to
crates/coreorcrates/adaptivemust run the full language matrix
Files:
crates/core/src/plugin.rs
crates/core/**/*.rs
📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)
If the change touched
crates/coreor shared runtime semantics, also usevalidate-changefor broader validation
crates/core/**/*.rs: UseJson = serde_json::Valuein Rust-facing runtime APIs where the existing code expects JSON payloads.
UseResult<T>withFlowErrorin core runtime paths. Keep errors explicit and binding-appropriate at the wrapper layer.
Files:
crates/core/src/plugin.rs
crates/{core,adaptive}/**
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
If
crates/coreorcrates/adaptivechanged, run the full matrix across Rust, Python, Go, Node.js, and WebAssembly
Files:
crates/core/src/plugin.rs
crates/{core,adaptive}/**/*.rs
⚙️ CodeRabbit configuration file
crates/{core,adaptive}/**/*.rs: Review the Rust runtime for async correctness, scope isolation, middleware ordering, and event lifecycle regressions.
Pay close attention to task-local/thread-local scope propagation, callback lifetimes, stream finalization, and root_uuid isolation.
Public API changes should preserve existing behavior unless tests and docs show the intended migration path.
Files:
crates/core/src/plugin.rs
🔇 Additional comments (15)
crates/core/src/plugin.rs (1)
1124-1138: LGTM!Also applies to: 1140-1156
crates/cli/src/config.rs (1)
4-13: LGTM!Also applies to: 483-508, 765-765, 923-942, 953-1026, 1028-1108
crates/cli/tests/coverage/config_tests.rs (1)
25-56: LGTM!Also applies to: 409-442, 486-506, 557-574, 577-807, 860-897
crates/cli/src/doctor.rs (7)
30-31: LGTM!
88-96: LGTM!
157-157: LGTM!
193-193: LGTM!
215-224: LGTM!
227-251: LGTM!
1398-1426: LGTM!crates/cli/tests/coverage/doctor_tests.rs (4)
123-123: LGTM!
305-306: LGTM!
403-403: LGTM!Also applies to: 588-588
604-634: LGTM!crates/cli/tests/coverage/launcher_tests.rs (1)
248-248: LGTM!Also applies to: 325-325, 472-472, 498-498, 544-544, 577-577, 626-626, 702-702, 729-729, 772-772, 815-815, 851-851, 1046-1046, 1165-1165
Signed-off-by: Alex Fournier <afournier@nvidia.com>
|
/ok to test 3c29bec |
|
/merge |
Overview
Support manifest-backed dynamic plugin discovery through
plugins.tomlwithout turningplugins.tomlinto a second plugin contract.Details
[[plugins.dynamic]]parsing to the CLI config loadermanifestand derive canonicalplugin.idfromrelay-plugin.toml[plugins.dynamic.config]while rejecting plugin-owned and lifecycle fields inplugins.tomlplugins.tomlsourcesPluginConfigpath so existingcomponentsbehavior is preservedResolvedConfigandnemo-relay doctorhuman/JSON reportingplugins.tomlmerge semantics in core so the CLI does not duplicate merge logicValidation run:
just test-rustcargo clippy --workspace --all-targets -- -D warningscargo test -p nemo-relay-cli config::tests -- --nocapturecargo test -p nemo-relay-cli doctor::tests::format_human_reports_discovered_dynamic_plugins_in_configuration -- --nocapturecargo test -p nemo-relay-cli doctor::tests::format_json_is_stable_and_versioned -- --nocapturecargo test -p nemo-relay-cli doctor::tests::format_json_reports_discovered_dynamic_plugin_fields -- --nocaptureuv run pre-commit run --files crates/cli/src/config.rs crates/cli/src/doctor.rs crates/cli/tests/coverage/config_tests.rs crates/cli/tests/coverage/doctor_tests.rs crates/cli/tests/coverage/launcher_tests.rs crates/core/src/plugin.rsWhere should the reviewer start?
Start in
crates/cli/src/config.rs, then reviewcrates/cli/src/doctor.rsfor the reporting surface andcrates/cli/tests/coverage/config_tests.rsfor the newplugins.dynamiccontract coverage.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit
plugins.tomlvia manifest references, including resolved dynamic plugin details and enforcement of globalplugin_iduniqueness.doctorcommand to display dynamic plugins in both JSON and human-readable output, including whether host configuration is available.doctoroutput formatting.