Skip to content

fix: complete config editor schema support - #1420

Merged
willkill07 merged 3 commits into
NVIDIA:mainfrom
willkill07:fix/config-editor-schema-coverage
Oct 21, 2026
Merged

willkill07 merged 3 commits into
NVIDIA:mainfrom
willkill07:fix/config-editor-schema-coverage

Conversation

@willkill07

@willkill07 willkill07 commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Overview

nemo-relay config edit cannot edit provider API keys or API key helpers, cannot edit log sinks written as inline table arrays, and can save invalid settings. Add the missing controls and check configuration before saving.

  • 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 OpenAI and Anthropic API key controls and helper setup for command, args, timeout_ms, and auth_scheme.
  • Replace other credential sources for the same provider when setting a new source. Keep keys, helper commands, and helper arguments hidden.
  • Support inline log sink arrays in [logging] and [daemon.logging] while keeping the existing TOML form.
  • Apply runtime validation before writing the selected file. Keep the editor open after a failed save, preserve the file, and never run helpers during validation.
  • Group the documentation by file selection, editor settings, credentials, logging, and saving. Give plugin editing its own section.

Validation

  • Full just test-rust run before updating the base: 6,030 passed, one skipped. One diagnostics timeout passed on retry.
  • Focused CLI editor tests after updating from upstream main: 21 passed.
  • Terminal smoke test passed for both providers, hidden inputs, rejected-save recovery, inline sink editing, and saving.
  • just docs passed. The published-redirect comparison was skipped because FDR returned HTTP 403.
  • Repository commit hooks passed, including formatting, Clippy, Cargo checks, link checks, and dependency audits.

No public API or configuration schema changes.

Where should the reviewer start?

Start with crates/cli/src/commands/configure/editor.rs for credential replacement and inline sink handling. Then review crates/cli/tests/coverage/commands/configure_editor_tests.rs for round-trip, redaction, and failed-save coverage. Save validation uses the runtime checks in crates/cli/src/configuration/mod.rs.

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

  • Relates to: none

Summary by CodeRabbit

  • New Features

    • Expanded the configuration editor for provider API keys, authorization headers, API-key helpers, gateway settings, agents, and logging sinks.
    • Added support for editing multiple logging sink formats.
    • Added clearer credential validation, source selection, secret protection, and provider-specific authentication options.
    • Save operations now validate configurations and keep the editor open when errors occur.
  • Documentation

    • Expanded configuration and plugin guidance, including file selection, permissions, precedence, validation, credential handling, and editor usage.

@willkill07
willkill07 requested review from a team as code owners October 20, 2026 17:29
@github-actions github-actions Bot added size:L PR is large Bug issue describes bug; PR fixes bug lang:rust PR changes/introduces Rust code labels Oct 20, 2026
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/NeMo-Relay/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Enterprise
  • Run ID: 58fddea8-bb32-45b2-b39b-0a7686917d74
📥 Commits

Reviewing files that changed from the base of the PR and between 409d884 and ca320e5.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/NeMo-Relay/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Enterprise
  • Run ID: df041434-2aab-40fd-9c1f-a41fb8051d79
📥 Commits

Reviewing files that changed from the base of the PR and between 4e9dc86 and a3dd48f.

📒 Files selected for processing: 6
  • crates/cli/README.md
  • crates/cli/src/commands/configure/editor.rs
  • crates/cli/src/commands/configure/editor/prompt.rs
  • crates/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • docs/nemo-relay-cli/basic-usage.mdx

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 8 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout: 14
  • GitHub Check: Rust / Package (linux-musl-amd64)
  • GitHub Check: Rust / Package (windows-arm64)
  • GitHub Check: Rust / Package (macos-arm64)
  • GitHub Check: Rust / Package (linux-arm64)
  • GitHub Check: Rust / Package (linux-amd64)
  • GitHub Check: Rust / Package (windows-amd64)
  • GitHub Check: Rust / Test (windows-arm64)
  • GitHub Check: Check / Run
  • GitHub Check: Rust / Test (windows-amd64)
  • GitHub Check: Rust / Package (linux-musl-arm64)
  • GitHub Check: Rust / Test (linux-arm64)
  • GitHub Check: Rust / Test (linux-amd64)
  • GitHub Check: Rust / Test (macos-arm64)
  • GitHub Check: Preview docs
🧰 Additional context used
📚 Code guidelines: 5
.agents/skills/contribute-docs/SKILL.md — configured
.agents/skills/review-doc-style/SKILL.md — configured
CONTRIBUTING.md — configured
.agents/skills/prepare-code-freeze/SKILL.md — configured
.agents/skills/draft-release-notes/SKILL.md — configured
📓 Path-based instructions: 9
Review documentation for technical accuracy against the current API, command correctness, and consistency across language bindings.

⚙️ CodeRabbit configuration file

Files:

  • docs/nemo-relay-cli/basic-usage.mdx
Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.

⚙️ CodeRabbit configuration file

Files:

  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
Source excerpt: In MDX files, top-of-file comments must use JSX comment delimiters: `{/*` to open and `*/}` to close.

📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)

Files:

  • docs/nemo-relay-cli/basic-usage.mdx
Source excerpt: Verify MDX files use JSX delimiters for top-of-file SPDX comments.

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

Files:

  • docs/nemo-relay-cli/basic-usage.mdx
Applicability reference: AGENTS.md: # NeMo Relay Repository Guidance See `CONTRIBUTING.md` and `docs/contribute/testing-and-docs.mdx` for contributor details, and `.agents/skills/README.md` for the maintainer skill boundar...

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Files:

  • crates/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • crates/cli/src/commands/configure/editor/prompt.rs
  • crates/cli/src/commands/configure/editor.rs
Source excerpt: Search documentation source for references to the old version and update current-version install commands, package examples, and configuration examples to `` where appropriate: Review matches before changing th...

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

Files:

  • docs/nemo-relay-cli/basic-usage.mdx
Applicability reference: AGENTS.md: # NeMo Relay Repository Guidance See `CONTRIBUTING.md` and `docs/contribute/testing-and-docs.mdx` for contributor details, and `.agents/skills/README.md` for the maintainer skill boundary.

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Files:

  • crates/cli/src/configuration/mod.rs
  • crates/cli/tests/coverage/commands/configure_editor_tests.rs
  • crates/cli/src/commands/configure/editor/prompt.rs
  • crates/cli/src/commands/configure/editor.rs
Source excerpt: Identify the changed documentation, examples, or public strings and any corresponding entry points such as `README.md`, `docs/index.yml`, or package READMEs.

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

Files:

  • crates/cli/README.md
Source excerpt: Preserve MDX front matter and the JSX SPDX comment.

📄 CodeRabbit inference engine (.agents/skills/draft-release-notes/SKILL.md)

Files:

  • docs/nemo-relay-cli/basic-usage.mdx
🔇 Additional comments: 6
crates/cli/src/commands/configure/editor.rs: 1

9-11: LGTM!

Also applies to: 98-107, 311-365, 391-412, 416-420, 424-431, 434-442, 445-456, 462-466, 471-486, 556-556, 588-589, 609-610

crates/cli/src/configuration/mod.rs: 1

1694-1719: LGTM!

crates/cli/src/commands/configure/editor/prompt.rs: 1

59-65: LGTM!

Also applies to: 143-158, 174-178, 343-372, 380-471

crates/cli/tests/coverage/commands/configure_editor_tests.rs: 1

273-274: LGTM!

Also applies to: 290-536

crates/cli/README.md: 1

147-151: LGTM!

Also applies to: 153-156, 162-165, 171-197, 218-284

docs/nemo-relay-cli/basic-usage.mdx: 1

301-302: LGTM!

Also applies to: 308-314, 316-394

Walkthrough

The configuration editor adds API-key and API-key helper options for OpenAI and Anthropic. It validates edited documents before saving, supports inline-table logging sinks, and keeps the editor open when a save fails. The documentation and tests cover these behaviors.

Changes

Configuration editor

Layer / File(s) Summary
Credential editing and validated saves
crates/cli/src/commands/configure/editor.rs, crates/cli/src/commands/configure/editor/prompt.rs, crates/cli/src/configuration/mod.rs, crates/cli/tests/coverage/commands/configure_editor_tests.rs, crates/cli/README.md, docs/nemo-relay-cli/basic-usage.mdx
The editor adds API-key and helper credential flows, validates configuration before writes, and reports save failures without closing the prompt. Tests and documentation cover credential replacement, validation, file selection, and plugin editor policies.
Inline logging sink support
crates/cli/src/commands/configure/editor.rs, crates/cli/tests/coverage/commands/configure_editor_tests.rs, docs/nemo-relay-cli/basic-usage.mdx
Logging sink operations support arrays of tables and arrays of inline tables. Tests cover editing, addition, removal, and validation; documentation describes supported sink forms.

Priority: ⬇️ Low

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant ConfigEditorPrompt
  participant ConfigDocument
  participant validate_config_document
  participant ConfigFile
  User->>ConfigEditorPrompt: Enter provider credential or helper settings
  ConfigEditorPrompt->>ConfigDocument: Set selected credential
  User->>ConfigEditorPrompt: Save configuration
  ConfigEditorPrompt->>ConfigDocument: Write selected file
  ConfigDocument->>validate_config_document: Validate document
  ConfigDocument->>ConfigFile: Write validated TOML
Loading
Merge Risk: ⚪ Minimal · up to a3dd4

The reviewed changes are mergeable after normal checks; no actionable issue remains.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 26.47% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 34 functions across 4 files. (2 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title follows Conventional Commits format with the allowed lowercase type fix, uses an imperative summary, and meets the length and punctuation requirements.
Description check Passed The description includes all required sections, explains the changes and validation, identifies review starting points, and records that there are no 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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 26.47% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 34 functions across 4 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@willkill07 willkill07 self-assigned this Oct 20, 2026
@willkill07 willkill07 added this to the 0.11 milestone Oct 20, 2026
@github-actions

Copy link
Copy Markdown

@greysonlalonde greysonlalonde left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

☑️

@willkill07
willkill07 merged commit dafed3d into NVIDIA:main Oct 21, 2026
45 checks passed
@willkill07
willkill07 deleted the fix/config-editor-schema-coverage branch October 30, 2026 14:46

This branch was previously deployed

1 inactive deployment
fern — ca320e5c Deployed Oct 21, 2026 by willkill07 via Clean up docs preview #6129
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:L PR is large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants