Skip to content

feat: add structured config editor - #565

Open
willkill07 wants to merge 2 commits into
NVIDIA:mainfrom
willkill07:wkk_relay-493-config-edit
Open

feat: add structured config editor#565
willkill07 wants to merge 2 commits into
NVIDIA:mainfrom
willkill07:wkk_relay-493-config-edit

Conversation

@willkill07

@willkill07 willkill07 commented Jul 27, 2026

Copy link
Copy Markdown
Member

Overview

Add a structured interactive editor for the supported non-agent Relay configuration.

  • I confirm this contribution is my own work, or I have the right to submit it under this project's license.
  • I searched existing issues and open pull requests, and this does not duplicate existing work.

Details

  • Add nemo-relay config edit with user (default), project, and global target scopes.
  • Edit gateway limits, provider upstreams, and operational logging file sinks while preserving unrelated TOML and redacting auth headers.
  • Document command scope and credential guidance, and add parser, model, validation, and safe non-TTY behavior coverage.

Where should the reviewer start?

Start with crates/cli/src/commands/configure/editor.rs; it contains the TOML-backed editor model and the interactive menus. Then review the command dispatch and focused tests.

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

  • Relates to: RELAY-493

Summary by CodeRabbit

  • New Features
    • Added an interactive nemo-relay config edit editor for gateway limits, provider upstream settings, operational/file logging, and file sinks.
    • Supports --user, --project (nearest project discovery), and --global scopes; rejects conflicting scope flags.
    • Includes a Preview step that redacts sensitive upstream auth values, validates inputs, and saves atomically; editor requires a TTY.
  • Documentation
    • Expanded CLI docs with “Edit Gateway Configuration” guidance, scope selection, save/creation behavior, preservation of unrelated settings, and credential handling via environment variables.
  • Tests
    • Added coverage for parsing, preview redaction, validation, atomic write safety, and TTY-only execution.

Signed-off-by: Will Killian <wkillian@nvidia.com>
@willkill07
willkill07 requested review from a team as code owners July 27, 2026 21:09
@github-actions github-actions Bot added size:XL PR is extra large Feature a new feature lang:rust PR changes/introduces Rust code labels Jul 27, 2026
@coderabbitai

coderabbitai Bot commented Jul 27, 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: f07f05d7-751a-406d-bb5a-a9cc8c041880

📥 Commits

Reviewing files that changed from the base of the PR and between bcf806a and f6f3c98.

📒 Files selected for processing (4)
  • 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
📜 Recent review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Check / Run
  • GitHub Check: Preview docs
🧰 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/configure/mod.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.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/src/commands/configure/mod.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.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/src/commands/configure/mod.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.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/src/commands/configure/mod.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.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/src/commands/configure/mod.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/configure/editor.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/configure/mod.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/src/commands/configure/mod.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/configure/editor.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/configure/mod.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.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/src/commands/configure/mod.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.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
🔇 Additional comments (6)
crates/cli/src/commands/configure/mod.rs (1)

6-21: LGTM!

Also applies to: 33-61

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

224-260: LGTM! Coverage now exercises both the --user/--global group conflict and the edit + --reset clap-level conflict, addressing the previously-requested error-path coverage.

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

76-88: LGTM! These changes address the prior review feedback: injectable TTY check, atomic/private-permission writes, redaction and key-lookup now covering inline-table upstream, and the checked i64 conversion preventing retained_files from wrapping negative.

Also applies to: 512-534, 536-578, 641-649, 693-715, 899-911, 926-942


517-534: 🎯 Functional Correctness

No issue here: this let-chain syntax is supported.

			> Likely an incorrect or invalid review comment.

970-971: 🩺 Stability & Availability

No action neededmod tests and crate::filesystem::fail_next_atomic_write are both behind #[cfg(test)], so this test hook is not shipped in production.

			> Likely an incorrect or invalid review comment.
crates/cli/tests/coverage/commands/configure_editor_tests.rs (1)

1-216: LGTM! Coverage directly targets each previously-flagged gap: inline/dotted redaction, the retained_files overflow path, atomic-write-with-injected-failure plus 0600 permission check, and a deterministic non-TTY assertion instead of exercising real stdin. As per path instructions, "Tests should cover the behavior promised by the changed API surface, including error paths."

Source: Path instructions


Walkthrough

Adds nemo-relay config edit with scoped, interactive editing of gateway, upstream, logging, and file sink settings. The editor validates input, redacts authorization headers in previews, preserves unrelated TOML, and saves only after confirmation.

Changes

Configuration editing

Layer / File(s) Summary
Command wiring and scope parsing
crates/cli/src/commands/configure/mod.rs, crates/cli/tests/coverage/commands/main_tests.rs
Registers config edit, supports mutually exclusive user/project/global scopes, rejects conflicting arguments, and adds CLI parsing tests.
Configuration document and target resolution
crates/cli/src/commands/configure/editor.rs, crates/cli/tests/coverage/commands/configure_editor_tests.rs
Resolves target paths and implements TOML loading, typed updates, validation, redacted previews, atomic persistence, and removal of empty sections, with document and persistence tests.
Interactive editing and validation
crates/cli/src/commands/configure/editor.rs, crates/cli/README.md, docs/nemo-relay-cli/basic-usage.mdx, crates/cli/tests/coverage/commands/configure_editor_tests.rs
Adds TTY-only menus for gateway, upstream, logging, and file sink settings, with input validation, lifecycle coverage, and documentation for scopes, clearing, preservation, and credential handling.

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

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant Editor
  participant ConfigDocument
  participant ConfigFile
  CLI->>Editor: invoke config edit with scope
  Editor->>ConfigDocument: load target TOML
  Editor->>ConfigDocument: apply validated menu changes
  Editor->>ConfigDocument: render redacted preview
  Editor->>ConfigFile: write updated TOML on save
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Conventional Commits format is correct and the title accurately summarizes the new structured config editor.
Description check ✅ Passed All required sections are present and filled with substantive details, including overview, implementation notes, reviewer start, and issue reference.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

@willkill07 willkill07 self-assigned this Jul 27, 2026
@willkill07 willkill07 added this to the 0.7 milestone Jul 27, 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: 8

🤖 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/configure/editor.rs`:
- Around line 508-514: Update the write method to serialize the document to a
temporary file in the same directory, creating it with restrictive 0600
permissions, then atomically rename it to self.path. Preserve existing
parent-directory creation and propagate write or rename failures without
truncating the existing configuration.
- Around line 892-904: Update target_path for TargetScope::Global to validate
the global config location’s parent existence and writability before returning
the path, and convert failures into CliError::Config with a message explaining
that --global requires elevated privileges. Preserve the existing user and
project target behavior and the returned global path when validation succeeds.
- Around line 1160-1167: Update editor_requires_an_interactive_terminal so it
does not invoke edit against the process stdin, which can pass the TTY check and
block in select while reading the real user configuration. Test the ensure_tty
behavior using an injected non-interactive terminal flag or gate the test on
stdin being non-terminal, preserving the expected error assertion.
- Around line 916-925: Move the #[cfg(test)] mod tests block from editor.rs into
the crate’s tests/coverage tree, preserving its existing assertions and helpers.
Because the tests use private ConfigDocument, expose only the necessary
pub(crate) seam or relocate ConfigDocument into a testable module, while keeping
production visibility unchanged otherwise.
- Around line 860-877: Update set_sink_rotation to validate retained before
writing it as an i64: perform a checked i64 conversion for retained and return
the existing CliError::Config overflow error when it exceeds i64::MAX. Preserve
the FileLogRotationConfig::new validation and only assign retained_files after
the conversion succeeds.
- Around line 516-526: Update preview to redact credentials from all valid
upstream representations, including inline tables and dotted keys, rather than
relying only on Item::as_table_mut. Ensure openai_auth_header and
anthropic_auth_header are replaced with "<redacted>" when present, and use the
same representation-aware lookup behavior for the related item()/has_key
handling so inline or dotted keys are not reported as unset.

In `@crates/cli/src/commands/configure/mod.rs`:
- Around line 56-65: Declare the `config edit` argument/subcommand conflict on
`ConfigCommand` using clap’s `args_conflicts_with_subcommands` attribute. Remove
the manual `command.reset || command.scope.is_some() || command.agent.is_some()`
validation from `execute`, relying on clap to reject mixed edit and setup/reset
arguments; retain the edit execution and success return path.

In `@crates/cli/tests/coverage/commands/main_tests.rs`:
- Around line 223-254: The existing test only covers argument parsing conflicts;
extend cli_parses_config_edit_scopes_and_rejects_conflicts to execute a parsed
config edit combined with a setup/reset option such as --reset and assert that
execute returns an error. Ensure the test uses the valid positional-agent form
that parses successfully and exercises the runtime guard for edit combined with
reset, scope, or an agent.
🪄 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: 770bf4ad-4f91-4819-8126-9c9fd32bd708

📥 Commits

Reviewing files that changed from the base of the PR and between b3f5b37 and bcf806a.

📒 Files selected for processing (5)
  • crates/cli/README.md
  • crates/cli/src/commands/configure/editor.rs
  • crates/cli/src/commands/configure/mod.rs
  • crates/cli/tests/coverage/commands/main_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 (21)
**/*.{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
**/*

📄 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/README.md
  • docs/nemo-relay-cli/basic-usage.mdx
  • crates/cli/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/configure/editor.rs
  • crates/cli/src/commands/configure/mod.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
**/*.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/main_tests.rs
  • crates/cli/src/commands/configure/editor.rs
  • crates/cli/src/commands/configure/mod.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/main_tests.rs
  • crates/cli/src/commands/configure/editor.rs
  • crates/cli/src/commands/configure/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/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/configure/editor.rs
  • crates/cli/src/commands/configure/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/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/configure/editor.rs
  • crates/cli/src/commands/configure/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/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/configure/editor.rs
  • crates/cli/src/commands/configure/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/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/configure/editor.rs
  • crates/cli/src/commands/configure/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/tests/coverage/commands/main_tests.rs
  • crates/cli/src/commands/configure/editor.rs
  • crates/cli/src/commands/configure/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/commands/main_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/configure/editor.rs
  • crates/cli/src/commands/configure/mod.rs
🔇 Additional comments (4)
crates/cli/src/commands/configure/mod.rs (1)

17-20: LGTM!

Also applies to: 32-54

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

40-74: LGTM!

Also applies to: 600-702

crates/cli/README.md (1)

133-148: LGTM!

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

171-191: LGTM!

Comment thread crates/cli/src/commands/configure/editor.rs
Comment thread crates/cli/src/commands/configure/editor.rs
Comment thread crates/cli/src/commands/configure/editor.rs
Comment thread crates/cli/src/commands/configure/editor.rs
Comment thread crates/cli/src/commands/configure/editor.rs Outdated
Comment thread crates/cli/src/commands/configure/editor.rs Outdated
Comment thread crates/cli/src/commands/configure/mod.rs
Comment thread crates/cli/tests/coverage/commands/main_tests.rs
@github-actions

Copy link
Copy Markdown

Signed-off-by: Will Killian <wkillian@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature a new feature 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.

1 participant