Skip to content

fix: layer Relay configuration by priority - #584

Merged
rapids-bot[bot] merged 18 commits into
NVIDIA:mainfrom
bbednarski9:fix/layer-plugin-config-precedence
Jul 30, 2026
Merged

fix: layer Relay configuration by priority#584
rapids-bot[bot] merged 18 commits into
NVIDIA:mainfrom
bbednarski9:fix/layer-plugin-config-precedence

Conversation

@bbednarski9

@bbednarski9 bbednarski9 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Overview

Layer Relay's base and plugin configuration files using one consistent precedence model:

explicit file, otherwise XDG user → nearest project → system

System configuration is applied last and has the highest file-level priority. An explicit file replaces only its ambient XDG user counterpart; it does not suppress project or system policy. CLI flags, environment variables, and inline/programmatic plugin configuration remain above the file layers.

  • 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

  • Apply the same explicit-or-user → project → system discovery order to both config.toml and plugins.toml.
  • Keep the persistent MCP sidecar's existing user-only behavior; project discovery remains suppressed there.
  • Preserve recursive object overlays and higher-first list aggregation.
  • Use the exact configured upstream URL as the OpenAI or Anthropic endpoint identity:
    • an unchanged URL can inherit lower-layer authorization;
    • changing the URL clears inherited authorization unless the higher layer supplies replacement credentials.
  • Use the exact configured logging sink path as sink identity:
    • distinct paths aggregate in system, project, then explicit-or-user order;
    • matching paths recursively overlay into one effective sink;
    • path aliases such as relay.log and ./relay.log remain distinct.
  • Continue aggregating distinct plugin component kinds, recursively overlaying same-kind objects, and placing inline/programmatic plugin configuration above all file layers.
  • Canonicalize plugin candidate paths, load each physical plugin file once, and retain the highest-layer occurrence for source reporting.
  • Keep the config and plugin editors targeted at one selected layer while runtime resolution continues to compose all applicable layers.
  • Update doctor to report an explicit base file separately from workspace, XDG user, and system layers.
  • Document the intentional compatibility change, merge examples, identity rules, and editor targets.

The follow-up behavior is separated into three signed-off commits after the original plugin-layering commit: base configuration precedence, upstream credential identity, and logging sink identity.

This branch was rebased onto current main after PR #583's squash merge. It contains only the four commits unique to this contribution, and a range-diff confirmed that their patches are unchanged.

Validation on the current head:

  • cargo test -p nemo-relay-cli — 1,136 unit, 12 architecture, and 89 CLI integration tests passed
  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • just test-rust
  • just test-python — 564 tests passed
  • just test-node — 294 tests passed
  • just test-go
  • just test-python-plugin — 125 tests passed at 97% coverage, plus the Python worker integration
  • just docs — passed with the expected unauthenticated Fern redirect warning
  • uv run pre-commit run --all-files, with only attributions-rust skipped because it produces an unrelated baseline attribution rewrite

Where should the reviewer start?

Start with crates/cli/src/configuration/mod.rs, which contains base-file source discovery, recursive TOML merging, upstream credential identity, and logging sink identity. Then review crates/core/src/plugin.rs for shared plugin ordering and physical-file deduplication. The primary regressions are in crates/cli/tests/coverage/shared/config_tests.rs, crates/core/tests/unit/plugin_tests.rs, and crates/cli/tests/coverage/shared/setup_tests.rs.

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

Summary by CodeRabbit

  • New Features
    • Applied consistent configuration layering precedence across runtime and plugins (explicit/user → project → system), including editor plugin targeting behavior.
    • Added explicit plugin config path handling throughout dynamic plugin lifecycle/launcher.
    • Deduplicated plugins.toml loading inputs (including symlink aliases) and adjusted default plugin search order (user → nearest project → system).
    • Improved upstream/provider overrides by replacing base URLs and clearing inherited auth when identity changes.
  • Bug Fixes
    • Doctor diagnostics and exit codes now correctly reflect explicit --config as replaced/active (including warn/fail rendering).
  • Documentation
    • Updated CLI and plugin/docs coverage, including observability and operational logging layering/merge semantics.
  • Tests
    • Expanded layered config, plugin edit/lifecycle, alias deduplication, and logging sink aggregation coverage; strengthened doctor failure assertions for invalid explicit configs.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Configuration discovery now layers explicit-or-user, project, and system files. Plugin paths are deduplicated by physical identity, gateway merges handle upstream credentials and logging sinks, lifecycle operations use explicit plugin targets, editor targeting reflects those paths, and diagnostics expose explicit-layer status.

Changes

Configuration Layering

Layer / File(s) Summary
Config discovery and plugin loading
crates/cli/src/configuration/mod.rs, crates/core/src/plugin.rs, crates/cli/tests/coverage/shared/config_tests.rs, crates/core/tests/unit/plugin_tests.rs, docs/...
Configuration and plugin paths preserve project and system layers around explicit paths, follow revised precedence, and deduplicate physical plugin files.
Gateway merge semantics
crates/cli/src/configuration/mod.rs, crates/cli/tests/coverage/shared/config_tests.rs, docs/nemo-relay-cli/basic-usage.mdx, docs/reference/operational-logging.mdx
Upstream credentials are cleared when base URL identity changes, and logging sinks merge by exact path with recursive overlays.
Dynamic plugin lifecycle configuration
crates/cli/src/plugins/lifecycle/*, crates/cli/src/process/launcher.rs, crates/cli/src/commands/mod.rs, crates/cli/tests/coverage/shared/plugins_lifecycle_tests.rs
Plugin activation, lifecycle commands, registry layouts, and state hydration use the resolved explicit plugin configuration path.
Plugin editor target selection
crates/cli/src/commands/configure/model.rs, crates/cli/src/commands/plugins/subcommands.rs, crates/cli/src/plugins/types.rs, crates/cli/tests/coverage/commands/main_tests.rs, crates/cli/tests/coverage/shared/setup_tests.rs, docs/configure-plugins/plugin-configuration-files.mdx
Explicit plugin paths are treated as user-layer targets, while project and global selections retain their layer mappings.
Explicit configuration diagnostics
crates/cli/src/diagnostics/*, crates/cli/tests/cli_tests.rs, crates/cli/tests/coverage/shared/doctor_tests.rs
Doctor reports serialize an optional explicit layer, mark the user layer as replaced, and include explicit-layer failures and warnings in output and exit codes.

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

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant ConfigResolver
  participant PluginLoader
  participant Lifecycle
  participant GatewayMerger
  participant Doctor
  CLI->>ConfigResolver: resolve explicit-or-user, project, and system paths
  ConfigResolver->>PluginLoader: provide ordered plugin configuration paths
  PluginLoader->>Lifecycle: provide resolved explicit plugin configuration
  Lifecycle->>GatewayMerger: hydrate dynamic plugin scopes from merged configuration
  GatewayMerger->>CLI: return merged runtime configuration
  CLI->>Doctor: collect configuration layer statuses
  Doctor->>CLI: render explicit, workspace, global, and system diagnostics
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title follows Conventional Commits and accurately summarizes the config-priority layering change.
Description check ✅ Passed Matches the required template sections and includes the checklist, details, reviewer start point, and related issue reference.
Docstring Coverage ✅ Passed Docstring coverage is 93.94% which is sufficient. The required threshold is 80.00%.
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 added size:L PR is large Bug issue describes bug; PR fixes bug lang:rust PR changes/introduces Rust code labels Jul 29, 2026
@willkill07 willkill07 added this to the 0.7 milestone Jul 29, 2026
@github-actions

Copy link
Copy Markdown

@github-actions github-actions Bot added size:XL PR is extra large and removed size:L PR is large labels Jul 29, 2026
@bbednarski9 bbednarski9 changed the title fix: layer plugin configuration by priority fix: layer Relay configuration by priority Jul 29, 2026
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
@bbednarski9
bbednarski9 force-pushed the fix/layer-plugin-config-precedence branch from b376883 to 839f555 Compare July 30, 2026 00:40
@bbednarski9
bbednarski9 marked this pull request as ready for review July 30, 2026 00:53
@bbednarski9
bbednarski9 requested review from a team as code owners July 30, 2026 00:53

@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: 3

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/coverage/shared/config_tests.rs (1)

1084-1093: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Wrap this test in the shared cwd/env guard.

plugin_config_paths(Some(&explicit), None) still reads process-global current_dir() and NEMO_RELAY_CONFIG_SCOPE, but this test is unguarded while the neighboring discovery tests use PluginConfigDiscoveryScope::enter(...) / CwdTestScope::locked(). In parallel runs, a sibling test can change cwd/env and make this assertion flaky.

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

In `@crates/cli/tests/coverage/shared/config_tests.rs` around lines 1084 - 1093,
Wrap plugins_toml_path_resolution_tracks_config_scope in the established shared
cwd/environment guards, using PluginConfigDiscoveryScope::enter(...) and
CwdTestScope::locked() as neighboring discovery tests do, before calling
plugin_config_paths. Keep the existing explicit path and assertions unchanged.

Source: Path instructions

🤖 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 3338-3352: Strengthen the assertions in the plugin_configs
verification loop so each matched reported layer is also confirmed to have a
non-failing status after the files are rewritten. Continue validating both
expected paths, and inspect the matched configuration entry’s status or
equivalent diagnostic field rather than only checking its path.

In `@crates/core/src/plugin.rs`:
- Around line 1654-1671: Expose the existing `deduplicate_plugin_config_paths`
in `crates/core/src/plugin.rs` as `pub` with `#[doc(hidden)]`, matching
`default_plugin_config_paths` for cross-crate reuse. Remove the duplicate helper
from `crates/cli/src/configuration/mod.rs` and call
`nemo_relay::plugin::deduplicate_plugin_config_paths` there.

In `@docs/reference/operational-logging.mdx`:
- Around line 116-120: Update the layer-order wording in the operational logging
documentation to match the documented precedence contract: explicit-or-user,
then project, then system. If retaining the current aggregation order,
explicitly label it as lowest-to-highest or reverse precedence so overlay
direction cannot be misinterpreted.

---

Outside diff comments:
In `@crates/cli/tests/coverage/shared/config_tests.rs`:
- Around line 1084-1093: Wrap plugins_toml_path_resolution_tracks_config_scope
in the established shared cwd/environment guards, using
PluginConfigDiscoveryScope::enter(...) and CwdTestScope::locked() as neighboring
discovery tests do, before calling plugin_config_paths. Keep the existing
explicit path and assertions unchanged.
🪄 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: 58564dd6-372d-4295-8b09-14c2db72d096

📥 Commits

Reviewing files that changed from the base of the PR and between 54ff736 and 839f555.

📒 Files selected for processing (23)
  • crates/cli/README.md
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/serve.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/src/diagnostics/mod.rs
  • crates/cli/src/diagnostics/model.rs
  • crates/cli/src/diagnostics/render.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/tests/cli_tests.rs
  • crates/cli/tests/coverage/agents/launcher_tests.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
  • crates/cli/tests/coverage/shared/doctor_tests.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • crates/core/src/plugin.rs
  • crates/core/tests/unit/plugin_tests.rs
  • docs/configure-plugins/model-pricing.mdx
  • docs/configure-plugins/observability/configuration.mdx
  • docs/configure-plugins/plugin-configuration-files.mdx
  • docs/nemo-relay-cli/basic-usage.mdx
  • docs/nemo-relay-cli/claude-code.mdx
  • docs/reference/operational-logging.mdx
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: Rust / Test (windows-arm64)
  • GitHub Check: Rust / Test (windows-amd64)
  • GitHub Check: Node.js / Test (windows-arm64)
  • GitHub Check: Python / Test (windows-arm64)
🧰 Additional context used
📓 Path-based instructions (25)
**/*.rs

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

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

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

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

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

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

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

Files:

  • crates/cli/src/commands/serve.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/tests/coverage/agents/launcher_tests.rs
  • crates/cli/tests/coverage/shared/doctor_tests.rs
  • crates/cli/src/diagnostics/model.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/diagnostics/render.rs
  • crates/core/tests/unit/plugin_tests.rs
  • crates/cli/src/diagnostics/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/core/src/plugin.rs
  • crates/cli/tests/cli_tests.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
**/*.{rs,py}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • crates/cli/src/commands/serve.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/tests/coverage/agents/launcher_tests.rs
  • crates/cli/tests/coverage/shared/doctor_tests.rs
  • crates/cli/src/diagnostics/model.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/diagnostics/render.rs
  • crates/core/tests/unit/plugin_tests.rs
  • crates/cli/src/diagnostics/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/core/src/plugin.rs
  • crates/cli/tests/cli_tests.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
**/*.{rs,py,js,mjs,cjs,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • crates/cli/src/commands/serve.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/tests/coverage/agents/launcher_tests.rs
  • crates/cli/tests/coverage/shared/doctor_tests.rs
  • crates/cli/src/diagnostics/model.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/diagnostics/render.rs
  • crates/core/tests/unit/plugin_tests.rs
  • crates/cli/src/diagnostics/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/core/src/plugin.rs
  • crates/cli/tests/cli_tests.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/shared/config_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 prefixed nemo_relay_, Go PascalCase, Node.js camelCase, and Python snake_case.

Files:

  • crates/cli/src/commands/serve.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/tests/coverage/agents/launcher_tests.rs
  • crates/cli/tests/coverage/shared/doctor_tests.rs
  • crates/cli/src/diagnostics/model.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/diagnostics/render.rs
  • crates/core/tests/unit/plugin_tests.rs
  • crates/cli/src/diagnostics/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/core/src/plugin.rs
  • crates/cli/tests/cli_tests.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/shared/config_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/commands/serve.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/tests/coverage/agents/launcher_tests.rs
  • crates/cli/tests/coverage/shared/doctor_tests.rs
  • crates/cli/src/diagnostics/model.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/diagnostics/render.rs
  • crates/core/tests/unit/plugin_tests.rs
  • crates/cli/src/diagnostics/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/core/src/plugin.rs
  • crates/cli/tests/cli_tests.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/shared/config_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 crate tests/ trees, and Python SDK tests belong under python/tests.

Files:

  • crates/cli/src/commands/serve.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/src/diagnostics/model.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/diagnostics/render.rs
  • crates/cli/src/diagnostics/mod.rs
  • crates/core/src/plugin.rs
  • crates/cli/src/configuration/mod.rs
**/*

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

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

Files:

  • crates/cli/src/commands/serve.rs
  • docs/configure-plugins/observability/configuration.mdx
  • crates/cli/src/plugins/types.rs
  • crates/cli/tests/coverage/agents/launcher_tests.rs
  • docs/reference/operational-logging.mdx
  • docs/configure-plugins/model-pricing.mdx
  • docs/nemo-relay-cli/claude-code.mdx
  • crates/cli/tests/coverage/shared/doctor_tests.rs
  • crates/cli/src/diagnostics/model.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/README.md
  • crates/cli/src/diagnostics/render.rs
  • crates/core/tests/unit/plugin_tests.rs
  • docs/nemo-relay-cli/basic-usage.mdx
  • crates/cli/src/diagnostics/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/core/src/plugin.rs
  • crates/cli/tests/cli_tests.rs
  • docs/configure-plugins/plugin-configuration-files.mdx
  • crates/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/shared/config_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/commands/serve.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/tests/coverage/agents/launcher_tests.rs
  • crates/cli/tests/coverage/shared/doctor_tests.rs
  • crates/cli/src/diagnostics/model.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/diagnostics/render.rs
  • crates/core/tests/unit/plugin_tests.rs
  • crates/cli/src/diagnostics/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/core/src/plugin.rs
  • crates/cli/tests/cli_tests.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/shared/config_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/cli/src/commands/serve.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/tests/coverage/agents/launcher_tests.rs
  • crates/cli/tests/coverage/shared/doctor_tests.rs
  • crates/cli/src/diagnostics/model.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/diagnostics/render.rs
  • crates/core/tests/unit/plugin_tests.rs
  • crates/cli/src/diagnostics/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/core/src/plugin.rs
  • crates/cli/tests/cli_tests.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/shared/config_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)

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

Files:

  • docs/configure-plugins/observability/configuration.mdx
  • docs/reference/operational-logging.mdx
  • docs/configure-plugins/model-pricing.mdx
  • docs/nemo-relay-cli/claude-code.mdx
  • docs/nemo-relay-cli/basic-usage.mdx
  • docs/configure-plugins/plugin-configuration-files.mdx
**/*.{md,mdx}

📄 CodeRabbit inference engine (AGENTS.md)

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

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

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

Files:

  • docs/configure-plugins/observability/configuration.mdx
  • docs/reference/operational-logging.mdx
  • docs/configure-plugins/model-pricing.mdx
  • docs/nemo-relay-cli/claude-code.mdx
  • crates/cli/README.md
  • docs/nemo-relay-cli/basic-usage.mdx
  • docs/configure-plugins/plugin-configuration-files.mdx
**/*.{md,markdown,mdx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

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

Files:

  • docs/configure-plugins/observability/configuration.mdx
  • docs/reference/operational-logging.mdx
  • docs/configure-plugins/model-pricing.mdx
  • docs/nemo-relay-cli/claude-code.mdx
  • crates/cli/README.md
  • docs/nemo-relay-cli/basic-usage.mdx
  • docs/configure-plugins/plugin-configuration-files.mdx
{docs,examples}/**/*

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

Update docs and examples.

Files:

  • docs/configure-plugins/observability/configuration.mdx
  • docs/reference/operational-logging.mdx
  • docs/configure-plugins/model-pricing.mdx
  • docs/nemo-relay-cli/claude-code.mdx
  • docs/nemo-relay-cli/basic-usage.mdx
  • docs/configure-plugins/plugin-configuration-files.mdx
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/configure-plugins/observability/configuration.mdx
  • docs/reference/operational-logging.mdx
  • docs/configure-plugins/model-pricing.mdx
  • docs/nemo-relay-cli/claude-code.mdx
  • docs/nemo-relay-cli/basic-usage.mdx
  • docs/configure-plugins/plugin-configuration-files.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/configure-plugins/observability/configuration.mdx
  • docs/reference/operational-logging.mdx
  • docs/configure-plugins/model-pricing.mdx
  • docs/nemo-relay-cli/claude-code.mdx
  • docs/nemo-relay-cli/basic-usage.mdx
  • docs/configure-plugins/plugin-configuration-files.mdx
{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/agents/launcher_tests.rs
  • crates/cli/tests/coverage/shared/doctor_tests.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • crates/core/tests/unit/plugin_tests.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/tests/cli_tests.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
**/*.{md,rst,html,txt}

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

**/*.{md,rst,html,txt}: Always spell NVIDIA in all caps. Do not use Nvidia, nvidia, nVidia, nVIDIA, or NV.
Use an NVIDIA before a noun because the name starts with an 'en' sound.
Do not add a registered trademark symbol after NVIDIA when referring to the company.
Use trademark symbols with product names only when the document type or legal guidance requires them.
Verify official capitalization, spacing, and hyphenation for product names.
Precede NVIDIA product names with NVIDIA on first mention when it is natural and accurate.
Do not rewrite product names for grammar or title-case rules.
Preserve third-party product names according to the owner's spelling.
Include the company name and full model qualifier on first use when it helps identify the model.
Preserve the official capitalization and punctuation of model names.
Use shorter family names only after the full name is established.
Spell out a term on first use and put the acronym in parentheses unless the acronym is widely understood by the intended audience.
Use the acronym on later mentions after it has been defined.
For long documents, reintroduce the full term if readers might lose context.
Form plurals of acronyms with s, not an apostrophe, such as GPUs.
In headings, common acronyms can remain abbreviated. Spell out the term in the first or second sentence of the body.
Common terms such as CPU, GPU, PC, API, and UI usually do not need to be spelled out for developer audiences.

Files:

  • crates/cli/README.md
**/*.{md,rst,html}

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

Link the first mention of a product name when the destination helps the reader.

Files:

  • crates/cli/README.md
**/*.{md,rst,txt}

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

Spell NVIDIA in all caps. Do not use Nvidia, nvidia, or NV.

Files:

  • crates/cli/README.md
**/*.{md,rst}

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

**/*.{md,rst}: Format commands, code elements, expressions, package names, file names, and paths as inline code.
Use descriptive link text. Avoid raw URLs and weak anchors such as "here" or "read more."
Use title case consistently for technical documentation headings.
Introduce code blocks, lists, tables, and images with complete sentences.
Write procedures as imperative steps. Keep steps parallel and split long procedures into smaller tasks.
Prefer active voice, present tense, short sentences, contractions, and plain English.
Use can for possibility and reserve may for permission.
Use after for temporal relationships instead of once.
Prefer refer to over see when the wording points readers to another resource.
Avoid culture-specific idioms, unnecessary Latinisms, jokes, and marketing exaggeration in technical docs.
Spell out months in body text, avoid ordinal dates, and use clear time zones.
Spell out whole numbers from zero through nine unless they are technical values, parameters, versions, or UI values.
Use numerals for 10 or greater and include commas in thousands.
Do not add trademark symbols to learning-oriented docs unless the source, platform, or legal guidance explicitly requires them.

Files:

  • crates/cli/README.md
**/*.md

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

**/*.md: Use title case consistently in technical documentation headings
Avoid quotation marks, ampersands, and exclamation marks in headings
Keep product, event, research, and whitepaper names in their official title case
Use title case for table headers
Do not force social-media sentence case into technical docs
Format code elements, commands, parameters, package names, and expressions in monospace
Format directories, file names, and paths in monospace using backticks
Use angle brackets inside monospace for variables inside paths, such as /home/<username>/.login
Format error messages and strings in quotation marks, keeping literal code strings in code formatting when clearer
Format UI buttons, menus, fields, and labels in bold
Use angle brackets between UI labels for menu paths, such as File > Save As
Use italics for new terms on first use, sparingly and only when introducing the term
Use italics for publication titles
Format keyboard shortcuts in plain text, such as Press Ctrl+Alt+Delete
Use owner/repo link text for GitHub repositories, preferring [NVIDIA/NeMo](link) over prose references like 'the GitHub repo'
Introduce every code block with a complete sentence
Do not make a code block complete the grammar of the previous sentence
Do not continue a sentence after a code block
Use syntax highlighting when the format supports it for code blocks
Avoid the word 'snippet' unless the surrounding docs already use it as a term of art
Keep inline method, function, and class references consistent with nearby docs, omitting empty parentheses for prose readability when no call is shown
Use descriptive anchor text that matches the destination title when possible for links
Avoid raw URLs in running text
Avoid generic anchor text such as 'here,' 'this page,' and 'read more'
Include acronyms in link text when a linked term includes an acronym
Do not link long sentences or multiple sentences
Avoid links that pull readers away from a procedure unless the link is a p...

Files:

  • crates/cli/README.md
{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/plugin_tests.rs
  • crates/core/src/plugin.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

Files:

  • crates/core/tests/unit/plugin_tests.rs
  • crates/core/src/plugin.rs
crates/{core,adaptive}/**/*

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

If crates/core or crates/adaptive changed, run the full validation matrix across Rust, Python, Go, and Node.js.

Files:

  • crates/core/tests/unit/plugin_tests.rs
  • crates/core/src/plugin.rs
crates/{core,adaptive}/**/*.rs

⚙️ CodeRabbit configuration file

crates/{core,adaptive}/**/*.rs: Review the Rust runtime for async correctness, scope isolation, middleware ordering, and event lifecycle regressions.
Pay close attention to task-local/thread-local scope propagation, callback lifetimes, stream finalization, and root_uuid isolation.
Public API changes should preserve existing behavior unless tests and docs show the intended migration path.

Files:

  • crates/core/tests/unit/plugin_tests.rs
  • crates/core/src/plugin.rs
🧠 Learnings (2)
📚 Learning: 2026-07-14T02:53:59.997Z
Learnt from: willkill07
Repo: NVIDIA/NeMo-Relay PR: 415
File: docs/configure-plugins/observability/opentelemetry.mdx:98-113
Timestamp: 2026-07-14T02:53:59.997Z
Learning: In NeMo-Relay’s OpenTelemetry/OpenInference observability projection docs under docs/configure-plugins/observability/, document the projected-attribute contract as follows: (1) emit scalar top-level `data`/`metadata` fields as typed dotted OTLP attributes (for example, `nemo_relay.start.metadata.tenant`); (2) keep nested objects/arrays as JSON strings at their top-level OTLP attribute (rather than expanding them into nested OTLP attributes); and (3) do not reference the legacy `*_json` payload attributes (e.g., `data_json`, `metadata_json`, `input_json`) because they were intentionally removed as a breaking change.

Applied to files:

  • docs/configure-plugins/observability/configuration.mdx
📚 Learning: 2026-07-28T20:07:29.880Z
Learnt from: willkill07
Repo: NVIDIA/NeMo-Relay PR: 571
File: crates/core/src/api/runtime/state.rs:996-1020
Timestamp: 2026-07-28T20:07:29.880Z
Learning: In NeMo Relay (RELAY-509), sanitizer callback failures must be treated as intentional fail-open behavior. When an event/tool (request/response) or LLM (request/response) sanitizer callback fails, the sanitizer chain should retain and publish the last valid event/payload snapshot (rather than dropping/invalidating the data) and log the failure including callback context (e.g., which sanitizer/callback failed and relevant identifiers). Apply this consistently across all sanitizer chains mentioned in the RELAY-509 documentation/migration guide.

Applied to files:

  • crates/core/src/plugin.rs
🔇 Additional comments (25)
crates/cli/src/diagnostics/mod.rs (1)

156-166: LGTM!

Also applies to: 309-314

crates/cli/src/diagnostics/model.rs (1)

53-54: LGTM!

crates/cli/src/diagnostics/render.rs (1)

19-23: LGTM!

Also applies to: 46-50, 99-105

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

3207-3267: LGTM!

Also applies to: 3269-3328

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

59-59: LGTM!

crates/cli/src/configuration/mod.rs (4)

1301-1329: 🎯 Functional Correctness

Verified dedup correctness; flagging duplication with crates/core/src/plugin.rs.

deduplicate_plugin_config_paths correctly preserves the highest-precedence entry for physically-aliased paths (reverse-scan + seen set + re-reverse), matching the symlink dedup test. However, this function is byte-for-byte duplicated in crates/core/src/plugin.rs (lines 1654-1671). See consolidated comment.

Also applies to: 1394-1411


111-142: Requiredness now correctly scoped to the explicit path.

required now only trips for the file that equals the caller-supplied explicit path, rather than any discovered layer whenever an explicit path was set. Project/system layers stay optional-if-absent, and the explicit_config_must_exist test confirms non-existent explicit files still fail loudly.

Also applies to: 980-1023


1056-1110: Layer ordering verified against precedence tests.

Traced config_paths_scoped/plugin_config_paths_scoped against config_paths_layer_explicit_or_user_then_project_then_system and plugin_config_paths_layer_explicit_or_user_then_project_then_system in config_tests.rs: explicit-or-user, project (suppressed under user_only), system-last (highest precedence) all line up correctly, including the explicit+override-plugin-path branch.


1631-1731: Gateway merge helpers verified correct across three scenarios.

Manually traced merge_gateway_config_tomlclear_credentials_for_replaced_upstreamsmerge_logging_sinks_by_pathmerge_logging_sink_listscoalesce_logging_sinks against the new uphill_config_layers_replace_scalars_and_aggregate_distinct_agent_tables, upstream_base_url_identity_controls_credential_inheritance, and logging_sinks_aggregate_by_path_with_higher_layers_first tests. The three-layer sink-merge trace (system/shared/project/user) reproduces the expected ["system.log", "shared.log", "project.log", "user.log"] output and field overlay exactly.

crates/core/src/plugin.rs (1)

1634-1652: Ordering and dedup wiring look correct.

load_plugin_config_files now routes through dedup before reading, and default_plugin_config_paths matches the new user → project → system ordering; both are exercised by the added unit tests (test_default_plugin_config_paths_order_user_project_system, test_load_plugin_config_files_deduplicates_aliases_at_highest_precedence).

Also applies to: 1716-1732

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

336-364: Solid, well-targeted coverage for the new layering semantics.

The new/updated tests exercise exactly the promised behaviors: explicit-vs-user sibling replacement plus project inclusion, endpoint-identity-scoped credential clearing, symlink-alias dedup at highest precedence, and the three new merge_gateway_config_toml scenarios (scalar/agent aggregation, credential inheritance, logging-sink aggregation). Traced these against the implementation and they match.

Also applies to: 713-737, 880-918, 3354-3563

crates/core/tests/unit/plugin_tests.rs (1)

2077-2213: Coverage matches the new precedence and dedup behavior.

test_load_plugin_config_files_merges_files_by_precedence, test_default_plugin_config_paths_order_user_project_system, and test_load_plugin_config_files_deduplicates_aliases_at_highest_precedence correctly exercise scalar/recursive-config/list-aggregation semantics and symlink-alias deduplication, matching the crates/core/src/plugin.rs implementation.

crates/cli/README.md (1)

151-212: LGTM!

docs/configure-plugins/model-pricing.mdx (1)

59-63: LGTM!

docs/configure-plugins/observability/configuration.mdx (1)

86-95: LGTM!

docs/configure-plugins/plugin-configuration-files.mdx (1)

70-77: Documentation is internally consistent with the implementation.

Cross-checked the revised precedence chain (explicit-or-user → project → system, system-highest), the dedup/missing-file/user-only-bootstrap wording, the editor-target rules, and the ATOF sinks example (system-first ordering) against crates/cli/src/configuration/mod.rs and crates/core/src/plugin.rs. Also correctly distinguishes this plugin-config simple-concatenation model from the path-keyed config.toml logging-sink merge described in basic-usage.mdx.

Also applies to: 185-208, 235-239, 277-333, 352-353, 381-382

docs/nemo-relay-cli/basic-usage.mdx (1)

146-149: Consistent with the merge/precedence implementation.

The shared-config precedence description, the upstream-identity credential-clearing rule, and the path-keyed logging-sink aggregation description all match clear_credentials_for_replaced_upstreams/merge_logging_sinks_by_path in crates/cli/src/configuration/mod.rs.

Also applies to: 169-175, 208-211, 271-276, 295-298

docs/nemo-relay-cli/claude-code.mdx (1)

140-141: LGTM!

crates/cli/src/commands/serve.rs (1)

11-11: LGTM!

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

1877-1877: LGTM!

crates/cli/tests/coverage/commands/main_tests.rs (1)

20-73: LGTM!

Also applies to: 229-229

crates/cli/src/commands/configure/model.rs (1)

45-48: LGTM!

crates/cli/src/commands/plugins/subcommands.rs (1)

75-75: LGTM!

Also applies to: 172-177

crates/cli/src/plugins/types.rs (1)

21-21: LGTM!

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

562-570: LGTM!

Comment thread crates/cli/tests/cli_tests.rs
Comment thread crates/core/src/plugin.rs
Comment thread docs/reference/operational-logging.mdx Outdated
Comment thread crates/cli/tests/coverage/shared/config_tests.rs
Comment thread crates/cli/tests/coverage/shared/config_tests.rs Outdated
Comment thread crates/cli/tests/cli_tests.rs Outdated
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@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.

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/coverage/shared/config_tests.rs (1)

322-342: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Isolate the system plugin layer in these source-list tests.

System plugins.toml is now part of implicit discovery, but these tests only isolate XDG and CWD. An existing system plugin file can invalidate the empty assertion and expected source vectors. Override/mock the system path or provide an isolated system-root fixture.

Also applies to: 355-377

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

In `@crates/cli/tests/coverage/shared/config_tests.rs` around lines 322 - 342,
Isolate the system plugin layer in the source-list tests around
effective_plugin_toml_sources, including the related test at the noted range.
Override or mock the system plugins.toml location, or create an isolated
system-root fixture, so implicit system discovery cannot add existing host files
and invalidate the empty and expected source assertions.
🤖 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.

Outside diff comments:
In `@crates/cli/tests/coverage/shared/config_tests.rs`:
- Around line 322-342: Isolate the system plugin layer in the source-list tests
around effective_plugin_toml_sources, including the related test at the noted
range. Override or mock the system plugins.toml location, or create an isolated
system-root fixture, so implicit system discovery cannot add existing host files
and invalidate the empty and expected source assertions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: e0ec4d5d-accc-417a-a790-3f7effc0fe03

📥 Commits

Reviewing files that changed from the base of the PR and between 839f555 and 23ccdf3.

📒 Files selected for processing (2)
  • crates/cli/tests/cli_tests.rs
  • crates/cli/tests/coverage/shared/config_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 (9)
**/*.rs

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

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

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

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

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

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

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

Files:

  • crates/cli/tests/cli_tests.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
**/*.{rs,py}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • crates/cli/tests/cli_tests.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
**/*.{rs,py,js,mjs,cjs,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • crates/cli/tests/cli_tests.rs
  • crates/cli/tests/coverage/shared/config_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 prefixed nemo_relay_, Go PascalCase, Node.js camelCase, and Python snake_case.

Files:

  • crates/cli/tests/cli_tests.rs
  • crates/cli/tests/coverage/shared/config_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/cli_tests.rs
  • crates/cli/tests/coverage/shared/config_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, use maintain-dynamic-plugins and include the native SDK, worker protocol, Python SDK, docs, packaging, and Codecov surfaces in the validation plan.
If code changes alter APIs, bindings, commands, paths, packaging behavior, observability/adaptive semantics, or documented best practices, update any dependent maintainer or consumer skills in the same branch.
During iteration, prefer uv run pre-commit run --files <changed files...>.
Before review or handoff, run uv run pre-commit run --all-files.

Files:

  • crates/cli/tests/cli_tests.rs
  • crates/cli/tests/coverage/shared/config_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/cli_tests.rs
  • crates/cli/tests/coverage/shared/config_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/cli/tests/cli_tests.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}

⚙️ CodeRabbit configuration file

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

Files:

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

3352-3363: Assert repaired plugin layers are non-failing.

The loop only confirms both paths are listed; it can still pass if either layer retains a fail status. Find each entry and assert its status is no longer failing.

crates/cli/tests/coverage/shared/config_tests.rs (3)

68-76: 🎯 Functional Correctness

Verify the system-path expectations are platform-correct.

These tests hard-code /etc/nemo-relay/.... If production discovery uses a platform-specific system root, the expectations will fail on Windows or other supported targets. Derive both paths from the same helper used by discovery, or add target-specific expectations.

Also applies to: 113-121


51-147: 📐 Maintainability & Code Quality

Confirm the required Rust validation was run.

For this Rust change, confirm just test-rust, cargo fmt --all, cargo clippy --workspace --all-targets -- -D warnings, and final uv run pre-commit run --all-files completed successfully.

Source: Coding guidelines


612-612: LGTM!

Also applies to: 792-792, 816-816, 862-862, 984-984, 1028-1028, 1924-1924, 1949-1949, 1979-1979, 2010-2010, 2846-2846, 2862-2862, 2897-2897, 2964-2964, 3033-3033, 3106-3106, 3193-3193, 3218-3218, 3285-3285, 3628-3628, 3647-3647, 3707-3707, 3758-3758, 3854-3854, 3896-3896, 3937-3937, 3959-3959

Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
@bbednarski9

Copy link
Copy Markdown
Contributor Author

/ok to test 47a52e4

Signed-off-by: Bryan Bednarski <bbednarski@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

Caution

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

⚠️ Outside diff range comments (1)
docs/nemo-relay-cli/basic-usage.mdx (1)

169-174: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Align the interactive global plugin target.

The preceding setup instructions still say global setup uses the user plugins.toml, but this section and Lines 208-212 define global as the system layer. Update the earlier sentence to name the system plugin configuration.

As per path instructions, “Review documentation for technical accuracy against the current API, command correctness, and consistency across language bindings.”

🤖 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 `@docs/nemo-relay-cli/basic-usage.mdx` around lines 169 - 174, Update the
earlier global setup sentence in basic-usage documentation to refer to the
system plugin configuration instead of the user plugins.toml file, keeping it
consistent with the system-layer definition used in the plugin precedence and
global target guidance.

Source: Path instructions

🤖 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 `@docs/nemo-relay-cli/basic-usage.mdx`:
- Around line 265-277: The documented combination of a CLI base-URL override
with NEMO_RELAY_*_AUTH_HEADER is inaccurate because URL layering clears the
environment header. Update the guidance to state that CLI URL overrides cannot
use those environment-supplied headers, and revise the surrounding layering
explanation to match the current shared-config behavior.

---

Outside diff comments:
In `@docs/nemo-relay-cli/basic-usage.mdx`:
- Around line 169-174: Update the earlier global setup sentence in basic-usage
documentation to refer to the system plugin configuration instead of the user
plugins.toml file, keeping it consistent with the system-layer definition used
in the plugin precedence and global target guidance.
🪄 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: 5a03f188-e121-4a2f-a371-400d6b5aed95

📥 Commits

Reviewing files that changed from the base of the PR and between fe21133 and 0374ce9.

📒 Files selected for processing (3)
  • crates/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
  • docs/nemo-relay-cli/basic-usage.mdx
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Check / Run
  • GitHub Check: Preview docs
🧰 Additional context used
📓 Path-based instructions (16)
**/*.mdx

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

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

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

Files:

  • docs/nemo-relay-cli/basic-usage.mdx
**/*.{md,mdx}

📄 CodeRabbit inference engine (AGENTS.md)

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

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

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

Files:

  • docs/nemo-relay-cli/basic-usage.mdx
**/*.{md,markdown,mdx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

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

Files:

  • docs/nemo-relay-cli/basic-usage.mdx
{docs,examples}/**/*

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

Update docs and examples.

Files:

  • docs/nemo-relay-cli/basic-usage.mdx
**/*

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

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

Files:

  • docs/nemo-relay-cli/basic-usage.mdx
  • crates/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/shared/config_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/nemo-relay-cli/basic-usage.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/nemo-relay-cli/basic-usage.mdx
**/*.rs

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

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

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

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

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

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

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

Files:

  • crates/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
**/*.{rs,py}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • crates/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
**/*.{rs,py,js,mjs,cjs,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • crates/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/shared/config_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 prefixed nemo_relay_, Go PascalCase, Node.js camelCase, and Python snake_case.

Files:

  • crates/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/shared/config_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/configuration/mod.rs
  • crates/cli/tests/coverage/shared/config_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 crate tests/ trees, and Python SDK tests belong under python/tests.

Files:

  • crates/cli/src/configuration/mod.rs
**/*.{rs,py,go,js,ts}

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

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

Files:

  • crates/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/shared/config_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/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}

⚙️ CodeRabbit configuration file

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

Files:

  • crates/cli/tests/coverage/shared/config_tests.rs
🪛 LanguageTool
docs/nemo-relay-cli/basic-usage.mdx

[style] ~269-~269: ‘exact same’ might be wordy. Consider a shorter alternative.
Context: ...ader across a URL change. Repeating the exact same URL preserves the existing header. The...

(EN_WORDINESS_PREMIUM_EXACT_SAME)

🔇 Additional comments (3)
crates/cli/src/configuration/mod.rs (1)

121-122: LGTM!

Also applies to: 925-936, 962-973, 1005-1006, 1106-1121, 1330-1409, 1546-1600, 1647-1650

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

307-317: LGTM!

Also applies to: 321-355, 804-838, 2030-2134, 3489-3499

docs/nemo-relay-cli/basic-usage.mdx (1)

146-149: LGTM!

Also applies to: 208-211, 297-300

Comment thread docs/nemo-relay-cli/basic-usage.mdx Outdated
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@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: 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/src/plugins/lifecycle/mod.rs`:
- Around line 90-93: Consolidate explicit plugin-config resolution into one
crate-visible helper: update lifecycle_plugin_config_path in
crates/cli/src/plugins/lifecycle/mod.rs#L90-L93 to be reusable, or colocate the
shared helper with explicit_plugin_config_path; replace the duplicated call in
crates/cli/src/commands/mod.rs#L195-L200 with that helper, and update
crates/cli/src/process/launcher.rs#L70-L75 to use it while preserving the
command/inherited override fallback chain used by resolve_run_config.

In `@crates/cli/src/plugins/lifecycle/state.rs`:
- Around line 258-267: Align the physical-file deduplication in the lifecycle
scope state builder with the config-discovery deduplication used by the
plugin-loading layer. Compare the canonicalization and survivor-selection logic
in crates/core/src/plugin.rs and crates/cli/src/configuration/mod.rs, then
update the dedup flow around the layouts loop so it retains the same raw
plugins.toml path and priority winner; this must keep
load_and_hydrate_scopes_with_updates able to match
resolved.dynamic_plugins[i].source to scope.plugins_toml_path for duplicate
physical files.
- Around line 234-240: Update the layout-building logic around
user_plugin_config_path() to emit a warning when it returns None instead of
silently omitting the User/Explicit layer. Match the warning behavior and
logging mechanism used by scoped_paths_for_add, while preserving the existing
layout creation when the path is available.

In `@crates/cli/tests/coverage/shared/plugins_lifecycle_tests.rs`:
- Around line 3005-3081: Add a lifecycle test near
explicit_config_keeps_project_dynamic_plugin_lifecycle_scope that creates two
scope configuration paths resolving to the same physical plugins file, such as
via a symlink or hard link, then loads the scoped registries and asserts
canonicalize-based deduplication leaves exactly one ScopedRegistry with the
highest-priority RegistryScope and matching physical plugins_toml_path. Reuse
existing helpers such as load_scoped_registries, find_record_by_id, and
write_dynamic_manifest, and ensure the test validates the resulting
source-to-scope association.
🪄 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: ee438c40-7685-4fa3-abf1-fec926dd8039

📥 Commits

Reviewing files that changed from the base of the PR and between 0374ce9 and c42bf32.

📒 Files selected for processing (6)
  • crates/cli/src/commands/mod.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/src/plugins/lifecycle/mod.rs
  • crates/cli/src/plugins/lifecycle/state.rs
  • crates/cli/src/process/launcher.rs
  • crates/cli/tests/coverage/shared/plugins_lifecycle_tests.rs
📜 Review details
🧰 Additional context used
📓 Path-based instructions (10)
**/*.rs

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

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

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

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

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

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

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

Files:

  • crates/cli/src/commands/mod.rs
  • crates/cli/src/process/launcher.rs
  • crates/cli/tests/coverage/shared/plugins_lifecycle_tests.rs
  • crates/cli/src/plugins/lifecycle/state.rs
  • crates/cli/src/plugins/lifecycle/mod.rs
  • crates/cli/src/configuration/mod.rs
**/*.{rs,py}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • crates/cli/src/commands/mod.rs
  • crates/cli/src/process/launcher.rs
  • crates/cli/tests/coverage/shared/plugins_lifecycle_tests.rs
  • crates/cli/src/plugins/lifecycle/state.rs
  • crates/cli/src/plugins/lifecycle/mod.rs
  • crates/cli/src/configuration/mod.rs
**/*.{rs,py,js,mjs,cjs,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • crates/cli/src/commands/mod.rs
  • crates/cli/src/process/launcher.rs
  • crates/cli/tests/coverage/shared/plugins_lifecycle_tests.rs
  • crates/cli/src/plugins/lifecycle/state.rs
  • crates/cli/src/plugins/lifecycle/mod.rs
  • crates/cli/src/configuration/mod.rs
**/*.{rs,py,go,js,ts,c,h}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

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

Files:

  • crates/cli/src/commands/mod.rs
  • crates/cli/src/process/launcher.rs
  • crates/cli/tests/coverage/shared/plugins_lifecycle_tests.rs
  • crates/cli/src/plugins/lifecycle/state.rs
  • crates/cli/src/plugins/lifecycle/mod.rs
  • crates/cli/src/configuration/mod.rs
**/*.{rs,go,js,ts}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

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

Files:

  • crates/cli/src/commands/mod.rs
  • crates/cli/src/process/launcher.rs
  • crates/cli/tests/coverage/shared/plugins_lifecycle_tests.rs
  • crates/cli/src/plugins/lifecycle/state.rs
  • crates/cli/src/plugins/lifecycle/mod.rs
  • crates/cli/src/configuration/mod.rs
{crates/**/src/**/*.rs,python/**/*.py}

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

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

Files:

  • crates/cli/src/commands/mod.rs
  • crates/cli/src/process/launcher.rs
  • crates/cli/src/plugins/lifecycle/state.rs
  • crates/cli/src/plugins/lifecycle/mod.rs
  • crates/cli/src/configuration/mod.rs
**/*

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

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

Files:

  • crates/cli/src/commands/mod.rs
  • crates/cli/src/process/launcher.rs
  • crates/cli/tests/coverage/shared/plugins_lifecycle_tests.rs
  • crates/cli/src/plugins/lifecycle/state.rs
  • crates/cli/src/plugins/lifecycle/mod.rs
  • crates/cli/src/configuration/mod.rs
**/*.{rs,py,go,js,ts}

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

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

Files:

  • crates/cli/src/commands/mod.rs
  • crates/cli/src/process/launcher.rs
  • crates/cli/tests/coverage/shared/plugins_lifecycle_tests.rs
  • crates/cli/src/plugins/lifecycle/state.rs
  • crates/cli/src/plugins/lifecycle/mod.rs
  • crates/cli/src/configuration/mod.rs
**/*.{rs,py,js,ts,tsx,go,java,kt,swift}

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

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

Files:

  • crates/cli/src/commands/mod.rs
  • crates/cli/src/process/launcher.rs
  • crates/cli/tests/coverage/shared/plugins_lifecycle_tests.rs
  • crates/cli/src/plugins/lifecycle/state.rs
  • crates/cli/src/plugins/lifecycle/mod.rs
  • crates/cli/src/configuration/mod.rs
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}

⚙️ CodeRabbit configuration file

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

Files:

  • crates/cli/tests/coverage/shared/plugins_lifecycle_tests.rs
🔇 Additional comments (8)
crates/cli/src/configuration/mod.rs (5)

22-24: LGTM!

Also applies to: 98-100, 864-875, 911-912, 1085-1109, 1122-1139, 1309-1318, 1323-1324, 1338-1345, 1395-1395, 1655-1664


123-124: 🎯 Functional Correctness

Preserve required-file semantics across path normalization.

These changes rely on exact PathBuf equality. Verify that relative paths and symlinked explicit paths retain the same representation during discovery; otherwise a missing explicitly requested file could be treated as an optional ambient layer. Add relative-path and symlink regression tests.

As per coding guidelines, changed configuration behavior must be tested for its promised behavior and error paths.

Also applies to: 1016-1017

Source: Coding guidelines


936-947: 🎯 Functional Correctness

Verify override ordering does not erase explicit credentials.

replace_upstream_base_url clears the paired auth header whenever the URL identity changes. Confirm every caller applies a same-layer auth-header override after this helper; otherwise supplying both a new URL and credential can discard the credential. Add paired server, run, and environment tests.

As per coding guidelines, changed configuration behavior must be tested across its affected API surfaces.

Also applies to: 973-984, 1565-1569, 1579-1583, 1602-1612

Source: Coding guidelines


1358-1358: 🗄️ Data Integrity & Integration

Retain the highest-precedence alias during physical-path deduplication.

Because scoped paths are layered by precedence, verify that deduplication of symlinked or otherwise aliased files keeps the highest-precedence occurrence rather than whichever spelling appears first. This affects both merge results and required-file behavior.

As per path instructions, tests should cover the behavior promised by the changed configuration surface and relevant error paths.

Source: Path instructions


1681-1754: 🗄️ Data Integrity & Integration

Keep pathless sink documents independent.

When path is absent, ensure the merge does not use one shared sentinel that coalesces unrelated sink documents. Add coverage for pathless sinks and confirm the intended behavior for an empty higher-layer sink list.

As per path instructions, tests should cover the behavior promised by the changed API surface.

Source: Path instructions

crates/cli/src/plugins/lifecycle/mod.rs (1)

20-24: LGTM!

Also applies to: 105-135, 246-250, 270-384, 386-425, 427-462, 478-521, 1777-1799, 1863-1977

crates/cli/src/plugins/lifecycle/state.rs (1)

4-4: LGTM!

Also applies to: 14-14, 112-114, 127-158

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

2994-2996: LGTM!

Comment thread crates/cli/src/plugins/lifecycle/mod.rs
Comment thread crates/cli/src/plugins/lifecycle/state.rs
Comment thread crates/cli/src/plugins/lifecycle/state.rs
Comment thread crates/cli/tests/coverage/shared/plugins_lifecycle_tests.rs
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>

@mnajafian-nv mnajafian-nv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@willkill07 willkill07 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. I do have some concern about project being layered on top of user with certain deployments but that's resolvable by updating the deployment and establishing better intent/contracts.

Copy link
Copy Markdown
Contributor Author

Yup i totally agree. Hardening the layering will come with some added responsibility/stress on good practice for local development, where multiple relay configs will likely exist. Possible docs follow-up. Wont create an issue yet, but will keep an eye on things

@mnajafian-nv

Copy link
Copy Markdown
Contributor

/merge

@rapids-bot
rapids-bot Bot merged commit cb46538 into NVIDIA:main Jul 30, 2026
72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug issue describes bug; PR fixes bug lang:rust PR changes/introduces Rust code size:XL PR is extra large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants