test: expand core and CLI coverage#454
Conversation
Signed-off-by: Will Killian <wkillian@nvidia.com>
WalkthroughAdded CLI and core coverage tests, moved dynamic plugin host tests into an external module, and expanded local NeMo Guardrails tests for request rewriting and blocked rails. ChangesCoverage and test organization
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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/shared/events_tests.rs`:
- Around line 24-27: Extend the tests for value_at_any and string_at_any with
cases where both candidate paths are valid, asserting that each function returns
the value from the first candidate. Keep the existing missing/invalid fallback
assertions unchanged, and place the new cases alongside the current
candidate-precedence tests.
In `@crates/core/tests/coverage/error_tests.rs`:
- Around line 56-78: Run the required validation before handoff: cargo fmt
--all, cargo clippy --workspace --all-targets -- -D warnings, just test-rust,
validate-change, uv run pre-commit run --all-files, and the full
Rust/Python/Go/Node.js test matrix for this crates/core change.
In `@crates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.rs`:
- Around line 628-659: Update the LLM and tool blocking tests around
llm_call_execute and tool_call_execute to track each downstream callback with an
AtomicBool, setting it when invoked. After asserting the blocked-rail errors,
also assert both flags remain false, confirming the callbacks were never
executed while preserving the existing error assertions.
- Around line 528-534: Update reset_plugin_runtime() to return an RAII teardown
guard that restores the plugin configuration, shared runtime owner,
global_context, and thread scope stack when dropped. Ensure both affected tests
retain this guard until after test assertions and before test_mutex() is
released, including panic paths, and add or preserve coverage for cross-request
isolation where relevant.
🪄 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: e184a199-54a8-4c73-bb96-916fcc6ac179
📒 Files selected for processing (9)
crates/cli/src/events/mod.rscrates/cli/tests/coverage/shared/events_tests.rscrates/cli/tests/coverage/shared/file_io_tests.rscrates/cli/tests/coverage/shared/installer_tests.rscrates/core/src/plugin/dynamic/host.rscrates/core/tests/coverage/error_tests.rscrates/core/tests/unit/plugin_dynamic_host_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.rscrates/core/tests/unit/types_tests.rs
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
- GitHub Check: Check / Run
- GitHub Check: Preview docs
🧰 Additional context used
📓 Path-based instructions (18)
**/*.rs
📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)
**/*.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 workWhen changing the core Rust runtime or Rust-facing API surface, format Rust code with
cargo fmt(rustfmt defaults), keepcargo clippy -- -D warningsclean, and satisfycargo deny checkperdeny.toml.
**/*.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.
For Rust changes headed for review, runcargo fmt --allandcargo clippy --workspace --all-targets -- -D warningseven if relying on pre-commit.
Files:
crates/cli/src/events/mod.rscrates/core/tests/coverage/error_tests.rscrates/cli/tests/coverage/shared/events_tests.rscrates/core/tests/unit/plugin_dynamic_host_tests.rscrates/core/src/plugin/dynamic/host.rscrates/cli/tests/coverage/shared/installer_tests.rscrates/core/tests/unit/types_tests.rscrates/cli/tests/coverage/shared/file_io_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.rs
**/*.{rs,py}
📄 CodeRabbit inference engine (AGENTS.md)
Follow binding naming conventions in Rust and Python: use
snake_case.
Files:
crates/cli/src/events/mod.rscrates/core/tests/coverage/error_tests.rscrates/cli/tests/coverage/shared/events_tests.rscrates/core/tests/unit/plugin_dynamic_host_tests.rscrates/core/src/plugin/dynamic/host.rscrates/cli/tests/coverage/shared/installer_tests.rscrates/core/tests/unit/types_tests.rscrates/cli/tests/coverage/shared/file_io_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.rs
**/*.{rs,py,js,mjs,cjs,ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{rs,py,js,mjs,cjs,ts,tsx}: UseJson = serde_json::Valuein Rust-facing runtime APIs where the existing code expects JSON payloads.
UseResult<T>withFlowErrorin 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/cli/src/events/mod.rscrates/core/tests/coverage/error_tests.rscrates/cli/tests/coverage/shared/events_tests.rscrates/core/tests/unit/plugin_dynamic_host_tests.rscrates/core/src/plugin/dynamic/host.rscrates/cli/tests/coverage/shared/installer_tests.rscrates/core/tests/unit/types_tests.rscrates/cli/tests/coverage/shared/file_io_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.rs
**/*.{rs,py,go,js,ts,c,h}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Use language-appropriate naming conventions: Rust
snake_case, C FFI exports prefixednemo_relay_, GoPascalCase, Node.jscamelCase, and Pythonsnake_case.
Files:
crates/cli/src/events/mod.rscrates/core/tests/coverage/error_tests.rscrates/cli/tests/coverage/shared/events_tests.rscrates/core/tests/unit/plugin_dynamic_host_tests.rscrates/core/src/plugin/dynamic/host.rscrates/cli/tests/coverage/shared/installer_tests.rscrates/core/tests/unit/types_tests.rscrates/cli/tests/coverage/shared/file_io_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.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/cli/src/events/mod.rscrates/core/tests/coverage/error_tests.rscrates/cli/tests/coverage/shared/events_tests.rscrates/core/tests/unit/plugin_dynamic_host_tests.rscrates/core/src/plugin/dynamic/host.rscrates/cli/tests/coverage/shared/installer_tests.rscrates/core/tests/unit/types_tests.rscrates/cli/tests/coverage/shared/file_io_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.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 cratetests/trees, and Python SDK tests belong underpython/tests.
Files:
crates/cli/src/events/mod.rscrates/core/src/plugin/dynamic/host.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, usemaintain-dynamic-pluginsand 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, preferuv run pre-commit run --files <changed files...>.
Before review or handoff, runuv run pre-commit run --all-files.
Files:
crates/cli/src/events/mod.rscrates/core/tests/coverage/error_tests.rscrates/cli/tests/coverage/shared/events_tests.rscrates/core/tests/unit/plugin_dynamic_host_tests.rscrates/core/src/plugin/dynamic/host.rscrates/cli/tests/coverage/shared/installer_tests.rscrates/core/tests/unit/types_tests.rscrates/cli/tests/coverage/shared/file_io_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.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/cli/src/events/mod.rscrates/core/tests/coverage/error_tests.rscrates/cli/tests/coverage/shared/events_tests.rscrates/core/tests/unit/plugin_dynamic_host_tests.rscrates/core/src/plugin/dynamic/host.rscrates/cli/tests/coverage/shared/installer_tests.rscrates/core/tests/unit/types_tests.rscrates/cli/tests/coverage/shared/file_io_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.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/tests/coverage/error_tests.rscrates/core/tests/unit/plugin_dynamic_host_tests.rscrates/core/src/plugin/dynamic/host.rscrates/core/tests/unit/types_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.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
Files:
crates/core/tests/coverage/error_tests.rscrates/core/tests/unit/plugin_dynamic_host_tests.rscrates/core/src/plugin/dynamic/host.rscrates/core/tests/unit/types_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.rs
crates/{core,adaptive}/**/*
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
If
crates/coreorcrates/adaptivechanged, run the full validation matrix across Rust, Python, Go, and Node.js.
Files:
crates/core/tests/coverage/error_tests.rscrates/core/tests/unit/plugin_dynamic_host_tests.rscrates/core/src/plugin/dynamic/host.rscrates/core/tests/unit/types_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.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/tests/coverage/error_tests.rscrates/core/tests/unit/plugin_dynamic_host_tests.rscrates/core/src/plugin/dynamic/host.rscrates/core/tests/unit/types_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_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/core/tests/coverage/error_tests.rscrates/cli/tests/coverage/shared/events_tests.rscrates/core/tests/unit/plugin_dynamic_host_tests.rscrates/cli/tests/coverage/shared/installer_tests.rscrates/core/tests/unit/types_tests.rscrates/cli/tests/coverage/shared/file_io_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.rs
{crates/core/src/plugin/dynamic/**,crates/plugin/**,crates/worker/**,crates/worker-proto/**,crates/types/**,python/plugin/**,examples/rust-native-plugin/**,examples/python-grpc-worker-plugin/**,docs/build-plugins/**}
📄 CodeRabbit inference engine (.agents/skills/maintain-dynamic-plugins/SKILL.md)
Keep the stable boundary explicit: native plugins cross a C ABI, and worker plugins cross
grpc-v1.
Files:
crates/core/src/plugin/dynamic/host.rs
{crates/core/src/plugin/dynamic/**/*.rs,examples/rust-native-plugin/**/*.rs}
📄 CodeRabbit inference engine (.agents/skills/maintain-dynamic-plugins/SKILL.md)
Do not pass Rust runtime types, trait objects, futures, or allocator-owned strings across the native dynamic-library boundary.
Files:
crates/core/src/plugin/dynamic/host.rs
{crates/core/src/plugin/dynamic/**,examples/rust-native-plugin/**,examples/python-grpc-worker-plugin/**,docs/build-plugins/**}
📄 CodeRabbit inference engine (.agents/skills/maintain-dynamic-plugins/SKILL.md)
Native and worker plugins are trusted extensions; document that native plugins are in-process and unsandboxed, and worker plugins provide process isolation but not a security sandbox.
Files:
crates/core/src/plugin/dynamic/host.rs
{crates/core/src/plugin/dynamic/**/*.rs,crates/plugin/**/*.rs,crates/worker/**/*.rs,crates/worker-proto/**/*.rs,python/plugin/**/*.py}
📄 CodeRabbit inference engine (.agents/skills/maintain-dynamic-plugins/SKILL.md)
Manifest validation must cover kind, compatibility, load contract, integrity, capability mismatch, and disabled-plugin behavior.
Files:
crates/core/src/plugin/dynamic/host.rs
crates/core/src/plugin/dynamic/**/*.rs
📄 CodeRabbit inference engine (.agents/skills/maintain-dynamic-plugins/SKILL.md)
The native loader must keep libraries alive until registered callbacks are cleared and must deregister plugin kinds before unload.
Files:
crates/core/src/plugin/dynamic/host.rs
🔇 Additional comments (10)
crates/core/tests/coverage/error_tests.rs (1)
56-78: LGTM!crates/core/tests/unit/types_tests.rs (1)
22-25: LGTM!Also applies to: 563-571
crates/cli/src/events/mod.rs (1)
54-56: LGTM!crates/cli/tests/coverage/shared/events_tests.rs (1)
1-15: LGTM!crates/cli/tests/coverage/shared/file_io_tests.rs (1)
36-57: LGTM!Also applies to: 59-82
crates/cli/tests/coverage/shared/installer_tests.rs (1)
218-247: LGTM!crates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.rs (2)
21-31: LGTM!Also applies to: 506-526
536-665: 📐 Maintainability & Code QualityConfirm the required Rust and core validation completed.
Please verify this change passed
cargo fmt --all,cargo clippy --workspace --all-targets -- -D warnings,just test-rust,validate-change, the full Rust/Python/Go/Node matrix, and the final all-files pre-commit pass.As per coding guidelines, Rust changes require these Rust checks, and changes under
crates/corerequire broader validation.Source: Coding guidelines
crates/core/tests/unit/plugin_dynamic_host_tests.rs (1)
1-116: LGTM!crates/core/src/plugin/dynamic/host.rs (1)
400-401: 🎯 Functional Correctness
#[cfg(test)]is preserved on the relocatedmod testsIt stays out of non-test builds.> Likely an incorrect or invalid review comment.
Signed-off-by: Will Killian <wkillian@nvidia.com>
Signed-off-by: Will Killian <wkillian@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/core/tests/unit/plugins/nemo_guardrails/local_python_tests.rs`:
- Around line 542-545: Update both PluginRuntimeResetGuard::drop and
reset_plugin_runtime to handle the Result returned by clear_plugin_configuration
instead of discarding it. Ensure teardown failures are surfaced or otherwise
handled explicitly while preserving the remaining runtime and context reset
steps, so partial callback cleanup cannot silently contaminate later tests.
🪄 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: ad2f5a3a-f405-4c1c-a59f-a5fc24fde341
📒 Files selected for processing (2)
crates/cli/tests/coverage/shared/events_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.rs
📜 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)
**/*.rs
📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)
**/*.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 workWhen changing the core Rust runtime or Rust-facing API surface, format Rust code with
cargo fmt(rustfmt defaults), keepcargo clippy -- -D warningsclean, and satisfycargo deny checkperdeny.toml.
**/*.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.
For Rust changes headed for review, runcargo fmt --allandcargo clippy --workspace --all-targets -- -D warningseven if relying on pre-commit.
Files:
crates/cli/tests/coverage/shared/events_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.rs
**/*.{rs,py}
📄 CodeRabbit inference engine (AGENTS.md)
Follow binding naming conventions in Rust and Python: use
snake_case.
Files:
crates/cli/tests/coverage/shared/events_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.rs
**/*.{rs,py,js,mjs,cjs,ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{rs,py,js,mjs,cjs,ts,tsx}: UseJson = serde_json::Valuein Rust-facing runtime APIs where the existing code expects JSON payloads.
UseResult<T>withFlowErrorin 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/cli/tests/coverage/shared/events_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.rs
**/*.{rs,py,go,js,ts,c,h}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Use language-appropriate naming conventions: Rust
snake_case, C FFI exports prefixednemo_relay_, GoPascalCase, Node.jscamelCase, and Pythonsnake_case.
Files:
crates/cli/tests/coverage/shared/events_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.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/cli/tests/coverage/shared/events_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.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, usemaintain-dynamic-pluginsand 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, preferuv run pre-commit run --files <changed files...>.
Before review or handoff, runuv run pre-commit run --all-files.
Files:
crates/cli/tests/coverage/shared/events_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.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/cli/tests/coverage/shared/events_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_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/shared/events_tests.rscrates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.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/tests/unit/plugins/nemo_guardrails/local_python_tests.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
Files:
crates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.rs
crates/{core,adaptive}/**/*
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
If
crates/coreorcrates/adaptivechanged, run the full validation matrix across Rust, Python, Go, and Node.js.
Files:
crates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.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/tests/unit/plugins/nemo_guardrails/local_python_tests.rs
🔇 Additional comments (4)
crates/cli/tests/coverage/shared/events_tests.rs (2)
1-16: LGTM!Also applies to: 28-31, 51-54
28-31: 📐 Maintainability & Code QualityRun the required Rust validation before handoff.
Please run
cargo fmt --all,just test-rust,cargo clippy --workspace --all-targets -- -D warnings, anduv run pre-commit run --all-files. As per coding guidelines, Rust changes require these formatting, test, lint, and pre-commit checks.Also applies to: 51-54
Source: Coding guidelines
crates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.rs (2)
4-4: 📐 Maintainability & Code QualityRun the required Rust/core validation before handoff.
Verify
cargo fmt --all,cargo clippy --workspace --all-targets -- -D warnings,just test-rust,validate-change, the full Rust/Python/Go/Node matrix, anduv run pre-commit run --all-files.As per coding guidelines, Rust changes under
crates/corerequire these formatting, lint, test, validation, and pre-commit checks.Source: Coding guidelines
15-15: LGTM!Also applies to: 25-26, 571-571, 647-651, 653-680, 682-701
|
/merge |
Overview
Add focused core and CLI tests for deterministic error, plugin, event, file-I/O, and Guardrails execution paths.
Details
Where should the reviewer start?
crates/core/tests/unit/plugin_dynamic_host_tests.rsfor the dynamic plugin coverage and source-test relocation.crates/core/tests/unit/plugins/nemo_guardrails/local_python_tests.rsfor end-to-end local Guardrails coverage.crates/cli/tests/coverage/shared/events_tests.rsfor CLI event normalization coverage.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit