Skip to content

test: reduce test execution time - #726

Merged
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
willkill07:wkk_test/reduce-test-execution-time
Aug 6, 2026
Merged

test: reduce test execution time#726
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
willkill07:wkk_test/reduce-test-execution-time

Conversation

@willkill07

@willkill07 willkill07 commented Aug 6, 2026

Copy link
Copy Markdown
Member

Overview

Reduce normal hermetic test execution time by building dynamic-plugin fixtures once per test command and reusing them across Rust, Python, FFI, and Go tests. The updated suites keep all observed individual tests below five seconds while preserving package-build coverage outside normal test cases.

  • 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 just build-test-plugin-fixtures and a stable, platform-specific fixture path contract under target/test-plugin-fixtures.
  • Prepare fixtures automatically in the Rust, Python, and Go test recipes; focused raw tests now fail quickly with preparation instructions when fixtures are missing.
  • Move the Python wheel/sdist/rebuild/import regression from pytest into package-python-plugin.
  • Make every Redis integration test honor NEMO_RELAY_RUN_REDIS_TESTS before connecting.
  • Reduce test-only real-time guards to five seconds, add pytest slow-duration reporting, and lower reusable Rust, Python, Node, and Go test-job limits from 120 to 30 minutes.
  • Document the fixture workflow and five-second test design expectation in contributor guidance and affected maintainer skills.
  • No public runtime, binding, ABI, or package API changes.

Validation:

  • just ci=true test-rust: 3,850 passed in 33.1s; slowest test 3.687s.
  • just ci=true test-python: 639 passed in 14.94s; slowest test 2.01s.
  • just test-python-plugin: 124 passed in 2.36s; Python worker round trip passed in 1.03s.
  • just ci=true test-go: passed; main package completed in 3.52s.
  • just test-node: 353 passed; slowest individual test 1.115s.
  • Focused native, worker, and FFI plugin suites completed in 0.95s, 1.53s, and 0.16s respectively; non-opted-in Redis tests skipped in effectively 0.00s.
  • just package-python-plugin
  • cargo fmt --all
  • cargo clippy --workspace --all-targets -- -D warnings
  • uv run pre-commit run --all-files
  • just docs

just ci=true test-node could not run locally because the installed executable reports Node 26.5.0, outside the repository's supported Node 24 toolchain, and the pinned c8/yargs coverage wrapper fails before starting tests. The underlying Node suite passes as reported above.

Where should the reviewer start?

Start with the shared fixture preparation in justfile, then review the native and worker consumers in crates/core/tests/integration/ and the package validation moved to scripts/validate_python_plugin_package.py.

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • Relates to: none

Summary by CodeRabbit

  • Tests

    • Dynamic plugin tests now use prebuilt fixtures, improving consistency and reducing test setup time.
    • Redis integration tests skip cleanly unless explicitly enabled.
    • Test and process timeouts were standardized at five seconds, helping failures surface sooner.
    • Added comprehensive validation for Python plugin packages, including wheels, source archives, rebuilding, installation, and generated bindings.
  • Documentation

    • Updated testing guidance and validation commands for plugin fixtures and package checks.
  • Chores

    • Reduced CI job limits from 120 minutes to 30 minutes.

Signed-off-by: Will Killian <wkillian@nvidia.com>
@willkill07
willkill07 requested review from a team as code owners August 6, 2026 03:17
@github-actions github-actions Bot added size:XL PR is extra large Test Test related lang:go PR changes/introduces Go code lang:python PR changes/introduces Python code lang:rust PR changes/introduces Rust code labels Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Test commands now build shared dynamic-plugin fixtures before execution. Plugin tests resolve those artifacts instead of compiling them at runtime. Python package validation is scripted, and CI and test timeouts are reduced or centralized.

Changes

Prepared plugin fixture workflow

Layer / File(s) Summary
Fixture build orchestration
justfile
The justfile builds native and worker fixtures, generates lockfiles, exports paths, and prepares fixtures for Rust, Python, and Go tests.
Prepared fixture test consumers
crates/core/tests/integration/*, crates/ffi/tests/integration/*, go/nemo_relay/*, python/tests/test_dynamic_plugin_host.py
Plugin tests resolve prebuilt fixtures from environment variables or repository output paths and validate that the artifacts exist.
Python package validation
scripts/validate_python_plugin_package.py, justfile, python/tests/plugin/test_package_build.py
Package validation now checks clean builds, wheels, source distributions, generated bindings, archive extraction, rebuilds, installation, and imports. The previous package build test file was removed.
Test runtime controls
.github/workflows/*, crates/*/tests/*, go/nemo_relay/*
Test synchronization and child-process timeouts use five seconds in the affected tests. Redis enablement is centralized, and CI test jobs use thirty-minute limits.
Validation guidance
.agents/skills/*, docs/contribute/testing-and-docs.mdx, docs/resources/support-and-faqs.mdx
Focused dynamic-plugin tests now require fixture preparation. Documentation also defines bounded timing and virtual-time testing requirements.

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

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 26.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title follows Conventional Commits format and accurately summarizes the test execution time reduction.
Description check ✅ Passed The description includes all required sections, explains the changes, identifies review starting points, and reports validation results.
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.

@github-actions

github-actions Bot commented Aug 6, 2026

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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/cli/tests/cli_tests.rs (1)

1469-1477: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep the child-process timeout messages aligned with the new deadline.

Both deadlines now expire after five seconds, but both panic messages still report ten seconds. This gives incorrect failure diagnostics. Update both messages or derive them from a shared timeout constant.

Proposed fix
-            panic!("child process did not exit within 10 seconds");
+            panic!("child process did not exit within 5 seconds");

Apply the same change to both child-wait paths.

Also applies to: 1526-1534

🤖 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/cli_tests.rs` around lines 1469 - 1477, Update both
child-process wait paths to make their timeout panic messages report the
configured five-second deadline instead of ten seconds. Apply the change in both
loops around child.try_wait(), preserving the existing kill and wait cleanup
behavior.
🤖 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 `@scripts/validate_python_plugin_package.py`:
- Around line 69-70: Update the validation flow in
scripts/validate_python_plugin_package.py to install the rebuilt wheel artifact
produced on lines 62-64 instead of using editable installation from
extracted_project. Keep the isolated Python environment and subsequent
nemo_relay_plugin._proto.plugin_worker_pb2_grpc import check, ensuring the
import resolves from the installed wheel rather than the source tree.

---

Outside diff comments:
In `@crates/cli/tests/cli_tests.rs`:
- Around line 1469-1477: Update both child-process wait paths to make their
timeout panic messages report the configured five-second deadline instead of ten
seconds. Apply the change in both loops around child.try_wait(), preserving the
existing kill and wait cleanup behavior.
🪄 Autofix

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: 5f72c456-23b5-4ee4-b105-0cd6902fa607

📥 Commits

Reviewing files that changed from the base of the PR and between 2b2d4d8 and abc1a9d.

⛔ Files ignored due to path filters (1)
  • crates/core/tests/fixtures/native_plugin/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (25)
  • .agents/skills/maintain-dynamic-plugins/SKILL.md
  • .agents/skills/test-ffi-surface/SKILL.md
  • .agents/skills/test-python-binding/SKILL.md
  • .agents/skills/test-rust-core/SKILL.md
  • .agents/skills/validate-change/SKILL.md
  • .github/workflows/ci_go.yml
  • .github/workflows/ci_node.yml
  • .github/workflows/ci_python.yml
  • .github/workflows/ci_rust.yml
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/cli/tests/cli_tests.rs
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • docs/contribute/testing-and-docs.mdx
  • go/nemo_relay/plugin_activation_test.go
  • justfile
  • python/tests/plugin/test_package_build.py
  • python/tests/test_dynamic_plugin_host.py
  • scripts/validate_python_plugin_package.py
💤 Files with no reviewable changes (1)
  • python/tests/plugin/test_package_build.py
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Check / Run
  • GitHub Check: Preview docs
🧰 Additional context used
📓 Path-based instructions (59)
.github/workflows/*.{yml,yaml}

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

.github/workflows/*.{yml,yaml}: Put permissions: on each job that needs token access.
Avoid workflow-level permissions: unless the repository intentionally centralizes them and the inheritance tradeoff is documented.
Keep third-party actions pinned to full commit SHAs and preserve the readable version comment after the SHA.
Prefer action-native or ecosystem-native caching over generic actions/cache.
Use lockfiles or dependency manifests to drive cache invalidation.
Keep deploy and publish permissions isolated to the jobs that need them.
Read both caller and callee when a workflow uses workflow_call.
Put release-tag validation in the earliest practical caller job when the pipeline has tag-based publish behavior.
Keep pure-Python plugin SDK packaging as a single wheel artifact instead of duplicating it across every platform matrix entry.
contents: read is the default minimum for checkout-based build, test, docs, and packaging jobs.
pull-requests: read is required for PR metadata lookup jobs.
pages: write and id-token: write should be limited to Pages deployment jobs and any caller that invokes them through a reusable workflow.
For reusable workflows, the caller must grant every permission the called jobs require; the callee cannot elevate beyond what the caller provides.
Prefer astral-sh/setup-uv cache support with cache-dependency-glob anchored to uv.lock.
Prefer Swatinem/rust-cache with explicit shared-key and workspaces instead of ad hoc target-directory caching.
Avoid caching generated outputs that can hide stale behavior unless the repo already relies on them deliberately.

Keep CI workflow commands and package references in GitHub Actions workflows aligned with the current install, build, and example commands.

Files:

  • .github/workflows/ci_rust.yml
  • .github/workflows/ci_python.yml
  • .github/workflows/ci_go.yml
  • .github/workflows/ci_node.yml
{justfile,.github/**/*,codecov.yml,**/Cargo.toml,python/**/*}

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

justfile, Codecov, and CI package/test workflows must include new plugin crates and packages.

Files:

  • .github/workflows/ci_rust.yml
  • .github/workflows/ci_python.yml
  • .github/workflows/ci_go.yml
  • .github/workflows/ci_node.yml
  • python/tests/test_dynamic_plugin_host.py
  • justfile
{.github/**,.gitlab-ci.yml,.pre-commit-config.yaml,justfile,scripts/**}

⚙️ CodeRabbit configuration file

{.github/**,.gitlab-ci.yml,.pre-commit-config.yaml,justfile,scripts/**}: Review automation changes for reproducibility, pinned versions where appropriate, secret handling, and consistency with the documented validation matrix.
Pay attention to commands that need generated native artifacts, FFI libraries, or platform-specific environment variables.

Files:

  • .github/workflows/ci_rust.yml
  • .github/workflows/ci_python.yml
  • .github/workflows/ci_go.yml
  • .github/workflows/ci_node.yml
  • scripts/validate_python_plugin_package.py
  • justfile
**/*.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

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

**/*.rs: Format Rust code with rustfmt defaults using cargo fmt.
Run cargo clippy -- -D warnings; all Rust warnings must be treated as errors.
Use Rust snake_case naming conventions.

**/*.rs: For Rust core, adaptive, plugin, worker, worker-proto, types, and shared runtime changes, run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings.
For changes involving crates/core, crates/adaptive, or shared runtime semantics, expand validation to the full binding matrix with validate-change; use narrower crate tests only as a local debugging loop.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
{crates/core,crates/adaptive}/**/*

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

Changes to crates/core or crates/adaptive must run the full language matrix

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
crates/core/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)

If the change touched crates/core or shared runtime semantics, also use validate-change for broader validation

Use Result<T> with FlowError in core runtime paths, keeping wrapper-layer errors explicit and binding-appropriate.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/core/tests/integration/native_plugin_tests.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/core/tests/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • scripts/validate_python_plugin_package.py
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • go/nemo_relay/plugin_activation_test.go
  • python/tests/test_dynamic_plugin_host.py
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
**/*.{rs,py,go,js,ts}

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

**/*.{rs,py,go,js,ts}: When observability configuration or lifecycle is exposed, keep FFI and Python, Go, and Node.js binding-native config objects and subscriber/exporter methods aligned in logical knobs and semantics.
Require every OpenTelemetry endpoint to have a type and nonblank destination; resolve header_env values at activation and reject missing, blank, or duplicate headers.
Concatenate layered ATOF sink, ATIF storage, and OpenTelemetry endpoint lists with higher-precedence entries first.
Preserve correct handling of mark events, start/end events, orphan cases, and span or trajectory fields derived from intended event data.
Run affected Rust tests and just test-rust when event fields change; run just test-python, just test-go, and just test-node when binding-native configuration or lifecycle changes.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • scripts/validate_python_plugin_package.py
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • go/nemo_relay/plugin_activation_test.go
  • python/tests/test_dynamic_plugin_host.py
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
**/*.{rs,py,js,jsx,ts,tsx,go,c,h,cc,cpp,md,toml,yml,yaml,sh}

📄 CodeRabbit inference engine (AGENTS.md)

Keep SPDX headers on source, documentation, scripts, and configuration files; the project is Apache-2.0.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • scripts/validate_python_plugin_package.py
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • go/nemo_relay/plugin_activation_test.go
  • python/tests/test_dynamic_plugin_host.py
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
**/*.{rs,py}

📄 CodeRabbit inference engine (AGENTS.md)

Use snake_case naming in Rust and Python.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • scripts/validate_python_plugin_package.py
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • python/tests/test_dynamic_plugin_host.py
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
crates/**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

crates/**/*.rs: Use Json = serde_json::Value in Rust-facing runtime APIs where existing code expects JSON payloads.
Treat Rust as the source of truth for runtime behavior; binding APIs should mirror Rust semantics unless a language-specific wrapper intentionally improves ergonomics.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
**/*.{rs,py,js,mjs,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Preserve the existing Tokio-based asynchronous model and callback/future lifetimes; do not unexpectedly block or hide async work in bindings.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • scripts/validate_python_plugin_package.py
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • python/tests/test_dynamic_plugin_host.py
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
**/*.{rs,py,go,js,jsx,ts,tsx,c,h}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.{rs,py,go,js,jsx,ts,tsx,c,h}: Run tests for every language affected by a change; changes to the core Rust crate require tests across all bindings.
Use SONAR_IGNORE_START / SONAR_IGNORE_END only for documented false positives, keep ignored blocks minimal, explain them with a comment, and obtain reviewer sign-off.
Preserve the layered architecture in which Rust provides the core runtime and C FFI, PyO3, and NAPI provide bindings that mirror the full API surface.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • scripts/validate_python_plugin_package.py
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • go/nemo_relay/plugin_activation_test.go
  • python/tests/test_dynamic_plugin_host.py
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
**/{test,tests}/**/*

📄 CodeRabbit inference engine (CONTRIBUTING.md)

When adding functionality, include tests in the appropriate test files for each affected language binding.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • python/tests/test_dynamic_plugin_host.py
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
**/*.{rs,py,go,js,jsx,ts,tsx,c,h,html,md,mdx,toml}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Include the appropriate SPDX copyright and Apache-2.0 license header in every source file.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • docs/contribute/testing-and-docs.mdx
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • scripts/validate_python_plugin_package.py
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • go/nemo_relay/plugin_activation_test.go
  • python/tests/test_dynamic_plugin_host.py
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
**/*

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*: Use release tags in raw Rust-compatible SemVer without a leading v; tags such as v0.1.0 are prohibited.
Use branch prefixes feat/, fix/, docs/, test/, or refactor/ according to the change purpose.
Every commit in a pull request must include a DCO Signed-off-by: sign-off.
Before submitting a pull request, ensure pre-commit hooks, relevant tests, target-specific builds, documentation updates, and a rebase on the latest main are complete.
Use commit messages in the form type: short description, with a valid type and a first line under 72 characters.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • docs/contribute/testing-and-docs.mdx
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • scripts/validate_python_plugin_package.py
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • go/nemo_relay/plugin_activation_test.go
  • python/tests/test_dynamic_plugin_host.py
  • justfile
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
**/*.{rs,py,toml,md}

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

Treat plugin Relay compatibility as normal SemVer; examples should use >=0.5,<1.0 unless a plugin intentionally declares a narrower range.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • scripts/validate_python_plugin_package.py
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • python/tests/test_dynamic_plugin_host.py
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
{crates,python}/**/*.{rs,py}

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

Runtime helpers must cover marks, scopes, continuations, and isolated scope stacks.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • python/tests/test_dynamic_plugin_host.py
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
crates/{core,adaptive}/**/*.{rs,toml}

📄 CodeRabbit inference engine (.agents/skills/test-rust-core/SKILL.md)

If a public API, event shape, middleware behavior, plugin semantics, or crates/core/crates/adaptive behavior changes, also run validate-change.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
**/*.{rs,toml}

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

When Rust code changes, run just test-rust, cargo fmt --all, and cargo clippy --workspace --all-targets -- -D warnings.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
crates/core/**/*

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

When crates/core changes, run the full validation matrix across Rust, Python, Go, and Node.js.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
**/*.{rs,h,hpp,c,cc,cpp,py,pyi,go,js,jsx,ts,tsx}

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

If an FFI surface changes, use test-ffi-surface and validate all affected language bindings.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • scripts/validate_python_plugin_package.py
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • go/nemo_relay/plugin_activation_test.go
  • python/tests/test_dynamic_plugin_host.py
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
**/*.{rs,py,pyi,go,js,jsx,ts,tsx}

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

**/*.{rs,py,pyi,go,js,jsx,ts,tsx}: If a language surface changes, always run that language's test target, even when Rust core is unchanged.
Format changed files with the language-native formatter before the final lint and test pass.
Changes affecting APIs, bindings, commands, paths, packaging, observability/adaptive semantics, or documented best practices require updating dependent maintainer or consumer skills in the same branch.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • scripts/validate_python_plugin_package.py
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • go/nemo_relay/plugin_activation_test.go
  • python/tests/test_dynamic_plugin_host.py
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
**/*.{toml,lock,json,md,mdx,py,pyi,rs,go,js,jsx,ts,tsx}

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

For large or public-facing changes, verify package names and paths, runnable examples, renamed public surfaces in manifests and docs, and dynamic plugin examples use compat.relay = ">=0.5,<1.0" unless intentionally narrower.

Files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • docs/contribute/testing-and-docs.mdx
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • scripts/validate_python_plugin_package.py
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • go/nemo_relay/plugin_activation_test.go
  • python/tests/test_dynamic_plugin_host.py
  • crates/cli/tests/coverage/agents/plugin_install_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/observability/atof_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/core/tests/integration/native_plugin_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/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • go/nemo_relay/plugin_activation_test.go
  • python/tests/test_dynamic_plugin_host.py
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
crates/adaptive/**

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

Keep crates/adaptive aligned with the canonical adaptive config schema, built-in section helpers, plugin lifecycle, and validation/report behavior.

Files:

  • crates/adaptive/tests/integration/redis_tests.rs
crates/adaptive/**/*

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

When crates/adaptive changes, run the full validation matrix across Rust, Python, Go, and Node.js.

Files:

  • crates/adaptive/tests/integration/redis_tests.rs
**/*.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)

**/*.mdx: In MDX files, top-of-file comments must use JSX comment delimiters ({/* and */}); do not use HTML comments for MDX SPDX headers.
New or regenerated MDX files must use {/* ... */} for top-of-file SPDX comments.

Files:

  • docs/contribute/testing-and-docs.mdx
{docs,examples}/**/*

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

Update docs and examples.

Files:

  • docs/contribute/testing-and-docs.mdx
**/*.{md,mdx,py,go,js,ts}

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

Examples and documentation must use each exporter's documented flush/deregister order before shutdown.

Files:

  • docs/contribute/testing-and-docs.mdx
  • scripts/validate_python_plugin_package.py
  • go/nemo_relay/plugin_activation_test.go
  • python/tests/test_dynamic_plugin_host.py
**/*.{md,mdx}

📄 CodeRabbit inference engine (AGENTS.md)

Use documented public APIs and stable wrapper commands in examples and user-facing documentation; do not rely on internal helpers.

**/*.{md,mdx}: Prefer the documented public API over internal shortcuts in documentation and examples.
Keep package names, repository references, and build commands current.
Contribution workflow documentation must require an issue before external contribution pull requests and note that NVIDIA contributors may use a GitHub or Linear issue.
Update entry-point documentation when examples or reading paths change.
Keep release-process and release-notes guidance in maintainer documentation such as RELEASING.md, rather than user-facing documentation pages or CHANGELOG.md.
Use stable user-facing wrappers at the scripts/ root in documentation and examples; reference namespaced helper paths only for internal maintenance documentation.
When detailed dynamic plugin guides exist, keep Rust native plugin examples, Python worker plugin examples, and grpc-v1 protocol details on separate pages.
Dynamic plugin manifests in documentation and examples should use compat.relay = ">=0.5,<1.0" unless deliberately narrower.
Render images, diagrams, tables, and other visual content at representative page widths, ensuring legibility and complete access without clipping; use responsive scaling, reflow, or overflow as appropriate and scope visual styling narrowly.
Dynamic plugin entry pages should link to native, worker, Rust example, Python example, and protocol pages when those pages exist.
Images, diagrams, tables, and custom visual content must remain legible and fully accessible at representative desktop and narrow page widths.
Release-policy documentation must point to GitHub Releases as the only release-history source of truth.
Run just docs when the documentation site changes; retain ./scripts/build-docs.sh html as the compatibility wrapper.

For docs-only changes, run targeted checks when commands, package names, or examples change; use `...

Files:

  • docs/contribute/testing-and-docs.mdx
docs/**/*.{md,mdx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Update relevant reference documentation when public behavior or APIs change.

When detailed dynamic-plugin guides exist, keep Rust native, Python worker, and grpc-v1 protocol details on separate pages.

Files:

  • docs/contribute/testing-and-docs.mdx
**/*.{md,mdx,rst}

📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-technical-docs.md)

**/*.{md,mdx,rst}: Use title case consistently for technical documentation headings and table headers; avoid quotation marks, ampersands, and exclamation marks in headings, while preserving official product, event, research, and whitepaper title case.
Format code elements, commands, parameters, package names, expressions, directories, file names, and paths in monospace; represent path placeholders with angle brackets inside monospace.
Format UI buttons, menus, fields, and labels in bold, and separate consecutive UI navigation labels with >.
Use quotation marks for error messages and strings when appropriate, italics for newly introduced terms and publication titles, and plain text for keyboard shortcuts.
Represent GitHub repositories with owner/repository link text, such as [NVIDIA/NeMo](link), rather than generic repository wording.
Introduce every code block with a complete sentence; do not let a code block complete or interrupt the grammar of surrounding prose; use syntax highlighting when supported.
Keep inline method, function, and class references consistent with nearby documentation; omit empty parentheses in prose when no call is shown.
Use descriptive link text matching the destination title when possible; avoid raw URLs, generic anchors, long-sentence links, and unnecessary links that distract from procedures.
Ensure lists have a complete lead-in sentence, more than one item, no more than two levels, parallel construction, one idea or action per item, and appropriate punctuation; use bullets for unordered items and numbers for ordered tasks.
Format definition lists with a bold term followed by a complete, parallel, punctuated definition.
Use tables for reference information, decision support, compatibility matrices, and comparable choices; flag one-row tables, missing captions or lead-ins, sentence-case headers where title case is expected, unexplained empty cells, and code or links that would be clearer as prose.
Write procedure steps as imperative ...

Files:

  • docs/contribute/testing-and-docs.mdx
docs/**/*.mdx

📄 CodeRabbit inference engine (.agents/skills/test-python-binding/SKILL.md)

For documentation-only changes, prefer contribute-docs plus targeted command checks.

Files:

  • docs/contribute/testing-and-docs.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/contribute/testing-and-docs.mdx
crates/{worker,worker-proto}/**/*.{rs,proto}

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

Worker plugins must use the grpc-v1 boundary. Keep worker protocol DTOs in JsonEnvelope; protobuf should own control flow rather than duplicate Relay data models.

Files:

  • crates/worker/tests/worker_sdk_tests.rs
{crates/plugin,crates/worker,python/plugin,examples}/**/*.{rs,py,md}

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

Document that native plugins are in-process and unsandboxed, while worker plugins provide process isolation but not a security sandbox.

Files:

  • crates/worker/tests/worker_sdk_tests.rs
crates/{plugin,worker,types}/**/*.{rs,py}

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

Manifest validation must cover plugin kind, compatibility, load contract, integrity, capability mismatch, and disabled-plugin behavior.

Files:

  • crates/worker/tests/worker_sdk_tests.rs
crates/worker/**/*.rs

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

Worker activation must cover process launch, token authentication, handshake, validation, declarative registration, proxy rollback, cancellation, and shutdown.

Files:

  • crates/worker/tests/worker_sdk_tests.rs
{crates/plugin,crates/worker,python/plugin}/**/*.{rs,py}

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

Rust and Python SDKs must expose every supported plugin registration surface.

Files:

  • crates/worker/tests/worker_sdk_tests.rs
crates/{plugin,worker,worker-proto,types}/**/*.{rs,toml}

📄 CodeRabbit inference engine (.agents/skills/test-rust-core/SKILL.md)

If native dynamic plugins, gRPC workers, nemo-relay-plugin, nemo-relay-worker, nemo-relay-worker-proto, or nemo-relay-types change, also use maintain-dynamic-plugins.

Files:

  • crates/worker/tests/worker_sdk_tests.rs
**/*.py

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.py: Lint Python with Ruff using rule sets E, F, W, and I.
Format Python with the Ruff formatter, using a 120-character line length and double quotes.
Run ty for Python type checking.
Use Python snake_case naming conventions.

Files:

  • scripts/validate_python_plugin_package.py
  • python/tests/test_dynamic_plugin_host.py
**/*.{py,pyi}

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

During iteration, prefer uv run pre-commit run --files <changed files...>; before review or handoff, run uv run pre-commit run --all-files.

Files:

  • scripts/validate_python_plugin_package.py
  • python/tests/test_dynamic_plugin_host.py
crates/ffi/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)

If the change touched crates/ffi, also use test-ffi-surface for validation

crates/ffi/**/*.rs: For changes primarily in the FFI crate, rebuild and validate the Rust FFI implementation, including formatting with cargo fmt --all, running just test-rust, and running cargo clippy --workspace --all-targets -- -D warnings.
When FFI implementation changes require fixture validation, run just build-test-plugin-fixtures and cargo test -p nemo-relay-ffi.

Files:

  • crates/ffi/tests/integration/plugin_activation_tests.rs
crates/ffi/**

📄 CodeRabbit inference engine (.agents/skills/test-ffi-surface/SKILL.md)

crates/ffi/**: When changing the NeMo Relay FFI surface, use the repository’s FFI build wrapper, just build-go, to rebuild the shared library and keep generated artifacts synchronized.
Keep FFI changes scoped to the bridge and ABI surface; use additional validation when the change affects shared runtime semantics.
If Go behavior changes as a result of an FFI change, also apply the Go binding test guidance.
If downstream consumers change, run the corresponding binding-specific validation in addition to FFI validation.

Files:

  • crates/ffi/tests/integration/plugin_activation_tests.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/ffi/tests/integration/plugin_activation_tests.rs
go/nemo_relay/**/*.go

📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)

go/nemo_relay/**/*.go: Format changed Go packages with cd go/nemo_relay && go fmt ./...
Run Go tests with just test-go to build and test the NeMo Relay Go binding
Use just build-go when you want an explicit build-only pass or need the artifact for other work
Use just ci=true test-go when you need the CI-style coverage and JUnit path
On macOS, set DYLD_LIBRARY_PATH to the ../../target/release directory before running the raw go test command directly

Files:

  • go/nemo_relay/plugin_activation_test.go
{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:

  • go/nemo_relay/plugin_activation_test.go
{python/nemo_relay/**/*.py,python/nemo_relay/**/*.pyi,go/nemo_relay/**/*.go}

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

Update language wrapper helpers such as Python wrapper modules, Python type stubs, and Go shorthand packages when the new behavior belongs in those helper layers.

Files:

  • go/nemo_relay/plugin_activation_test.go
go/nemo_relay/**

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

Keep shared plugin helpers in go/nemo_relay aligned with plugin registration, composition, and lifecycle behavior.

Files:

  • go/nemo_relay/plugin_activation_test.go
go/**/*.go

📄 CodeRabbit inference engine (AGENTS.md)

Use PascalCase for public Go APIs.

go/**/*.go: For Go binding changes, use test-go-binding and run the Go test target.
Go changes must be formatted with go fmt ./... and validated with just test-go.

Files:

  • go/nemo_relay/plugin_activation_test.go
**/*.go

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.go: Format Go code with gofmt.
Run go vet ./... for Go static analysis.
Use Go PascalCase naming conventions.

Files:

  • go/nemo_relay/plugin_activation_test.go
go/nemo_relay/**/*

⚙️ CodeRabbit configuration file

go/nemo_relay/**/*: Review Go binding changes for cgo memory ownership, race safety, callback cleanup, idiomatic exported APIs, and parity with Rust/FFI behavior.
Any API change should include focused Go tests and consider race-test behavior.

Files:

  • go/nemo_relay/plugin_activation_test.go
python/tests/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

Maintain test coverage for Python binding and wrapper changes with the Python test suite.

python/tests/**/*.py: Use pytest for Python tests.
Do not add @pytest.mark.asyncio to tests; async tests are automatically detected.
Do not add -> None return annotations to test functions.
When mocking a class, use unittest.mock.MagicMock or unittest.mock.AsyncMock, using spec when necessary; do not define a new mock class.
Prefix mocked class names with mock, not fake.
Prefer pytest fixtures over helper methods.
Place fixtures needed by multiple test files in a conftest.py file rather than repeating them.
Define fixtures using @pytest.fixture(name="<fixture_name>"[, scope="<scope>"]) and a <fixture_name>_fixture function; specify scope only when it is not function.
Prefer pytest.mark.parametrize over separate tests for different input types.

Files:

  • python/tests/test_dynamic_plugin_host.py
python/**/*.py

📄 CodeRabbit inference engine (.agents/skills/test-python-binding/SKILL.md)

python/**/*.py: Format changed Python wrapper and test files with uv run ruff format python python/plugin.
Run the full Python suite with just test-python before review.

Files:

  • python/tests/test_dynamic_plugin_host.py
python/tests/test_dynamic_plugin_host.py

📄 CodeRabbit inference engine (.agents/skills/test-python-binding/SKILL.md)

Run just build-test-plugin-fixtures before focused dynamic-plugin host tests.

Files:

  • python/tests/test_dynamic_plugin_host.py
python/**/*.{py,pyi}

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

For Python-only wrapper or binding changes, use test-python-binding and run the Python test target.

Files:

  • python/tests/test_dynamic_plugin_host.py
justfile

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

Keep justfile build, test, clean, version, and package recipes for plugin crates and packages aligned with the current packaging layout.

Files:

  • justfile
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T03:18:09.241Z
Learning: Run the prescribed plugin, Rust, Python, documentation, and integration-test validation commands; build test fixtures before raw focused native or worker tests, never inside an individual test case.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T03:18:09.241Z
Learning: Use the companion `karpathy-guidelines`, `validate-change`, `maintain-packaging`, and `contribute-docs` guidance when implementation, packaging, CI, or documentation changes are involved.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T03:18:19.524Z
Learning: Before editing, surface assumptions and define focused validation; keep implementation or review changes scoped.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T03:18:26.203Z
Learning: Use `karpathy-guidelines` alongside this skill; keep changes scoped, surface assumptions, and define focused validation before editing.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T03:18:26.203Z
Learning: If `crates/core`, `crates/adaptive`, or shared runtime semantics change, also use `validate-change`.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T03:18:31.457Z
Learning: Keep changes scoped, surface assumptions, and define focused validation before editing; use `karpathy-guidelines` alongside this guidance.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T03:18:31.457Z
Learning: If a change is isolated to one binding wrapper on top of unchanged Rust semantics, prefer that binding's build/test skill instead.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T03:18:42.784Z
Learning: Choose the smallest validation set that covers the surfaces touched by the change; do not use one fixed test list.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T03:18:42.784Z
Learning: Use `test-rust-core` for core runtime or shared semantic changes; it includes Rust validation and the full Rust, Python, Go, and Node.js matrix.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T03:18:42.784Z
Learning: Use the relevant layer-specific skills (`test-rust-core`, `test-python-binding`, `test-go-binding`, `test-node-binding`, `test-ffi-surface`, or `maintain-dynamic-plugins`) according to the changed surface.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T03:18:42.784Z
Learning: Before review or handoff, run the hygiene checks: `cargo fmt --all`, `cargo clippy --workspace --all-targets -- -D warnings`, and `uv run pre-commit run --all-files`.
📚 Learning: 2026-05-03T04:23:07.497Z
Learnt from: willkill07
Repo: NVIDIA/NeMo-Flow PR: 46
File: .github/workflows/ci_rust.yml:31-64
Timestamp: 2026-05-03T04:23:07.497Z
Learning: In GitHub Actions workflow YAML, it’s valid to conditionally disable a service container by setting the service container’s `image` to an empty string (`''`) via a matrix variable (e.g., `redis_service_image: ''`). This intentionally makes the runner skip service initialization for that matrix entry rather than failing the job. When reviewing workflows, don’t flag this as an error if the workflow uses an empty `image` to disable the service on specific matrix entries (e.g., OS-specific setups); verify the `image` is sourced from the matrix variable and that the service is only expected to be available when a non-empty image is provided.

Applied to files:

  • .github/workflows/ci_rust.yml
  • .github/workflows/ci_python.yml
  • .github/workflows/ci_go.yml
  • .github/workflows/ci_node.yml
📚 Learning: 2026-08-03T19:55:03.931Z
Learnt from: afourniernv
Repo: NVIDIA/NeMo-Relay PR: 558
File: crates/pii-redaction/src/rampart/mod.rs:265-274
Timestamp: 2026-08-03T19:55:03.931Z
Learning: In NeMo Relay first-party plugin registration helpers, treat the documented duplicate-registration `PluginError::RegistrationFailed` result from `register_plugin` as success when registration is intended to be idempotent. Do not locally reclassify this as `PluginError::Conflict`; changing the classification requires a core-wide review of the public API and FFI behavior.

Applied to files:

  • crates/core/tests/unit/observability/atof_tests.rs
  • crates/cli/tests/coverage/shared/agent_process_tests.rs
  • crates/adaptive/tests/integration/redis_tests.rs
  • crates/core/tests/integration/worker_plugin_tests.rs
  • crates/core/tests/unit/observability/plugin_component_tests.rs
  • crates/worker/tests/worker_sdk_tests.rs
  • crates/cli/tests/cli_tests.rs
  • crates/ffi/tests/integration/plugin_activation_tests.rs
  • crates/core/tests/integration/native_plugin_tests.rs
  • crates/cli/tests/coverage/agents/plugin_install_tests.rs
📚 Learning: 2026-07-28T20:33:25.156Z
Learnt from: willkill07
Repo: NVIDIA/NeMo-Relay PR: 572
File: go/nemo_relay/adaptive_runtime_test.go:214-238
Timestamp: 2026-07-28T20:33:25.156Z
Learning: When adding/adjusting Go unit tests for `BuildCacheRequestFacts` (request-ID validation and related request parsing), set `CacheRequestFactsInput.Provider` to a valid provider in all tests that are intended to isolate request-ID behavior—because `BuildCacheRequestFacts` does not validate `Provider`. Then add separate test coverage for malformed `AnnotatedRequest` JSON so JSON parsing failures are not conflated with `Provider`-related inputs.

Applied to files:

  • go/nemo_relay/plugin_activation_test.go
🪛 ast-grep (0.45.0)
scripts/validate_python_plugin_package.py

[error] 94-94: Command coming from incoming request
Context: subprocess.run(command, check=False, capture_output=True, text=True)
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(subprocess-from-request)


[error] 94-94: Use of unsanitized data to create processes
Context: subprocess.run(command, check=False, capture_output=True, text=True)
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(os-system-unsanitized-data)

🪛 Ruff (0.16.1)
scripts/validate_python_plugin_package.py

[warning] 43-43: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 52-52: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 54-54: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 58-58: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 91-91: Avoid specifying long messages outside the exception class

(TRY003)


[error] 95-95: subprocess call: check for execution of untrusted input

(S603)


[warning] 97-101: Avoid specifying long messages outside the exception class

(TRY003)

python/tests/test_dynamic_plugin_host.py

[warning] 64-64: Avoid specifying long messages outside the exception class

(TRY003)

🔇 Additional comments (19)
scripts/validate_python_plugin_package.py (1)

1-67: LGTM!

Also applies to: 73-105

justfile (2)

1218-1218: LGTM!

Also applies to: 1228-1228, 1276-1277, 1439-1439, 1857-1858


891-896: 🩺 Stability & Availability

No change required for fixture lockfiles. Both fixture Cargo.lock files are present and tracked, so cargo build --locked works in a clean checkout.

			> Likely an incorrect or invalid review comment.
crates/core/tests/integration/native_plugin_tests.rs (1)

780-780: LGTM!

Also applies to: 817-817, 1575-1575, 2048-2069

crates/core/tests/integration/worker_plugin_tests.rs (1)

7-7: LGTM!

Also applies to: 1321-1336

crates/ffi/tests/integration/plugin_activation_tests.rs (1)

8-8: LGTM!

Also applies to: 520-555

go/nemo_relay/plugin_activation_test.go (1)

34-35: LGTM!

Also applies to: 964-998

python/tests/test_dynamic_plugin_host.py (1)

52-65: LGTM!

Also applies to: 79-79, 116-116

crates/adaptive/tests/integration/redis_tests.rs (1)

58-60: LGTM!

Also applies to: 73-89

crates/cli/tests/cli_tests.rs (1)

28-28: LGTM!

Also applies to: 1610-1610, 4343-4343, 4595-4595

crates/cli/tests/coverage/agents/plugin_install_tests.rs (1)

1171-1171: LGTM!

crates/cli/tests/coverage/shared/agent_process_tests.rs (1)

216-216: LGTM!

crates/core/tests/unit/observability/atof_tests.rs (1)

1631-1636: LGTM!

crates/core/tests/unit/observability/plugin_component_tests.rs (1)

119-136: LGTM!

Also applies to: 198-199, 2864-2865, 3079-3080

crates/worker/tests/worker_sdk_tests.rs (1)

56-56: LGTM!

.agents/skills/maintain-dynamic-plugins/SKILL.md (1)

62-62: 🚀 Performance & Scalability

Confirm that fixture preparation is not repeated.

The affected guidance combines explicit just build-test-plugin-fixtures calls with canonical recipes that it says prepare fixtures automatically. Confirm that the helper reuses existing outputs. If it does not, keep explicit preparation only before raw Cargo or pytest consumers.

  • .agents/skills/maintain-dynamic-plugins/SKILL.md#L62-L62: Avoid rebuilding before later canonical test recipes.
  • .agents/skills/maintain-dynamic-plugins/SKILL.md#L74-L78: Align the automatic-preparation rule with the validation sequence.
  • .agents/skills/test-ffi-surface/SKILL.md#L39-L39: Confirm that the explicit build after just test-rust is necessary.
  • .agents/skills/test-rust-core/SKILL.md#L50-L50: Confirm that the later CI Rust recipe reuses the prepared fixtures.
  • .agents/skills/validate-change/SKILL.md#L81-L81: Avoid rebuilding before the following Rust recipes.
.agents/skills/test-python-binding/SKILL.md (1)

60-63: LGTM!

docs/contribute/testing-and-docs.mdx (1)

30-43: LGTM!

Also applies to: 63-63

.github/workflows/ci_rust.yml (1)

33-33: 🩺 Stability & Availability

Verify the 30-minute timeout against worst-case test duration.

All four test jobs changed from 120 to 30 minutes. Confirm recent successful runs stay below 30 minutes on the slowest supported platforms, including ARM and Windows, with fixture preparation, coverage, and enabled integrations.

  • .github/workflows/ci_rust.yml#L33-L33: Check the broad Rust workspace and service-backed matrix.
  • .github/workflows/ci_go.yml#L27-L27: Check the coverage-enabled Go matrix.
  • .github/workflows/ci_node.yml#L46-L46: Check Node coverage and optional OpenClaw checks.
  • .github/workflows/ci_python.yml#L46-L46: Check Python setup, coverage, and optional integration checks.

If any valid run exceeds 30 minutes, the timeout can terminate the job before it reports results.

Comment thread scripts/validate_python_plugin_package.py Outdated
@willkill07 willkill07 added this to the 0.8 milestone Aug 6, 2026
@willkill07 willkill07 self-assigned this Aug 6, 2026
Comment thread docs/contribute/testing-and-docs.mdx
Signed-off-by: Will Killian <wkillian@nvidia.com>
Signed-off-by: Will Killian <wkillian@nvidia.com>

@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: 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/cli_tests.rs`:
- Around line 1527-1535: Update the child-process test flow around the wait loop
and subsequent stdout/stderr collection to use a fresh deadline after the child
exits, rather than reusing the initial process-exit deadline. Preserve the
existing timeout for detecting a hung child, and give output draining its own
bounded timeout so recv_timeout retains the full collection budget.
🪄 Autofix

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: 53230bff-861a-4118-b718-514cfd3b71c1

📥 Commits

Reviewing files that changed from the base of the PR and between abc1a9d and 96d8f48.

📒 Files selected for processing (4)
  • crates/cli/tests/cli_tests.rs
  • docs/contribute/testing-and-docs.mdx
  • docs/resources/support-and-faqs.mdx
  • scripts/validate_python_plugin_package.py
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Check / Run
  • GitHub Check: Preview docs
🧰 Additional context used
📓 Path-based instructions (24)
**/*.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)

**/*.mdx: In MDX files, top-of-file comments must use JSX comment delimiters ({/* and */}); do not use HTML comments for MDX SPDX headers.
New or regenerated MDX files must use {/* ... */} for top-of-file SPDX comments.

Files:

  • docs/resources/support-and-faqs.mdx
  • docs/contribute/testing-and-docs.mdx
{docs,examples}/**/*

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

Update docs and examples.

Files:

  • docs/resources/support-and-faqs.mdx
  • docs/contribute/testing-and-docs.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.

**/*: Use release tags in raw Rust-compatible SemVer without a leading v; tags such as v0.1.0 are prohibited.
Use branch prefixes feat/, fix/, docs/, test/, or refactor/ according to the change purpose.
Every commit in a pull request must include a DCO Signed-off-by: sign-off.
Before submitting a pull request, ensure pre-commit hooks, relevant tests, target-specific builds, documentation updates, and a rebase on the latest main are complete.
Use commit messages in the form type: short description, with a valid type and a first line under 72 characters.

Files:

  • docs/resources/support-and-faqs.mdx
  • docs/contribute/testing-and-docs.mdx
  • scripts/validate_python_plugin_package.py
  • crates/cli/tests/cli_tests.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/resources/support-and-faqs.mdx
  • docs/contribute/testing-and-docs.mdx
**/*.{md,mdx}

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

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

Use documented public APIs and stable wrapper commands in examples and user-facing documentation; do not rely on internal helpers.

**/*.{md,mdx}: Prefer the documented public API over internal shortcuts in documentation and examples.
Keep package names, repository references, and build commands current.
Contribution workflow documentation must require an issue before external contribution pull requests and note that NVIDIA contributors may use a GitHub or Linear issue.
Update entry-point documentation when examples or reading paths change.
Keep release-process and release-notes guidance in maintainer documentation such as RELEASING.md, rather than user-facing documentation pages or CHANGELOG.md.
Use stable user-facing wrappers at the scripts/ root in documentation and examples; reference namespaced helper paths only for internal maintenance documentation.
When detailed dynamic plugin guides exist, keep Rust native plugin examples, Python worker plugin examples, and grpc-v1 protocol details on separate pages.
Dynamic plugin manifests in documentation and examples should use compat.relay = ">=0.5,<1.0" unless deliberately narrower.
Render images, diagrams, tables, and other visual content at representative page widths, ensuring legibility and complete access without clipping; use responsive scaling, reflow, or overflow as appropriate and scope visual styling narrowly.
Dynamic plugin entry pages should link to native, worker, Rust example, Python example, and protocol pages when those pages exist.
Images, diagrams, tables, and custom visual content must remain legible and fully accessible at representative desktop and narrow page widths.
Release-policy documentation must point to GitHub Releases as the only release-history source of truth.
Run just docs when the documentation site changes; retain ./scripts/build-docs.sh html as the compatibility wrapper.

Files:

  • docs/resources/support-and-faqs.mdx
  • docs/contribute/testing-and-docs.mdx
**/*.{md,mdx,py,go,js,ts}

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

Examples and documentation must use each exporter's documented flush/deregister order before shutdown.

Files:

  • docs/resources/support-and-faqs.mdx
  • docs/contribute/testing-and-docs.mdx
  • scripts/validate_python_plugin_package.py
docs/**/*.{md,mdx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Update relevant reference documentation when public behavior or APIs change.

Files:

  • docs/resources/support-and-faqs.mdx
  • docs/contribute/testing-and-docs.mdx
**/*.{rs,py,go,js,jsx,ts,tsx,c,h,html,md,mdx,toml}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Include the appropriate SPDX copyright and Apache-2.0 license header in every source file.

Files:

  • docs/resources/support-and-faqs.mdx
  • docs/contribute/testing-and-docs.mdx
  • scripts/validate_python_plugin_package.py
  • crates/cli/tests/cli_tests.rs
**/*.{md,mdx,rst}

📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-technical-docs.md)

**/*.{md,mdx,rst}: Use title case consistently for technical documentation headings and table headers; avoid quotation marks, ampersands, and exclamation marks in headings, while preserving official product, event, research, and whitepaper title case.
Format code elements, commands, parameters, package names, expressions, directories, file names, and paths in monospace; represent path placeholders with angle brackets inside monospace.
Format UI buttons, menus, fields, and labels in bold, and separate consecutive UI navigation labels with >.
Use quotation marks for error messages and strings when appropriate, italics for newly introduced terms and publication titles, and plain text for keyboard shortcuts.
Represent GitHub repositories with owner/repository link text, such as [NVIDIA/NeMo](link), rather than generic repository wording.
Introduce every code block with a complete sentence; do not let a code block complete or interrupt the grammar of surrounding prose; use syntax highlighting when supported.
Keep inline method, function, and class references consistent with nearby documentation; omit empty parentheses in prose when no call is shown.
Use descriptive link text matching the destination title when possible; avoid raw URLs, generic anchors, long-sentence links, and unnecessary links that distract from procedures.
Ensure lists have a complete lead-in sentence, more than one item, no more than two levels, parallel construction, one idea or action per item, and appropriate punctuation; use bullets for unordered items and numbers for ordered tasks.
Format definition lists with a bold term followed by a complete, parallel, punctuated definition.
Use tables for reference information, decision support, compatibility matrices, and comparable choices; flag one-row tables, missing captions or lead-ins, sentence-case headers where title case is expected, unexplained empty cells, and code or links that would be clearer as prose.
Write procedure steps as imperative ...

Files:

  • docs/resources/support-and-faqs.mdx
  • docs/contribute/testing-and-docs.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/resources/support-and-faqs.mdx
  • docs/contribute/testing-and-docs.mdx
**/*.{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.

**/*.{rs,py,go,js,ts}: When observability configuration or lifecycle is exposed, keep FFI and Python, Go, and Node.js binding-native config objects and subscriber/exporter methods aligned in logical knobs and semantics.
Require every OpenTelemetry endpoint to have a type and nonblank destination; resolve header_env values at activation and reject missing, blank, or duplicate headers.
Concatenate layered ATOF sink, ATIF storage, and OpenTelemetry endpoint lists with higher-precedence entries first.
Preserve correct handling of mark events, start/end events, orphan cases, and span or trajectory fields derived from intended event data.
Run affected Rust tests and just test-rust when event fields change; run just test-python, just test-go, and just test-node when binding-native configuration or lifecycle changes.

Files:

  • scripts/validate_python_plugin_package.py
  • crates/cli/tests/cli_tests.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:

  • scripts/validate_python_plugin_package.py
  • crates/cli/tests/cli_tests.rs
**/*.{rs,py,js,jsx,ts,tsx,go,c,h,cc,cpp,md,toml,yml,yaml,sh}

📄 CodeRabbit inference engine (AGENTS.md)

Keep SPDX headers on source, documentation, scripts, and configuration files; the project is Apache-2.0.

Files:

  • scripts/validate_python_plugin_package.py
  • crates/cli/tests/cli_tests.rs
**/*.{rs,py}

📄 CodeRabbit inference engine (AGENTS.md)

Use snake_case naming in Rust and Python.

Files:

  • scripts/validate_python_plugin_package.py
  • crates/cli/tests/cli_tests.rs
**/*.{rs,py,js,mjs,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Preserve the existing Tokio-based asynchronous model and callback/future lifetimes; do not unexpectedly block or hide async work in bindings.

Files:

  • scripts/validate_python_plugin_package.py
  • crates/cli/tests/cli_tests.rs
**/*.py

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.py: Lint Python with Ruff using rule sets E, F, W, and I.
Format Python with the Ruff formatter, using a 120-character line length and double quotes.
Run ty for Python type checking.
Use Python snake_case naming conventions.

Files:

  • scripts/validate_python_plugin_package.py
**/*.{rs,py,go,js,jsx,ts,tsx,c,h}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.{rs,py,go,js,jsx,ts,tsx,c,h}: Run tests for every language affected by a change; changes to the core Rust crate require tests across all bindings.
Use SONAR_IGNORE_START / SONAR_IGNORE_END only for documented false positives, keep ignored blocks minimal, explain them with a comment, and obtain reviewer sign-off.
Preserve the layered architecture in which Rust provides the core runtime and C FFI, PyO3, and NAPI provide bindings that mirror the full API surface.

Files:

  • scripts/validate_python_plugin_package.py
  • crates/cli/tests/cli_tests.rs
**/*.{rs,toml,md,py}

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

Treat plugin Relay compatibility as normal SemVer; use >=0.5,<1.0 in examples unless a plugin intentionally declares a narrower range.

Files:

  • scripts/validate_python_plugin_package.py
  • crates/cli/tests/cli_tests.rs
{.github/**,.gitlab-ci.yml,.pre-commit-config.yaml,justfile,scripts/**}

⚙️ CodeRabbit configuration file

{.github/**,.gitlab-ci.yml,.pre-commit-config.yaml,justfile,scripts/**}: Review automation changes for reproducibility, pinned versions where appropriate, secret handling, and consistency with the documented validation matrix.
Pay attention to commands that need generated native artifacts, FFI libraries, or platform-specific environment variables.

Files:

  • scripts/validate_python_plugin_package.py
**/*.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

**/*.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.

**/*.rs: Format Rust code with rustfmt defaults using cargo fmt.
Run cargo clippy -- -D warnings; all Rust warnings must be treated as errors.
Use Rust snake_case naming conventions.

Files:

  • crates/cli/tests/cli_tests.rs
crates/**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

crates/**/*.rs: Use Json = serde_json::Value in Rust-facing runtime APIs where existing code expects JSON payloads.
Treat Rust as the source of truth for runtime behavior; binding APIs should mirror Rust semantics unless a language-specific wrapper intentionally improves ergonomics.

Files:

  • crates/cli/tests/cli_tests.rs
**/{test,tests}/**/*

📄 CodeRabbit inference engine (CONTRIBUTING.md)

When adding functionality, include tests in the appropriate test files for each affected language binding.

Files:

  • crates/cli/tests/cli_tests.rs
{crates/**/*.rs,python/**/*.py}

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

plugins list, plugins inspect, plugins validate, and top-level doctor must report lifecycle, compatibility, and resolved dynamic-plugin/host configuration status without leaking secret configuration.

Files:

  • crates/cli/tests/cli_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/cli_tests.rs
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T14:02:36.415Z
Learning: Run the prescribed plugin, Rust, Python, documentation, and validation commands when validating dynamic-plugin changes; build test fixtures before focused native or worker tests, and never compile fixtures inside an individual test case.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T14:02:36.415Z
Learning: Use the companion `karpathy-guidelines`, `validate-change`, `maintain-packaging`, and `contribute-docs` guidance when implementation, packaging, CI, or documentation changes are involved.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T14:02:43.265Z
Learning: Use `karpathy-guidelines` alongside this skill for implementation or review work; keep changes scoped, surface assumptions, and define focused validation before editing.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T14:02:43.265Z
Learning: Run focused pytest tests first when the affected area is known, then run `just test-python` before review.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T14:02:43.265Z
Learning: Run `just test-python-plugin` and `just build-python-plugin` when the Python worker SDK changes.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T14:02:43.265Z
Learning: If Rust files change as part of Python work, run `cargo fmt --all`, `just test-rust`, and `cargo clippy --workspace --all-targets -- -D warnings`.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T14:02:43.265Z
Learning: Use `just build-python` for an explicit Python binding build-only pass.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T14:02:43.265Z
Learning: If the native Rust bridge changes, add and run the Rust crate tests for `nemo-relay-python` with `cargo test -p nemo-relay-python`.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T14:02:43.265Z
Learning: When `crates/core`, `crates/adaptive`, or shared runtime semantics change, also use `validate-change`.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T14:02:43.265Z
Learning: When `python/plugin` or worker protocol behavior changes, also use `maintain-dynamic-plugins`.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T14:02:43.265Z
Learning: For documentation-only changes, prefer `contribute-docs` plus targeted command checks.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T14:02:50.959Z
Learning: Keep changes scoped, surface assumptions, and define focused validation before editing; use `karpathy-guidelines` alongside this guidance.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-08-06T14:02:50.959Z
Learning: If a change is isolated to one binding wrapper while Rust semantics remain unchanged, prefer that binding's build/test skill.
📚 Learning: 2026-08-03T19:55:03.931Z
Learnt from: afourniernv
Repo: NVIDIA/NeMo-Relay PR: 558
File: crates/pii-redaction/src/rampart/mod.rs:265-274
Timestamp: 2026-08-03T19:55:03.931Z
Learning: In NeMo Relay first-party plugin registration helpers, treat the documented duplicate-registration `PluginError::RegistrationFailed` result from `register_plugin` as success when registration is intended to be idempotent. Do not locally reclassify this as `PluginError::Conflict`; changing the classification requires a core-wide review of the public API and FFI behavior.

Applied to files:

  • crates/cli/tests/cli_tests.rs
🔇 Additional comments (4)
crates/cli/tests/cli_tests.rs (1)

28-29: 🩺 Stability & Availability

Verify each five-second deadline under loaded CI.

The change reduces sidecar publication, child-process exit, port-closure, PID-file creation, and replacement-listener waits to five seconds. Run just test-rust and the affected CLI tests under slow CI conditions. If any valid path needs longer, keep a per-operation timeout or add a bounded grace period.

Also applies to: 1470-1478, 1611-1611, 4344-4344, 4596-4596

Source: Coding guidelines

scripts/validate_python_plugin_package.py (1)

64-65: LGTM!

Also applies to: 67-70

docs/contribute/testing-and-docs.mdx (1)

74-74: LGTM!

docs/resources/support-and-faqs.mdx (1)

514-514: LGTM!

Comment thread crates/cli/tests/cli_tests.rs
@willkill07

Copy link
Copy Markdown
Member Author

/merge

@rapids-bot
rapids-bot Bot merged commit 9a3443d into NVIDIA:main Aug 6, 2026
80 checks passed
@willkill07
willkill07 deleted the wkk_test/reduce-test-execution-time branch August 8, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lang:go PR changes/introduces Go code lang:python PR changes/introduces Python code lang:rust PR changes/introduces Rust code size:XL PR is extra large Test Test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants