Skip to content

fix: preserve explicit configuration editor targets - #583

Merged
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
bbednarski9:fix/preserve-explicit-plugin-config
Jul 29, 2026
Merged

fix: preserve explicit configuration editor targets#583
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
bbednarski9:fix/preserve-explicit-plugin-config

Conversation

@bbednarski9

@bbednarski9 bbednarski9 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Overview

Make both interactive configuration editors honor the explicit files selected at the top-level CLI.

For a managed or multi-instance invocation:

nemo-relay --config /path/to/instance/config.toml config edit

config edit now opens /path/to/instance/config.toml itself. The guided plugin flow and plugins edit continue to resolve the corresponding plugin document using the same explicit selection rules as runtime startup:

nemo-relay --config /path/to/instance/config.toml config
# edits /path/to/instance/plugins.toml

Previously, the editor entry points discarded top-level configuration overrides and independently fell back to user/project/global discovery. A wizard could therefore display defaults from one document and save changes there while the launched Relay process continued loading another.

  • 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

Root cause

The config command did not receive the parsed gateway ServerArgs. The base editor always chose a user/project/global path, and the plugin editor converted its subcommand arguments without considering top-level --config or --plugin-config-path overrides. Runtime loading already had the correct explicit plugin selection rules, but the interactive editors resolved their targets separately. The coding-agent easy path also passed no plugin target when it invoked first-run setup, even when --plugin-config-path was present.

Changes
  • Pass top-level gateway overrides into the config command flow.
  • Make nemo-relay --config <path> config edit edit that exact base config.toml.
  • Extract explicit plugin-config target selection into one shared resolver used by runtime loading and editor dispatch:
    • --plugin-config-path <path> selects that exact plugin file.
    • Otherwise, --config <path/to/config.toml> selects the sibling <path/to/plugins.toml>.
  • Preserve the explicit plugin target when the coding-agent easy path invokes first-run setup.
  • Preserve explicit editor scope behavior: config edit --user|--project|--global and plugins edit --user|--project|--global override inherited targets.
  • Keep --plugin-config-path plugin-specific; it does not change the base file opened by config edit.
  • Keep wizard resume instructions bound to the same explicit plugin file when setup is skipped or fails, including shell-safe quoting for paths with spaces.
  • Add regression coverage for resolver precedence, CLI parsing, easy-path setup, both editor target-selection paths, every explicit scope override, wizard continuation, and resume commands.
  • Document the exact command for resuming an explicit plugin configuration flow in the CLI README and user documentation.
Scope and compatibility

This PR intentionally does not change implicit configuration discovery, layering, or merge precedence. It only preserves explicit CLI targets across the editor boundary. Named persistent instances, mandatory system policy, and a broader system/user/project layering model require a separate design discussion.

There are no breaking API changes.

Validation
  • cargo test -p nemo-relay-cli explicit_plugin -- --nocapture
  • cargo test -p nemo-relay-cli config_edit -- --nocapture
  • Focused easy-path, resume-command quoting, and scope-override regression tests
  • just test-rust
  • cargo fmt --all
  • cargo clippy --workspace --all-targets -- -D warnings
  • Targeted uv run pre-commit run --files ...
  • just docs
  • uv run pre-commit run --all-files: all code, format, lint, type, docs, protobuf, FFI, Cargo, Go, and Node checks passed. The unrelated attributions-rust generator still proposes existing md-5 license-text drift; that generated change was excluded from this patch.

The documentation build completed with only the expected warning that Fern redirect validation was skipped because no Fern authentication token was available.

Where should the reviewer start?

Start with crates/cli/src/configuration/mod.rs, where explicit_plugin_config_path defines the shared runtime/editor plugin contract, and crates/cli/src/commands/run.rs, where easy-path setup preserves that target. Then review crates/cli/src/commands/configure/editor.rs, crates/cli/src/commands/configure/mod.rs, and crates/cli/src/commands/plugins/mod.rs for propagation into the editor entry points. Focused regression cases are in crates/cli/tests/coverage/shared/config_tests.rs, crates/cli/tests/coverage/shared/setup_tests.rs, crates/cli/tests/coverage/commands/configure_editor_tests.rs, and crates/cli/tests/coverage/commands/main_tests.rs.

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

  • Relates to: none

Summary by CodeRabbit

  • New Features

    • plugins edit now targets the explicitly selected plugin configuration file when provided.
    • Configuration paths automatically resolve to their corresponding sibling plugins.toml file.
    • Explicit scope options override inherited file selection.
  • Documentation

    • Updated CLI and setup guidance to explain plugin configuration file selection and precedence.
  • Tests

    • Added coverage for explicit paths, inherited configuration targets, and scope overrides.

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

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 9d23925c-35a6-4c9d-858b-0fa70988bdb6

📥 Commits

Reviewing files that changed from the base of the PR and between a6476bb and b9df482.

📒 Files selected for processing (5)
  • crates/cli/src/commands/run.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • docs/nemo-relay-cli/basic-usage.mdx
📜 Recent review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: Rust / Test (macos-arm64)
  • GitHub Check: Rust / Test (windows-amd64)
  • GitHub Check: Rust / Test (windows-arm64)
🧰 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/commands/run.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • crates/cli/tests/coverage/shared/setup_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/commands/run.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • crates/cli/tests/coverage/shared/setup_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/run.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • crates/cli/tests/coverage/shared/setup_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/run.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • crates/cli/tests/coverage/shared/setup_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/run.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • crates/cli/tests/coverage/shared/setup_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/run.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • crates/cli/tests/coverage/shared/setup_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/run.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/run.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • crates/cli/tests/coverage/shared/setup_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/run.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • crates/cli/tests/coverage/shared/setup_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/commands/main_tests.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
🔇 Additional comments (6)
crates/cli/src/commands/run.rs (2)

67-75: LGTM!

Also applies to: 89-90


67-75: 📐 Maintainability & Code Quality

Run the Rust validation suite before merge.

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

585-601: LGTM!

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

191-219: LGTM!

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

55-67: LGTM!

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

164-173: LGTM!

Also applies to: 192-196


Walkthrough

The CLI resolves an explicit plugins.toml target from runtime configuration and propagates it through setup, resume commands, and editing flows. Explicit scope selections override inherited paths, with tests and documentation covering the selection rules.

Changes

Plugin editor target selection

Layer / File(s) Summary
Explicit path resolution contract
crates/cli/src/configuration/mod.rs, crates/cli/src/plugins/types.rs, crates/cli/tests/coverage/shared/config_tests.rs
Centralizes explicit or sibling plugins.toml resolution and stores the result on PluginsEditRequest.
Setup wizard path propagation
crates/cli/src/commands/configure/*, crates/cli/src/commands/mod.rs, crates/cli/src/commands/run.rs, crates/cli/tests/coverage/shared/setup_tests.rs
Passes the resolved path through configuration execution, wizard continuation, editor commands, and resume messaging.
Editor target resolution and documentation
crates/cli/src/commands/plugins/*, crates/cli/src/plugins/*, crates/cli/src/commands/configure/editor.rs, crates/cli/tests/coverage/commands/*, crates/cli/tests/coverage/shared/plugins_tests.rs, crates/cli/README.md, docs/...
Uses inherited paths for default editing, preserves explicit scope overrides, and documents the selection behavior.

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

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant ServerArgs
  participant Configuration
  participant ConfigureWizard
  participant PluginEditor
  CLI->>ServerArgs: Read --config and --plugin-config-path
  ServerArgs->>Configuration: Resolve effective plugins.toml
  Configuration->>ConfigureWizard: Pass explicit plugin path
  ConfigureWizard->>PluginEditor: Open inherited or explicitly selected target
  PluginEditor-->>CLI: Save plugin configuration
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.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 uses valid Conventional Commits syntax and accurately summarizes the PR’s main fix.
Description check ✅ Passed The description matches the template’s required sections and includes overview, details, reviewer start, and related issues.
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.

@bbednarski9
bbednarski9 marked this pull request as ready for review July 29, 2026 17:43
@bbednarski9
bbednarski9 requested review from a team as code owners July 29, 2026 17:43
@willkill07 willkill07 added this to the 0.7 milestone Jul 29, 2026
@github-actions github-actions Bot added size:M PR is medium Bug issue describes bug; PR fixes bug lang:rust PR changes/introduces Rust code labels Jul 29, 2026

@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

🤖 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/commands/run.rs`:
- Line 79: Update the easy-path setup call in the run command to resolve the
plugin target from inherited.config and inherited.plugin_config_path, then pass
that target to configure::run instead of None. Preserve the explicit
plugin-config path through setup and add a regression test covering easy-path
setup with --plugin-config-path.

In `@crates/cli/tests/coverage/shared/setup_tests.rs`:
- Around line 584-592: Update
plugins_resume_command_preserves_explicit_plugin_path to use a plugin path
containing spaces or another shell-sensitive character, then assert the
platform-specific quoted command produced by plugins_resume_command. Preserve
the existing global-scope and explicit-path coverage while verifying the
rendered resume command is usable on each supported platform.

In `@docs/nemo-relay-cli/basic-usage.mdx`:
- Around line 164-166: Update the plugin editing guidance in the basic usage
documentation to explain how to resume editing the explicitly selected plugin
configuration. Direct users to use the printed resume command, or provide the
equivalent nemo-relay command with --plugin-config-path pointing to the sibling
plugins.toml path, instead of recommending default-discovery nemo-relay plugins
edit.
🪄 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: a9eaab3c-aa89-4357-945d-31b3440ee284

📥 Commits

Reviewing files that changed from the base of the PR and between e3de5c9 and 291362c.

📒 Files selected for processing (17)
  • crates/cli/README.md
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/commands/configure/wizard.rs
  • crates/cli/src/commands/mod.rs
  • crates/cli/src/commands/plugins/mod.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/run.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/src/plugins/mod.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
  • crates/cli/tests/coverage/shared/plugins_tests.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • docs/configure-plugins/plugin-configuration-files.mdx
  • docs/nemo-relay-cli/basic-usage.mdx
📜 Review details
🧰 Additional context used
📓 Path-based instructions (21)
**/*.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
  • 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/nemo-relay-cli/basic-usage.mdx
  • crates/cli/README.md
  • 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/nemo-relay-cli/basic-usage.mdx
  • crates/cli/README.md
  • docs/configure-plugins/plugin-configuration-files.mdx
{docs,examples}/**/*

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

Update docs and examples.

Files:

  • docs/nemo-relay-cli/basic-usage.mdx
  • docs/configure-plugins/plugin-configuration-files.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/README.md
  • crates/cli/src/commands/plugins/mod.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
  • crates/cli/src/commands/run.rs
  • crates/cli/tests/coverage/shared/plugins_tests.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • docs/configure-plugins/plugin-configuration-files.mdx
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/plugins/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/mod.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/src/commands/configure/wizard.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/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/nemo-relay-cli/basic-usage.mdx
  • docs/configure-plugins/plugin-configuration-files.mdx
**/*.{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
**/*.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/plugins/mod.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
  • crates/cli/src/commands/run.rs
  • crates/cli/tests/coverage/shared/plugins_tests.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/plugins/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/mod.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/src/commands/configure/wizard.rs
**/*.{rs,py}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • crates/cli/src/commands/plugins/mod.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
  • crates/cli/src/commands/run.rs
  • crates/cli/tests/coverage/shared/plugins_tests.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/plugins/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/mod.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/src/commands/configure/wizard.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/plugins/mod.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
  • crates/cli/src/commands/run.rs
  • crates/cli/tests/coverage/shared/plugins_tests.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/plugins/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/mod.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/src/commands/configure/wizard.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/plugins/mod.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
  • crates/cli/src/commands/run.rs
  • crates/cli/tests/coverage/shared/plugins_tests.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/plugins/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/mod.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/src/commands/configure/wizard.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/plugins/mod.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
  • crates/cli/src/commands/run.rs
  • crates/cli/tests/coverage/shared/plugins_tests.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/plugins/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/mod.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/src/commands/configure/wizard.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/plugins/mod.rs
  • crates/cli/src/commands/run.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/plugins/mod.rs
  • crates/cli/src/commands/mod.rs
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/src/commands/configure/wizard.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/plugins/mod.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
  • crates/cli/src/commands/run.rs
  • crates/cli/tests/coverage/shared/plugins_tests.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/plugins/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/mod.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/src/commands/configure/wizard.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/plugins/mod.rs
  • crates/cli/tests/coverage/shared/config_tests.rs
  • crates/cli/src/commands/run.rs
  • crates/cli/tests/coverage/shared/plugins_tests.rs
  • crates/cli/src/commands/plugins/subcommands.rs
  • crates/cli/src/commands/configure/model.rs
  • crates/cli/src/plugins/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/mod.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/src/plugins/types.rs
  • crates/cli/src/commands/configure/wizard.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
  • crates/cli/tests/coverage/shared/plugins_tests.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/tests/coverage/shared/setup_tests.rs
🔇 Additional comments (15)
crates/cli/src/configuration/mod.rs (1)

1092-1102: LGTM!

Also applies to: 1103-1115

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

33-49: LGTM!

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

9-9: LGTM!

Also applies to: 58-61, 70-75

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

163-163: LGTM!

Also applies to: 216-216

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

97-100: LGTM!

Also applies to: 122-169, 185-188

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

38-53: LGTM!

Also applies to: 55-66

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

549-549: LGTM!

Also applies to: 558-566, 577-579

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

21-22: 📐 Maintainability & Code Quality

Run the required Rust validation before handoff.

The field change is structurally sound, but the supplied context does not include validation results. Run just test-rust, cargo fmt --all, cargo clippy --workspace --all-targets -- -D warnings, and uv run pre-commit run --all-files.

As per coding guidelines, Rust changes must run the specified test, formatting, lint, and pre-commit checks.

Source: Coding guidelines

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

17-27: LGTM!

Also applies to: 37-37

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

167-179: LGTM!

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

11-11: LGTM!

Also applies to: 107-107, 148-158

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

6-54: LGTM!

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

175-187: LGTM!

crates/cli/README.md (1)

183-186: LGTM!

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

224-229: LGTM!

Comment thread crates/cli/src/commands/run.rs Outdated
Comment thread crates/cli/tests/coverage/shared/setup_tests.rs
Comment thread docs/nemo-relay-cli/basic-usage.mdx
@github-actions

Copy link
Copy Markdown

Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
@bbednarski9 bbednarski9 changed the title fix: preserve explicit plugin config targets fix: preserve explicit configuration editor targets Jul 29, 2026
@bbednarski9
bbednarski9 marked this pull request as draft July 29, 2026 18:21

@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)

168-171: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Resume guidance still points to default-discovery plugins edit, not the explicit target.

This text is unchanged by the current diff and still recommends nemo-relay plugins edit (default discovery) to resume editing after leaving the wizard, even though the wizard may have been operating on an explicit --config/--plugin-config-path target. Update this to point at the printed resume command or nemo-relay --plugin-config-path path/to/plugins.toml plugins edit.

As per path instructions, "Review documentation for technical accuracy against the current API, command correctness... Flag stale examples."

🤖 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 168 - 171, Update the
resume guidance in the plugin editor documentation to use the explicit target:
reference the printed resume command or show nemo-relay --plugin-config-path
path/to/plugins.toml plugins edit instead of default-discovery nemo-relay
plugins edit. Keep the project configuration guidance accurate and 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/coverage/commands/configure_editor_tests.rs`:
- Around line 183-199: Add `user` and `project` cases to
`config_editor_inherits_explicit_target_unless_scope_is_selected`, passing an
inherited target that should be ignored and asserting `resolve_edit_target`
returns the corresponding `TargetScope` and scope-specific default path. Keep
the existing default-inheritance and `global` assertions unchanged, and verify
each explicit flag overrides the inherited target.

---

Outside diff comments:
In `@docs/nemo-relay-cli/basic-usage.mdx`:
- Around line 168-171: Update the resume guidance in the plugin editor
documentation to use the explicit target: reference the printed resume command
or show nemo-relay --plugin-config-path path/to/plugins.toml plugins edit
instead of default-discovery nemo-relay plugins edit. Keep the project
configuration guidance accurate and 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: b236b597-3bde-4a95-858a-3479adc63155

📥 Commits

Reviewing files that changed from the base of the PR and between 291362c and a6476bb.

📒 Files selected for processing (6)
  • crates/cli/README.md
  • crates/cli/src/commands/configure/editor.rs
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • docs/nemo-relay-cli/basic-usage.mdx
📜 Review details
🧰 Additional context used
📓 Path-based instructions (21)
**/*.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/coverage/commands/configure_editor_tests.rs
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/configure/editor.rs
**/*.{rs,py}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/configure/editor.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/coverage/commands/configure_editor_tests.rs
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/configure/editor.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/coverage/commands/configure_editor_tests.rs
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/configure/editor.rs
**/*.{rs,go,js,ts}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

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

Files:

  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/configure/editor.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/coverage/commands/configure_editor_tests.rs
  • crates/cli/README.md
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/configure/editor.rs
  • docs/nemo-relay-cli/basic-usage.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.

Files:

  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/configure/editor.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/coverage/commands/configure_editor_tests.rs
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/configure/editor.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/commands/configure_editor_tests.rs
  • crates/cli/tests/coverage/commands/main_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
**/*.{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:

  • crates/cli/README.md
  • 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:

  • crates/cli/README.md
  • docs/nemo-relay-cli/basic-usage.mdx
{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/configure/mod.rs
  • crates/cli/src/commands/configure/editor.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/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
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
🔇 Additional comments (5)
crates/cli/src/commands/configure/mod.rs (1)

58-65: LGTM!

Also applies to: 66-75

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

279-291: LGTM!

crates/cli/README.md (1)

176-191: LGTM!

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

164-166: LGTM!

Also applies to: 189-193

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

79-93: 🔒 Security & Privacy

Explicit paths still write privately. User | Project uses atomic_write_private; only Global rejects auth headers and switches to system-readable writes.

			> Likely an incorrect or invalid review comment.

Comment thread crates/cli/tests/coverage/commands/configure_editor_tests.rs
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
@bbednarski9
bbednarski9 marked this pull request as ready for review July 29, 2026 19:54
@bbednarski9

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit fec48a1 into NVIDIA:main Jul 29, 2026
38 checks passed
rapids-bot Bot pushed a commit that referenced this pull request Jul 30, 2026
#### Overview

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

```text
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.

- [x] I confirm this contribution is my own work, or I have the right to submit it under this project's license.
- [x] 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)

- Relates to #583



## 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.

Authors:
  - Bryan Bednarski (https://github.com/bbednarski9)

Approvers:
  - Maryam Najafian (https://github.com/mnajafian-nv)
  - Will Killian (https://github.com/willkill07)

URL: #584
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:M PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants