Skip to content

feat(cli): load plugin configs from plugin.toml#93

Merged
rapids-bot[bot] merged 7 commits into
NVIDIA:mainfrom
bbednarski9:bbednarski/validate-pr89-sidecar-plugin-bridge
May 13, 2026
Merged

feat(cli): load plugin configs from plugin.toml#93
rapids-bot[bot] merged 7 commits into
NVIDIA:mainfrom
bbednarski9:bbednarski/validate-pr89-sidecar-plugin-bridge

Conversation

@bbednarski9
Copy link
Copy Markdown
Contributor

@bbednarski9 bbednarski9 commented May 13, 2026

Overview

  • 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

Summary

This PR wires the CLI gateway to the generic NeMo Flow plugin configuration path and adds a dedicated plugin.toml file option for process-level plugin activation.

The gateway now resolves a single PluginConfig from supported configuration sources, activates it when the server starts, and clears it when the server shuts down. The implementation is generic over plugin kind; the tests exercise the observability plugin today while keeping the config path usable for future plugin kinds such as adaptive once those plugins are registered in the CLI process.

Changes

  • Add daemon-mode --plugin-config / NEMO_FLOW_PLUGIN_CONFIG support.
  • Add plugin.toml discovery and loading for root-level generic PluginConfig TOML.
  • Resolve plugin.toml alongside explicit --config path/to/config.toml.
  • Discover implicit plugin.toml files from system, nearest project, and user scopes.
  • Reject conflicting plugin definitions across plugin.toml, [plugins].config, and --plugin-config.
  • Preserve existing [plugins].config support in config.toml.
  • Document the CLI gateway plugin.toml shape for observability plugin configuration.

Validation

cargo fmt --check
cargo test -p nemo-flow-cli
cargo build -p nemo-flow-cli

Notes

  • plugin.toml uses the generic plugin config shape at the file root:
version = 1

[[components]]
kind = "observability"
enabled = true

[components.config]
version = 1
  • This PR covers observability configuration only in examples/tests.
  • Adaptive remains out of scope for this PR, but the resolver is intentionally plugin-kind agnostic.

Where should the reviewer start?

Start with crates/cli/src/config.rs. The key design decision is that the CLI still resolves exactly one generic PluginConfig, but that config may now come from --plugin-config, [plugins].config, or plugin.toml. The conflict checks in that file are the main behavior to review.

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

  • Closes #

Summary by CodeRabbit

  • New Features

    • Add CLI/env --plugin-config support with startup activation of a single process-level plugin configuration, discovery/precedence of plugin.toml, and daemon-mode triggering via the flag.
    • Plugin initialization and teardown tied to server lifetime.
  • Bug Fixes

    • Improved validation, conflict detection and user-facing error reporting for plugin configuration sources and merges.
  • Documentation

    • New CLI gateway plugin configuration docs with examples, precedence, merge semantics, and validation notes.
  • Tests

    • Expanded integration and coverage tests for discovery, precedence, validation, and server behavior.

Review Change Stack

… CLI

Signed-off-by: GSD Agent <bbednarski@nvidia.com>
Signed-off-by: GSD Agent <bbednarski@nvidia.com>
@bbednarski9 bbednarski9 requested a review from a team as a code owner May 13, 2026 02:06
@github-actions github-actions Bot added size:L PR is large lang:rust PR changes/introduces Rust code labels May 13, 2026
@bbednarski9 bbednarski9 added Feature a new feature Improvement improvement to existing functionality and removed size:L PR is large lang:rust PR changes/introduces Rust code labels May 13, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Note

Reviews paused

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

Use the following commands to manage reviews:

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

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds process-level plugin configuration to the CLI gateway: CLI/env input, discovery/precedence for plugin.toml and config.toml, parsing and conflict validation, server startup activation/teardown, tests, and documentation.

Changes

Plugin Configuration Lifecycle for NeMo Flow Gateway

Layer / File(s) Summary
Plugin Config CLI Interface
crates/cli/src/config.rs
New ServerArgs.plugin_config field accepts --plugin-config and NEMO_FLOW_PLUGIN_CONFIG. Extends daemon-mode detection to treat plugin-config presence as daemon request.
Server Plugin Lifecycle Management
crates/cli/src/server.rs
Adds PluginActivation type; serve_listener initializes plugins before running the Axum server and clears plugin configuration on shutdown (with Drop fallback).
Config Resolution & Error Propagation
crates/cli/src/config.rs
apply_server_overrides becomes fallible; resolve_server_config/resolve_run_config propagate plugin-config parsing/validation errors; run-mode JSON overrides route plugin_config through apply_cli_plugin_config, and run-level plugin_config overrides inherited server-level values.
Shared Config Loading & Discovery
crates/cli/src/config.rs
load_shared_config detects [plugins].config in config.toml sources, rejects multiple such sources, and adds plugin_config_paths/implicit_plugin_config_paths and find_project_plugin_config for plugin.toml lookup and precedence.
Plugin TOML Runtime & Merge Helpers
crates/cli/src/config.rs
Adds PluginTomlConfig loaders, apply_plugin_toml_config, apply_cli_plugin_config, recursive TOML merging (merge_plugin_toml / merge_plugin_components) with components merged by kind, and helpers for conflict detection and formatting.
Config & Server Integration Tests
crates/cli/tests/coverage/config_tests.rs, crates/cli/tests/coverage/server_tests.rs
Extends config tests to cover plugin.toml ingestion, discovery/precedence, merging and conflict errors; expands server tests with plugin activation/deactivation integration tests, custom test plugin, observability exporter assertions, and a wait_for_gateway helper.
Plugin Configuration User Documentation
docs/export-observability-data/observability-plugin.md
Documents allowed plugin-config sources, discovery/precedence rules, recursive merge semantics, component merge-by-kind behavior, mutual-exclusivity errors, validation expectations, and provides an observability plugin.toml example.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 65.45% 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 Title follows Conventional Commits format with 'feat' type, '(cli)' scope, and a concise imperative summary under 72 characters.
Description check ✅ Passed Description includes overview with checkboxes, detailed summary of changes, validation steps, design rationale, and guidance for reviewers, though Related Issues section is incomplete.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@bbednarski9 bbednarski9 added size:M PR is medium Under Review PR is under review and should not be marked as Stale labels May 13, 2026
@bbednarski9 bbednarski9 changed the title Bbednarski/validate pr89 sidecar plugin bridge feat(observability): bridge between CLI (side car) and observability plugin + plugin.toml May 13, 2026
@github-actions github-actions Bot added size:L PR is large lang:rust PR changes/introduces Rust code Feature a new feature and removed size:M PR is medium Feature a new feature Improvement improvement to existing functionality labels May 13, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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/config.rs`:
- Around line 699-705: The plugin_config_paths function currently returns an
empty vec when explicit.as_ref().parent() is None, silently skipping discovery;
change the logic in plugin_config_paths so that when an explicit PathBuf has no
parent you default to the current directory (e.g., use "." or Path::new(".") as
the parent) and return a Vec with that parent joined to "plugin.toml" (i.e.,
always produce at least one path like "./plugin.toml" for the explicit case),
ensuring plugin.toml is checked for both ordinary and parent-less explicit
paths.

In `@crates/cli/src/server.rs`:
- Around line 68-84: The serve error currently takes precedence and the error
from plugin_activation.clear() is dropped; update the shutdown cleanup logic
around serve_result and clear_result (references: PluginActivation::clear,
serve_result, clear_result) to detect when both return Err and log or report the
clear error (e.g., with tracing::error! or eprintln!) alongside returning the
serve error; implement this by awaiting/collecting both results, returning the
serve_result error if present but emitting the clear_result error when it exists
so the clear failure is not silently lost.
🪄 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: 38007999-c71c-4cfe-a4e1-d46f967c30d3

📥 Commits

Reviewing files that changed from the base of the PR and between 8495497 and 34fc911.

📒 Files selected for processing (5)
  • crates/cli/src/config.rs
  • crates/cli/src/server.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/server_tests.rs
  • docs/export-observability-data/observability-plugin.md
📜 Review details
🧰 Additional context used
📓 Path-based instructions (26)
**/*.{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:

  • docs/export-observability-data/observability-plugin.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:

  • docs/export-observability-data/observability-plugin.md
**/*.{md,rst,txt}

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

**/*.{md,rst,txt}: Spell NVIDIA in all caps. Do not use Nvidia, nvidia, or NV.
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 documentation.
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 documentation unless the source, platform, or legal guidance explicitly requires them.
Do not add trademark symbols to NeMo Flow learning documentation by default.
Do not rewrite API names, package names, command flags, or code literals for style reasons.

Files:

  • docs/export-observability-data/observability-plugin.md
**/*.{md,markdown,rst}

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

**/*.{md,markdown,rst}: 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
Use monospace formatting for code elements, commands, parameters, package names, and expressions
Use monospace formatting for directories, file names, and paths
Use angle brackets inside monospace for variables inside paths, such as /home/<username>/.login
Use quotation marks for error messages and strings in documentation
Use bold formatting for UI buttons, menus, fields, and labels in documentation
Use angle brackets between UI labels for menu paths, such as File > Save As
Use italics for new terms on first use in documentation
Use italics for publication titles in documentation
Use plain text formatting for keyboard shortcuts in documentation
Prefer [NVIDIA/NeMo](link) format for GitHub repository references over generic phrases 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 in documentation
Avoid generic link anchors such as 'here,' 'this page,' and 'read more' in documentation
Include the acronym in link text if a linked term includes an acronym
Do not link long sentences or multiple sentences in documentation
Avoid links that pull readers away from a procedure unles...

Files:

  • docs/export-observability-data/observability-plugin.md
**/*.{html,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Include SPDX license headers in HTML and Markdown files using HTML comment syntax

Files:

  • docs/export-observability-data/observability-plugin.md
docs/**/*.md

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Run ./scripts/build-docs.sh for documentation site changes

docs/**/*.md: Relevant getting-started or reference docs must be updated when examples change
Release-policy docs must point to GitHub Releases as the only release-history source of truth

docs/**/*.md: Use title case for headings in technical documentation
Introduce code blocks, tables, and lists with complete lead-in sentences in documentation

Files:

  • docs/export-observability-data/observability-plugin.md
**/*.md

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Run Markdown link checking via lychee for README.md, CONTRIBUTING.md, and docs/ through pre-commit hooks

Files:

  • docs/export-observability-data/observability-plugin.md
**/*.{md,markdown,py,sh,bash,js,ts,java,cpp,go,rust}

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

Keep package names, repo references, and build commands current in documentation

Files:

  • docs/export-observability-data/observability-plugin.md
{RELEASING.md,CHANGELOG.md,docs/**/*.md}

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

Keep release-process and release-notes guidance in repo-maintainer docs such as RELEASING.md, not as user-facing docs pages or CHANGELOG.md

Files:

  • docs/export-observability-data/observability-plugin.md
**/*.{md,markdown,py,sh,bash}

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

Keep stable user-facing wrappers at scripts/ root in docs and examples; only point at namespaced helper paths when documenting internal maintenance work

Files:

  • docs/export-observability-data/observability-plugin.md
**/*.{md,markdown,py,sh,bash,js,ts,example}

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

Example commands must match current package names and paths

Files:

  • docs/export-observability-data/observability-plugin.md
{scripts/*.sh,docs/**/*.md}

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

Use root ./scripts/*.sh commands in docs and contributor guidance as documented, with implementations under scripts/third-party/

Files:

  • docs/export-observability-data/observability-plugin.md
{docs/**,examples/**,crates/adaptive/**,python/nemo_flow/**,go/nemo_flow/**,**/{example,component}.{ts,tsx,js,rs,py,go}}

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

Any new adaptive component kind must have documentation, examples, and binding coverage across all supported languages

Files:

  • docs/export-observability-data/observability-plugin.md
{README*,CHANGELOG*,docs/**/*.{md,rst,txt},examples/**/*,*.md}

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

Update documentation, examples, and getting-started guides with new package/module/crate names after rename operations

Files:

  • docs/export-observability-data/observability-plugin.md
**/*.{md,txt,rst}

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

**/*.{md,txt,rst}: Ensure commands, package names, file paths, and APIs in documentation are correct and not stale; flag incorrect or outdated information as blocking issues
Ensure examples and procedures in documentation will execute successfully with current APIs and commands
Use consistent user-facing terminology throughout documentation that matches current repo terminology
Capitalize NVIDIA correctly in all documentation and public-facing text
Format code, commands, paths, and filenames as inline code (monospace) in documentation
Use descriptive anchor text for links instead of bare URLs or weak labels like 'here' in documentation
Prefer active voice, present tense, short sentences, and plain English in documentation
Structure documentation procedures as imperative steps that are easy to scan and not too long for a single sequence
Prefer 'after' instead of 'once' for temporal references in documentation
Use 'can' instead of 'may' when describing possibility (rather than permission) in documentation
Avoid ambiguous numeric dates and ordinal dates in documentation body text

Files:

  • docs/export-observability-data/observability-plugin.md
{README.md,docs/**/*.md,examples/**/*.{js,ts,py,go,rs}}

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

Keep documentation and examples synchronized with current install, import, and build commands

Files:

  • docs/export-observability-data/observability-plugin.md
**/*.{py,js,ts,tsx,go,rs,md}

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

Format changed files with the language-native formatter before the final lint/test pass

Files:

  • docs/export-observability-data/observability-plugin.md
  • crates/cli/src/server.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/server_tests.rs
  • crates/cli/src/config.rs
{README.md,CONTRIBUTING.md,docs/**/*.md}

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

For docs-only changes, run targeted checks only if commands, package names, or examples changed. Use just docs for docs-site builds and just docs-linkcheck when links changed

Files:

  • docs/export-observability-data/observability-plugin.md
{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/export-observability-data/observability-plugin.md
**/*.rs

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

**/*.rs: Run cargo fmt --all for FFI work as it is Rust work
Run just test-rust for FFI validation
Run cargo clippy --workspace --all-targets -- -D warnings to enforce warnings-as-errors linting

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

**/*.rs: Run cargo fmt --all for Rust code formatting
Run cargo clippy --workspace --all-targets -- -D warnings to enforce Rust linting with no warnings
Run just test-rust as the shared-runtime build/test wrapper for Rust changes

Use Rust snake_case naming convention for Rust code

**/*.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 Rust code formatting when Node changes touch Rust files
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting when Rust files changed as part of Node work

**/*.rs: Always run just test-rust when any Rust code changes
Always run cargo fmt --all when any Rust code changes
Always run cargo clippy --workspace --all-targets -- -D warnings when any Rust code changes

Files:

  • crates/cli/src/server.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/server_tests.rs
  • crates/cli/src/config.rs
**/*.{rs,go,js,ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Include SPDX license headers in all Rust, Go, JavaScript, and TypeScript source files using C-style comment syntax

Files:

  • crates/cli/src/server.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/server_tests.rs
  • crates/cli/src/config.rs
**/*.{rs,py,go,js,ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use SONAR_IGNORE_START / SONAR_IGNORE_END markers only for documented false positives that cannot be resolved in code; keep ignored blocks small, add explanatory comments, and require reviewer sign-off

Files:

  • crates/cli/src/server.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/server_tests.rs
  • crates/cli/src/config.rs
**/*.{js,ts,tsx,jsx,py,rs,go,java,c,cpp,h,cc,cxx,cs,rb,php,swift,kt}

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

Changed files must be formatted with the language-native formatter

Files:

  • crates/cli/src/server.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/server_tests.rs
  • crates/cli/src/config.rs
**/*.{rs,py,js,ts,tsx,go}

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

During iteration, prefer uv run pre-commit run --files <changed files...> for targeted validation

Files:

  • crates/cli/src/server.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/server_tests.rs
  • crates/cli/src/config.rs
{crates/**/tests/**,python/tests/**,go/nemo_flow/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_flow/**/*_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/config_tests.rs
  • crates/cli/tests/coverage/server_tests.rs
**/{config,schema,adaptive}.{yaml,yml,json,ts,tsx,py,go,rs}

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

Ensure dynamic config shape matches the documented canonical model in docs/use-adaptive-optimization/configure.md

Files:

  • crates/cli/src/config.rs
🔇 Additional comments (17)
crates/cli/src/config.rs (5)

172-175: LGTM!

The new plugin_config CLI argument with environment variable fallback follows the established pattern for other server args.


183-192: LGTM!

Including plugin_config in daemon mode detection is consistent with the design that any explicit configuration flag signals intent to run the server.


632-655: LGTM!

The conflict detection logic correctly tracks which config.toml files define [plugins].config and errors when multiple sources are found. The error message is actionable.


913-930: LGTM!

The apply_plugin_toml_config function correctly rejects configurations where both config.toml's [plugins].config and plugin.toml are present. The error message clearly identifies both conflicting sources.


932-940: LGTM!

The CLI plugin config conflict check runs after file-based config is applied, so config.plugin_config.is_some() correctly detects if either [plugins].config or plugin.toml already set the value.

crates/cli/tests/coverage/config_tests.rs (5)

219-289: LGTM!

Comprehensive test verifying plugin.toml is correctly parsed and mapped to gateway.plugin_config as JSON. The TOML-to-JSON transformation is correctly tested with nested component config.


291-308: LGTM!

Good coverage of plugin path resolution mechanics: verifies explicit config scopes plugin.toml to the same directory, and project-level discovery walks ancestors correctly.


310-333: LGTM!

Tests the conflict error when both plugin.toml and [plugins].config in config.toml are present. Assertions verify the error message contains both source identifiers.


335-360: LGTM!

Tests CLI --plugin-config conflict with file-based plugin config. This validates the apply_cli_plugin_config guard works correctly.


535-546: LGTM!

Extended malformed config test to cover invalid plugin.toml syntax, verifying the error message includes "invalid plugin TOML".

docs/export-observability-data/observability-plugin.md (1)

62-101: LGTM!

Documentation accurately describes the plugin configuration sources, their discovery behavior, and the mutual exclusivity constraint. The example plugin.toml matches the implementation and test fixtures.

crates/cli/src/server.rs (1)

124-158: LGTM!

The PluginActivation lifecycle wrapper is well-designed:

  • active flag prevents double-clear
  • clear() consumes self and returns Result for explicit error handling
  • Drop impl ensures cleanup even on panic/early-return paths
  • JSON parsing error is mapped to CliError::Config with context
crates/cli/tests/coverage/server_tests.rs (5)

29-63: LGTM!

The test plugin implementation is minimal and correct:

  • Uses atomics for thread-safe registration/deregistration counting
  • PLUGIN_TEST_LOCK ensures test isolation for global plugin state
  • Plugin registration callback properly increments deregistration counter

140-220: LGTM!

Comprehensive integration test covering the full plugin lifecycle:

  • Activates plugin via plugin_config
  • Verifies active_plugin_report() is Some during server run
  • Submits hook requests to trigger observability events
  • Verifies cleanup via active_plugin_report() is None after shutdown
  • Validates ATOF/ATIF output artifacts

306-356: LGTM!

Good test for plugin-kind agnosticism: registers a custom plugin, verifies it activates on server start and deregisters on shutdown. Cleanup of test plugin via deregister_plugin in both setup and teardown prevents state leakage.


358-388: LGTM!

Tests that invalid plugin config (invalid ATOF mode) is rejected before the server starts, and verifies no active plugin remains after the error.


698-709: LGTM!

The wait_for_gateway helper uses a reasonable polling strategy (50 attempts × 20ms = 1 second max) with clear panic message on timeout.

Comment thread crates/cli/src/config.rs
Comment thread crates/cli/src/server.rs
@willkill07 willkill07 changed the title feat(observability): bridge between CLI (side car) and observability plugin + plugin.toml feat(cli): load plugin configs from plugin.toml May 13, 2026
Copy link
Copy Markdown
Member

@willkill07 willkill07 left a comment

Choose a reason for hiding this comment

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

Hey, this is an awesome step in the right direction. I cooked with Codex with the checked out PR and noticed a few things. I think one feedback cycle can address these gaps. Great job overall!

The main things I think are worth tightening are the stacking semantics for discovered plugin.toml files, whether version = 1 is required or just recommended, and making the docs comprehensive enough that users can configure the full observability component shape from TOML.

Submitted by Codex

Comment thread crates/cli/src/config.rs
Comment thread crates/cli/src/config.rs Outdated
Comment thread docs/export-observability-data/observability-plugin.md
Comment thread docs/export-observability-data/observability-plugin.md
@willkill07 willkill07 added this to the 0.2.0 milestone May 13, 2026
Signed-off-by: GSD Agent <bbednarski@nvidia.com>
Signed-off-by: GSD Agent <bbednarski@nvidia.com>
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 13, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@bbednarski9 bbednarski9 force-pushed the bbednarski/validate-pr89-sidecar-plugin-bridge branch from c3da386 to abbfcae Compare May 13, 2026 03:09
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

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

Inline comments:
In `@crates/cli/src/config.rs`:
- Around line 547-550: The run-level --plugin-config is losing precedence
because inherited server overrides are applied before run overrides
(apply_server_overrides -> apply_cli_plugin_config) so a prior plugin_config
value blocks the run value; change the order or merge logic so run overrides
win: either call apply_run_overrides(&mut resolved.gateway, command) before
apply_server_overrides(&mut resolved.gateway, inherited) or update
apply_cli_plugin_config to accept a precedence flag so a later call can
overwrite existing plugin_config; update resolve_run_config accordingly and add
a regression test that constructs an inherited top-level plugin_config plus a
run-level plugin_config and asserts the resolved run config uses the run value.
🪄 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: a13fcfcc-4f34-40a5-97cf-b55d9dae924b

📥 Commits

Reviewing files that changed from the base of the PR and between 34fc911 and c3da386.

📒 Files selected for processing (3)
  • crates/cli/src/config.rs
  • crates/cli/tests/coverage/config_tests.rs
  • docs/export-observability-data/observability-plugin.md
📜 Review details
🧰 Additional context used
📓 Path-based instructions (26)
**/*.{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:

  • docs/export-observability-data/observability-plugin.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:

  • docs/export-observability-data/observability-plugin.md
**/*.{md,rst,txt}

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

**/*.{md,rst,txt}: Spell NVIDIA in all caps. Do not use Nvidia, nvidia, or NV.
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 documentation.
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 documentation unless the source, platform, or legal guidance explicitly requires them.
Do not add trademark symbols to NeMo Flow learning documentation by default.
Do not rewrite API names, package names, command flags, or code literals for style reasons.

Files:

  • docs/export-observability-data/observability-plugin.md
**/*.{md,markdown,rst}

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

**/*.{md,markdown,rst}: 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
Use monospace formatting for code elements, commands, parameters, package names, and expressions
Use monospace formatting for directories, file names, and paths
Use angle brackets inside monospace for variables inside paths, such as /home/<username>/.login
Use quotation marks for error messages and strings in documentation
Use bold formatting for UI buttons, menus, fields, and labels in documentation
Use angle brackets between UI labels for menu paths, such as File > Save As
Use italics for new terms on first use in documentation
Use italics for publication titles in documentation
Use plain text formatting for keyboard shortcuts in documentation
Prefer [NVIDIA/NeMo](link) format for GitHub repository references over generic phrases 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 in documentation
Avoid generic link anchors such as 'here,' 'this page,' and 'read more' in documentation
Include the acronym in link text if a linked term includes an acronym
Do not link long sentences or multiple sentences in documentation
Avoid links that pull readers away from a procedure unles...

Files:

  • docs/export-observability-data/observability-plugin.md
**/*.{html,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Include SPDX license headers in HTML and Markdown files using HTML comment syntax

Files:

  • docs/export-observability-data/observability-plugin.md
docs/**/*.md

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Run ./scripts/build-docs.sh for documentation site changes

docs/**/*.md: Relevant getting-started or reference docs must be updated when examples change
Release-policy docs must point to GitHub Releases as the only release-history source of truth

docs/**/*.md: Use title case for headings in technical documentation
Introduce code blocks, tables, and lists with complete lead-in sentences in documentation

Files:

  • docs/export-observability-data/observability-plugin.md
**/*.md

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Run Markdown link checking via lychee for README.md, CONTRIBUTING.md, and docs/ through pre-commit hooks

Files:

  • docs/export-observability-data/observability-plugin.md
**/*.{md,markdown,py,sh,bash,js,ts,java,cpp,go,rust}

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

Keep package names, repo references, and build commands current in documentation

Files:

  • docs/export-observability-data/observability-plugin.md
{RELEASING.md,CHANGELOG.md,docs/**/*.md}

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

Keep release-process and release-notes guidance in repo-maintainer docs such as RELEASING.md, not as user-facing docs pages or CHANGELOG.md

Files:

  • docs/export-observability-data/observability-plugin.md
**/*.{md,markdown,py,sh,bash}

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

Keep stable user-facing wrappers at scripts/ root in docs and examples; only point at namespaced helper paths when documenting internal maintenance work

Files:

  • docs/export-observability-data/observability-plugin.md
**/*.{md,markdown,py,sh,bash,js,ts,example}

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

Example commands must match current package names and paths

Files:

  • docs/export-observability-data/observability-plugin.md
{scripts/*.sh,docs/**/*.md}

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

Use root ./scripts/*.sh commands in docs and contributor guidance as documented, with implementations under scripts/third-party/

Files:

  • docs/export-observability-data/observability-plugin.md
{docs/**,examples/**,crates/adaptive/**,python/nemo_flow/**,go/nemo_flow/**,**/{example,component}.{ts,tsx,js,rs,py,go}}

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

Any new adaptive component kind must have documentation, examples, and binding coverage across all supported languages

Files:

  • docs/export-observability-data/observability-plugin.md
{README*,CHANGELOG*,docs/**/*.{md,rst,txt},examples/**/*,*.md}

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

Update documentation, examples, and getting-started guides with new package/module/crate names after rename operations

Files:

  • docs/export-observability-data/observability-plugin.md
**/*.{md,txt,rst}

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

**/*.{md,txt,rst}: Ensure commands, package names, file paths, and APIs in documentation are correct and not stale; flag incorrect or outdated information as blocking issues
Ensure examples and procedures in documentation will execute successfully with current APIs and commands
Use consistent user-facing terminology throughout documentation that matches current repo terminology
Capitalize NVIDIA correctly in all documentation and public-facing text
Format code, commands, paths, and filenames as inline code (monospace) in documentation
Use descriptive anchor text for links instead of bare URLs or weak labels like 'here' in documentation
Prefer active voice, present tense, short sentences, and plain English in documentation
Structure documentation procedures as imperative steps that are easy to scan and not too long for a single sequence
Prefer 'after' instead of 'once' for temporal references in documentation
Use 'can' instead of 'may' when describing possibility (rather than permission) in documentation
Avoid ambiguous numeric dates and ordinal dates in documentation body text

Files:

  • docs/export-observability-data/observability-plugin.md
{README.md,docs/**/*.md,examples/**/*.{js,ts,py,go,rs}}

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

Keep documentation and examples synchronized with current install, import, and build commands

Files:

  • docs/export-observability-data/observability-plugin.md
**/*.{py,js,ts,tsx,go,rs,md}

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

Format changed files with the language-native formatter before the final lint/test pass

Files:

  • docs/export-observability-data/observability-plugin.md
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/src/config.rs
{README.md,CONTRIBUTING.md,docs/**/*.md}

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

For docs-only changes, run targeted checks only if commands, package names, or examples changed. Use just docs for docs-site builds and just docs-linkcheck when links changed

Files:

  • docs/export-observability-data/observability-plugin.md
{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/export-observability-data/observability-plugin.md
**/*.rs

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

**/*.rs: Run cargo fmt --all for FFI work as it is Rust work
Run just test-rust for FFI validation
Run cargo clippy --workspace --all-targets -- -D warnings to enforce warnings-as-errors linting

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

**/*.rs: Run cargo fmt --all for Rust code formatting
Run cargo clippy --workspace --all-targets -- -D warnings to enforce Rust linting with no warnings
Run just test-rust as the shared-runtime build/test wrapper for Rust changes

Use Rust snake_case naming convention for Rust code

**/*.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 Rust code formatting when Node changes touch Rust files
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting when Rust files changed as part of Node work

**/*.rs: Always run just test-rust when any Rust code changes
Always run cargo fmt --all when any Rust code changes
Always run cargo clippy --workspace --all-targets -- -D warnings when any Rust code changes

Files:

  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/src/config.rs
**/*.{rs,go,js,ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Include SPDX license headers in all Rust, Go, JavaScript, and TypeScript source files using C-style comment syntax

Files:

  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/src/config.rs
**/*.{rs,py,go,js,ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use SONAR_IGNORE_START / SONAR_IGNORE_END markers only for documented false positives that cannot be resolved in code; keep ignored blocks small, add explanatory comments, and require reviewer sign-off

Files:

  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/src/config.rs
**/*.{js,ts,tsx,jsx,py,rs,go,java,c,cpp,h,cc,cxx,cs,rb,php,swift,kt}

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

Changed files must be formatted with the language-native formatter

Files:

  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/src/config.rs
**/*.{rs,py,js,ts,tsx,go}

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

During iteration, prefer uv run pre-commit run --files <changed files...> for targeted validation

Files:

  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/src/config.rs
{crates/**/tests/**,python/tests/**,go/nemo_flow/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_flow/**/*_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/config_tests.rs
**/{config,schema,adaptive}.{yaml,yml,json,ts,tsx,py,go,rs}

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

Ensure dynamic config shape matches the documented canonical model in docs/use-adaptive-optimization/configure.md

Files:

  • crates/cli/src/config.rs
🔇 Additional comments (2)
crates/cli/tests/coverage/config_tests.rs (1)

204-207: LGTM!

Also applies to: 219-441, 533-553, 617-627

docs/export-observability-data/observability-plugin.md (1)

62-165: LGTM!

Comment thread crates/cli/src/config.rs
@bbednarski9 bbednarski9 force-pushed the bbednarski/validate-pr89-sidecar-plugin-bridge branch from abbfcae to 24c1037 Compare May 13, 2026 03:11
@github-actions github-actions Bot added size:XL PR is extra large and removed size:L PR is large labels May 13, 2026
@bbednarski9
Copy link
Copy Markdown
Contributor Author

/ok to test f69c936

Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: GSD Agent <bbednarski@nvidia.com>
Signed-off-by: GSD Agent <bbednarski@nvidia.com>
@bbednarski9 bbednarski9 force-pushed the bbednarski/validate-pr89-sidecar-plugin-bridge branch from f69c936 to 831a856 Compare May 13, 2026 03:39
@bbednarski9 bbednarski9 requested a review from willkill07 May 13, 2026 03:45
@willkill07
Copy link
Copy Markdown
Member

/merge

@rapids-bot rapids-bot Bot merged commit 64a9710 into NVIDIA:main May 13, 2026
30 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request May 13, 2026
2 tasks
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 Under Review PR is under review and should not be marked as Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants