Skip to content

feat: add dependency-free adapter contract dataclasses - #190

Open
AnuradhaKaruppiah wants to merge 3 commits into
NVIDIA:mainfrom
AnuradhaKaruppiah:ak-adapter-python-dataclass
Open

feat: add dependency-free adapter contract dataclasses#190
AnuradhaKaruppiah wants to merge 3 commits into
NVIDIA:mainfrom
AnuradhaKaruppiah:ak-adapter-python-dataclass

Conversation

@AnuradhaKaruppiah

@AnuradhaKaruppiah AnuradhaKaruppiah commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Overview

This change makes standard-library dataclasses the canonical Python representation of the southbound adapter contract. It removes Pydantic as an unconditional dependency of nemo-fabric-adapter-contract while retaining optional Pydantic interoperability through the pydantic extra.

The wire contract and published JSON Schemas do not change, so the adapter contract version remains unchanged. The dependency choice intentionally prefers the standard library for the base contract; a second Pydantic model hierarchy was rejected because duplicate field definitions could drift.

Breaking Python API changes:

  • model_validate(...) becomes from_mapping(...).

  • model_dump(mode="json") becomes to_mapping().

  • Contract JSON Schema consumers use the published schemas or the optional Pydantic support module.

  • The common lifecycle host replaces config_model with the framework-neutral config_loader callable.

  • 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 a dependency-free codec with closed-object decoding, recursive typed construction, JSON-safe serialization, defensive extension copying, and field-path validation errors.
  • Convert AgentConfig, AgentRunRequest, AgentRunResult, RuntimeContext, and their nested blocks to keyword-only, slotted dataclasses.
  • Add optional Pydantic TypeAdapter and typed-extension helpers without duplicating contract classes.
  • Make the common lifecycle host accept a generic configuration loader.
  • Move the NAT reference adapter to AgentConfig.from_mapping.
  • Add dependency-boundary, schema-parity, packaging, lifecycle, and NAT coverage.
  • Align ArtifactRef with the published runtime-context schema by including its existing metadata field.
  • Update package guidance, adapter contract documentation, and the public adapter-authoring skill.

Validation

  • just --set no_uv true test-python — 713 passed, 15 skipped.
  • Focused NAT tests — 49 passed, 1 skipped.
  • Focused lifecycle tests — 11 passed.
  • Built the adapter-contract wheel and installed it with --no-deps in a clean Python 3.11 environment; AgentConfig round-tripped without importing Pydantic.
  • Ruff 0.15.21 formatting and checks passed for changed Python files.
  • Root and adapter-contract uv lock --check passed.
  • git diff --check passed.
  • Python license diff completed. The full documentation build was not run; documentation tests in the Python suite passed.

Where should the reviewer start?

Start with adapter-contract/src/nemo_fabric_adapter_contract/models.py and codec.py. The central design decision is that the dataclasses are the only contract hierarchy, while pydantic_support.py adapts those same types when a consumer opts into Pydantic.

Then review adapters/common/src/nemo_fabric_adapters/common/lifecycle.py and the NAT adapter migration to confirm the framework-neutral config_loader boundary.

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

Summary by CodeRabbit

  • New Features

    • Added dependency-free configuration dataclasses with strict validation and mapping serialization.
    • Added optional Pydantic interoperability for typed extensions and schema generation.
    • Added detailed validation errors with nested field paths.
    • Added artifact metadata support.
  • Breaking Changes

    • Lifecycle configuration now uses config_loader instead of config_model.
  • Documentation

    • Updated adapter setup, configuration, and lifecycle guidance to reflect the new APIs and optional Pydantic support.
    • Clarified that Pydantic is optional rather than required.

Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The adapter contract now uses dependency-free dataclasses with shared validation and serialization codecs. Pydantic support is optional. Lifecycle hosts now pass configuration through config_loader, and adapters, tests, and documentation use the new APIs.

Changes

Contract and lifecycle migration

Layer / File(s) Summary
Dataclass codec and contract models
adapter-contract/src/nemo_fabric_adapter_contract/codec.py, adapter-contract/src/nemo_fabric_adapter_contract/models.py, tests/adapter_contract/*, docs/adapter-contract/normalized-configuration.md
Added recursive JSON validation, typed mapping conversion, path-aware ContractValidationError, dataclass contract models, explicit validation, serialization metadata, artifact metadata, and Rust-schema parity checks.
Optional Pydantic interoperability and boundary checks
adapter-contract/pyproject.toml, adapter-contract/pypi.md, adapter-contract/src/nemo_fabric_adapter_contract/pydantic_support.py, tests/adapter_contract/test_agent_config.py, tests/adapter_contract/test_dependency_boundary.py, tests/adapters/test_adapter_package_metadata.py
Removed Pydantic from base dependencies. Added the optional pydantic extra and helpers for type adapters, schemas, and typed extensions. Added dependency-boundary and package metadata tests.
Lifecycle configuration loader wiring
adapters/common/src/nemo_fabric_adapters/common/lifecycle.py, adapters/common/README.md, docs/adapter-contract/execution.md, external/nat/src/nemo_fabric_adapters/nat/adapter.py, tests/adapters/test_adapters_common_lifecycle.py, tests/adapters/test_external_nat_adapter.py, external/nat/README.md, skills/nemo-fabric-build-adapter/SKILL.md
Replaced config_model with callable config_loader, forwarded it through lifecycle dispatch, and updated NAT integration, tests, examples, and adapter guidance to use AgentConfig.from_mapping.

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

Sequence Diagram(s)

sequenceDiagram
  participant Host
  participant serve
  participant _dispatch
  participant _handle_start
  participant AgentConfig_from_mapping
  Host->>serve: config_loader=AgentConfig.from_mapping
  serve->>_dispatch: lifecycle request and config_loader
  _dispatch->>_handle_start: raw start configuration and loader
  _handle_start->>AgentConfig_from_mapping: load configuration mapping
  AgentConfig_from_mapping-->>_handle_start: validated AgentConfig
  _handle_start-->>serve: lifecycle payload with loaded configuration
Loading

Possibly related PRs

  • NVIDIA/NeMo-Fabric#186: Directly refactors adapter-contract models and lifecycle configuration handling.
  • NVIDIA/NeMo-Fabric#188: Overlaps in models.py, ArtifactRef.metadata, extension serialization, and config_loader handling.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 21.62% 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
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.
Title check ✅ Passed The title follows Conventional Commits format, uses an allowed type, summarizes the main change, and is under 72 characters.
Description check ✅ Passed The description includes the required overview, reviewer starting point, related issue, contribution checks, and detailed validation information.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

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

Inline comments:
In `@adapter-contract/pypi.md`:
- Line 39: Rewrite the lead-in before the optional Pydantic interoperability
installation command as a complete standalone sentence, removing the trailing
“with:” construction. Match the complete-sentence pattern already used in the
nearby documentation and preserve the existing command block.

In `@adapter-contract/src/nemo_fabric_adapter_contract/codec.py`:
- Around line 159-160: Update the metadata handling in the codec function
containing the field check so fields marked with JSON metadata use
json_mapping(value, path=path) instead of json_value, enforcing the declared
dict/object container while preserving existing handling for other fields.
Remove the # pragma: no cover annotation from the guard at line 82 now that it
is reachable, and add regression coverage confirming non-object settings and
extensions values are rejected.
- Around line 123-135: Update validate_dataclass to cache
get_type_hints(type(instance)) results keyed by the dataclass class, reusing the
cached mapping for subsequent validations while preserving the existing field
decoding and normalization behavior.

In `@tests/adapter_contract/test_agent_execution.py`:
- Around line 137-148: Extend
test_agent_execution_dataclasses_track_rust_schema_block_fields to compare
requiredness as well as field names: collect dataclass fields whose default is
dataclasses.MISSING and assert their names match the schema required list.
Import MISSING from dataclasses and use it to identify fields without defaults,
preserving the existing property-name parity assertion.
🪄 Autofix

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: 5c275e8b-e9f5-41e0-b55e-eff34af8a947

📥 Commits

Reviewing files that changed from the base of the PR and between 5e2ab49 and b083ba5.

⛔ Files ignored due to path filters (2)
  • adapter-contract/uv.lock is excluded by !**/*.lock
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (18)
  • adapter-contract/pypi.md
  • adapter-contract/pyproject.toml
  • adapter-contract/src/nemo_fabric_adapter_contract/codec.py
  • adapter-contract/src/nemo_fabric_adapter_contract/models.py
  • adapter-contract/src/nemo_fabric_adapter_contract/pydantic_support.py
  • adapters/common/README.md
  • adapters/common/src/nemo_fabric_adapters/common/lifecycle.py
  • docs/adapter-contract/execution.md
  • docs/adapter-contract/normalized-configuration.md
  • external/nat/README.md
  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • skills/nemo-fabric-build-adapter/SKILL.md
  • tests/adapter_contract/test_agent_config.py
  • tests/adapter_contract/test_agent_execution.py
  • tests/adapter_contract/test_dependency_boundary.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_adapters_common_lifecycle.py
  • tests/adapters/test_external_nat_adapter.py
📜 Review details
⏰ Context from checks skipped due to timeout. (16)
  • GitHub Check: Preview docs
  • GitHub Check: Test (Python 3.11, windows-amd64)
  • GitHub Check: Test (Python 3.13, macos-arm64)
  • GitHub Check: Test (Python 3.14, macos-arm64)
  • GitHub Check: Test (Python 3.12, linux-arm64)
  • GitHub Check: Test (Python 3.12, linux-amd64)
  • GitHub Check: Test (Python 3.12, windows-amd64)
  • GitHub Check: Test (Python 3.13, linux-amd64)
  • GitHub Check: Test (Python 3.11, macos-arm64)
  • GitHub Check: Test (Python 3.14, windows-amd64)
  • GitHub Check: Test (Python 3.11, linux-arm64)
  • GitHub Check: Test (Python 3.11, linux-amd64)
  • GitHub Check: Test (Python 3.12, macos-arm64)
  • GitHub Check: Test (Python 3.13, windows-amd64)
  • GitHub Check: Test (Python 3.13, linux-arm64)
  • GitHub Check: Pre-commit
🧰 Additional context used
📓 Path-based instructions (38)
**/*

📄 CodeRabbit inference engine (.agents/skills/karpathy-guidelines/SKILL.md)

**/*: Before implementing, explicitly state assumptions, surface ambiguity and tradeoffs, present multiple interpretations when relevant, and ask for clarification rather than silently deciding or proceeding when requirements are unclear.
Prefer the minimum code needed to solve the requested problem: avoid speculative features, unnecessary abstractions, unrequested flexibility, and handling of impossible scenarios; simplify overcomplicated solutions.
When editing existing code, make surgical changes only: do not modify unrelated code, comments, formatting, or pre-existing dead code; match the existing style, and remove only unused imports, variables, or functions introduced by your changes.
Define verifiable success criteria for each task, such as writing regression tests for bugs and invalid-input tests for validation, then verify the implementation against those criteria. For multi-step work, state a brief plan with a verification check for each step.

**/*: Always spell NVIDIA in all caps; do not use Nvidia, nvidia, nVidia, nVIDIA, or NV.
Use an NVIDIA before a noun, because the name begins 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 required by the document type or legal guidance.
Verify official capitalization, spacing, hyphenation, and spelling for NVIDIA and third-party product names; do not rewrite official product names for grammar or title-case rules.
Precede NVIDIA product names with NVIDIA on first mention when natural and accurate, and link the first mention when the destination helps the reader.
On first use, include the company name and full model qualifier when it helps identify the model; preserve official capitalization and punctuation, and use shorter family names only after establishing the full name.
For learning-oriented and developer content, do not force trademark symbols unless explicitly required; for press, ...

Files:

  • adapter-contract/pyproject.toml
  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • external/nat/README.md
  • docs/adapter-contract/normalized-configuration.md
  • adapters/common/README.md
  • skills/nemo-fabric-build-adapter/SKILL.md
  • tests/adapter_contract/test_dependency_boundary.py
  • docs/adapter-contract/execution.md
  • adapter-contract/pypi.md
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapter_contract/test_agent_execution.py
  • adapter-contract/src/nemo_fabric_adapter_contract/pydantic_support.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapter_contract/test_agent_config.py
  • adapter-contract/src/nemo_fabric_adapter_contract/codec.py
  • adapters/common/src/nemo_fabric_adapters/common/lifecycle.py
  • adapter-contract/src/nemo_fabric_adapter_contract/models.py
  • tests/adapters/test_adapters_common_lifecycle.py
**/*.{rs,toml}

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

For any Rust change, run just test-rust and cargo fmt --all -- --check.

For Rust core, CLI, or shared runtime semantic changes, run Rust formatting and tests, and add Python tests when behavior is exposed through the SDK.

Use Rust stable tooling; format Rust code with cargo fmt --all, verify formatting with cargo fmt --all -- --check, and compile with cargo check --workspace --locked.

Files:

  • adapter-contract/pyproject.toml
**/{Cargo.toml,Cargo.lock,pyproject.toml,package.json}

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

For new or updated dependencies, document the functional need, alternatives considered, and why the selected dependency is the narrowest fit.

Files:

  • adapter-contract/pyproject.toml
**/*.{toml,lock}

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

If a manifest or lockfile changes, run the license-diff script against origin/main, review transitive license changes, and run the attributions-rust and attributions-python pre-commit hooks.

Files:

  • adapter-contract/pyproject.toml
**/*.{yml,yaml,toml,lock}

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

For CI or packaging changes, use maintain-ci or maintain-packaging, then run recipes and checks whose behavior changed.

Files:

  • adapter-contract/pyproject.toml
**/*.{rs,py,toml}

📄 CodeRabbit inference engine (.agents/skills/update-project-version/SKILL.md)

When editing version helpers, verify every nemo-fabric-* workspace package through Cargo metadata and reject a static version in python/pyproject.toml.

Files:

  • adapter-contract/pyproject.toml
  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • tests/adapter_contract/test_dependency_boundary.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapter_contract/test_agent_execution.py
  • adapter-contract/src/nemo_fabric_adapter_contract/pydantic_support.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapter_contract/test_agent_config.py
  • adapter-contract/src/nemo_fabric_adapter_contract/codec.py
  • adapters/common/src/nemo_fabric_adapters/common/lifecycle.py
  • adapter-contract/src/nemo_fabric_adapter_contract/models.py
  • tests/adapters/test_adapters_common_lifecycle.py
**/*.{toml,rs,py}

📄 CodeRabbit inference engine (.agents/skills/update-project-version/SKILL.md)

Avoid blind repository-wide replacement of version-like strings; distinguish package-version references from examples and unrelated dependency versions.

Files:

  • adapter-contract/pyproject.toml
  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • tests/adapter_contract/test_dependency_boundary.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapter_contract/test_agent_execution.py
  • adapter-contract/src/nemo_fabric_adapter_contract/pydantic_support.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapter_contract/test_agent_config.py
  • adapter-contract/src/nemo_fabric_adapter_contract/codec.py
  • adapters/common/src/nemo_fabric_adapters/common/lifecycle.py
  • adapter-contract/src/nemo_fabric_adapter_contract/models.py
  • tests/adapters/test_adapters_common_lifecycle.py
**/*.{toml,yaml,yml,sh,bash}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

TOML, YAML, and shell files must use the specified # SPDX copyright and Apache-2.0 license headers.

Files:

  • adapter-contract/pyproject.toml
**/{Cargo.toml,pyproject.toml}

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

**/{Cargo.toml,pyproject.toml}: Keep package names, dependency declarations, import paths, module names, and workspace or Python package metadata internally consistent.
Prefer the standard library, an existing dependency, or a small local implementation before adding a new direct dependency.
When multiple dependencies satisfy the requirement, prefer a maintained OSS option with clear SPDX metadata, a smaller transitive graph, and permissive licensing such as Apache-2.0, MIT, BSD, or ISC.

Files:

  • adapter-contract/pyproject.toml
**/{Cargo.toml,pyproject.toml,Cargo.lock,uv.lock}

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

**/{Cargo.toml,pyproject.toml,Cargo.lock,uv.lock}: For new dependencies, record the functional need, viable alternatives considered, why the selected dependency is the narrowest fit, and any unresolved licensing question.
After updating manifests or lockfiles, run uv run --no-project python scripts/licensing/license_diff.py --base-ref origin/main and review added packages and license changes.
Keep workspace, Python package, and lockfile versions aligned wherever the packaging contract requires alignment.

Files:

  • adapter-contract/pyproject.toml
**/*.{rs,py,pyi,json,yaml,yml}

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

Determine and update every affected public surface, including the CLI, PyO3 bindings, Python SDK, type stubs, schemas, and adapter contract, so they remain in parity.

Files:

  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • tests/adapter_contract/test_dependency_boundary.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapter_contract/test_agent_execution.py
  • adapter-contract/src/nemo_fabric_adapter_contract/pydantic_support.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapter_contract/test_agent_config.py
  • adapter-contract/src/nemo_fabric_adapter_contract/codec.py
  • adapters/common/src/nemo_fabric_adapters/common/lifecycle.py
  • adapter-contract/src/nemo_fabric_adapter_contract/models.py
  • tests/adapters/test_adapters_common_lifecycle.py
**/*.{rs,py}

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

For native binding changes, run cargo check -p fabric-python --locked.

Use snake_case for functions and variables; use PascalCase for Rust types and Python classes.

Files:

  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • tests/adapter_contract/test_dependency_boundary.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapter_contract/test_agent_execution.py
  • adapter-contract/src/nemo_fabric_adapter_contract/pydantic_support.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapter_contract/test_agent_config.py
  • adapter-contract/src/nemo_fabric_adapter_contract/codec.py
  • adapters/common/src/nemo_fabric_adapters/common/lifecycle.py
  • adapter-contract/src/nemo_fabric_adapter_contract/models.py
  • tests/adapters/test_adapters_common_lifecycle.py
**/*.{py,pyi}

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

If Python code or a Python-facing adapter changes, run just test-python.

In Python SDK, adapters, examples, and tests, follow the existing style, use type annotations for public APIs, and keep native binding declarations synchronized with their Rust implementations.

Files:

  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • tests/adapter_contract/test_dependency_boundary.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapter_contract/test_agent_execution.py
  • adapter-contract/src/nemo_fabric_adapter_contract/pydantic_support.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapter_contract/test_agent_config.py
  • adapter-contract/src/nemo_fabric_adapter_contract/codec.py
  • adapters/common/src/nemo_fabric_adapters/common/lifecycle.py
  • adapter-contract/src/nemo_fabric_adapter_contract/models.py
  • tests/adapters/test_adapters_common_lifecycle.py
**/*.{rs,py,pyi}

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

**/*.{rs,py,pyi}: If public configuration types change, confirm schema snapshot tests in just test-rust pass and review generated schema diffs.
For schema or public contract changes, run both language suites and review changes under schemas/ and generated API references.

Files:

  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • tests/adapter_contract/test_dependency_boundary.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapter_contract/test_agent_execution.py
  • adapter-contract/src/nemo_fabric_adapter_contract/pydantic_support.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapter_contract/test_agent_config.py
  • adapter-contract/src/nemo_fabric_adapter_contract/codec.py
  • adapters/common/src/nemo_fabric_adapters/common/lifecycle.py
  • adapter-contract/src/nemo_fabric_adapter_contract/models.py
  • tests/adapters/test_adapters_common_lifecycle.py
**/*.{py,pyi,rs}

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

For Python SDK or PyO3 binding changes, use python-tests, run focused pytest tests first, then just test-python; rebuild with just build-python when native code or packaging changes.

Public contract changes must keep native Python binding declarations synchronized with their Rust implementations.

Files:

  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • tests/adapter_contract/test_dependency_boundary.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapter_contract/test_agent_execution.py
  • adapter-contract/src/nemo_fabric_adapter_contract/pydantic_support.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapter_contract/test_agent_config.py
  • adapter-contract/src/nemo_fabric_adapter_contract/codec.py
  • adapters/common/src/nemo_fabric_adapters/common/lifecycle.py
  • adapter-contract/src/nemo_fabric_adapter_contract/models.py
  • tests/adapters/test_adapters_common_lifecycle.py
**/*.{md,mdx,yml,py,rs,sh}

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

Keep documentation aligned with current NeMo Fabric behavior, repository layout, entry points, commands, package names, APIs, bindings, and support claims.

Files:

  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • external/nat/README.md
  • docs/adapter-contract/normalized-configuration.md
  • adapters/common/README.md
  • skills/nemo-fabric-build-adapter/SKILL.md
  • tests/adapter_contract/test_dependency_boundary.py
  • docs/adapter-contract/execution.md
  • adapter-contract/pypi.md
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapter_contract/test_agent_execution.py
  • adapter-contract/src/nemo_fabric_adapter_contract/pydantic_support.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapter_contract/test_agent_config.py
  • adapter-contract/src/nemo_fabric_adapter_contract/codec.py
  • adapters/common/src/nemo_fabric_adapters/common/lifecycle.py
  • adapter-contract/src/nemo_fabric_adapter_contract/models.py
  • tests/adapters/test_adapters_common_lifecycle.py
**/*.{md,rst}

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

Update documentation and examples in the same branch as the public API change.

Files:

  • external/nat/README.md
  • docs/adapter-contract/normalized-configuration.md
  • adapters/common/README.md
  • skills/nemo-fabric-build-adapter/SKILL.md
  • docs/adapter-contract/execution.md
  • adapter-contract/pypi.md
**/*.{md,mdx,rst}

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

**/*.{md,mdx,rst}: For NeMo Fabric documentation, verify technical claims against the current repository, public API, or documented command before reviewing style.
Always 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, parallel steps; split long procedures into smaller tasks.
Prefer active voice, present tense, short sentences, contractions, and plain English while preserving necessary technical precision.
Use can for possibility and reserve may for permission.
Use after for temporal relationships instead of once, and prefer refer to over see when directing 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 commas in thousands.
Do not add trademark symbols to learning-oriented documentation unless the source, platform, or legal guidance explicitly requires them.
Do not replace precise technical terms with simpler words when doing so would lose precision.
Do not flag passive voice when the actor is unknown or the action is the important part.
Do not rewrite API names, package names, command flags, or code literals for style.

**/*.{md,mdx,rst}: Use consistent title case for technical-document headings and table headers; avoid quotation marks, ampersands, and exclamation marks in headings, while preserving official product, event, research, and whitepaper title ...

Files:

  • external/nat/README.md
  • docs/adapter-contract/normalized-configuration.md
  • adapters/common/README.md
  • skills/nemo-fabric-build-adapter/SKILL.md
  • docs/adapter-contract/execution.md
  • adapter-contract/pypi.md
**/*.{md,rst,txt,adoc}

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

**/*.{md,rst,txt,adoc}: For technical documentation, use professional, active, conversational, engaging, precise, and plain-English prose. Prefer active voice, present tense, short sentences, and scannable paragraphs. Avoid casual or imprecise language, swearing, threats, insults, jokes, puns, culture-specific idioms, marketing exaggeration, and unsupported third-party comparisons.
Use can for possibility and reserve may for permission; use after for temporal order; use refer to for cross-references; prefer short direct sentences and specific verbs; avoid unnecessary please in technical documentation.
Prefer active voice when the actor matters. Passive voice is acceptable when the actor is unknown or irrelevant, when the action or result is the focus, or in programmer documentation.
Use natural contractions in conversational technical prose, but do not force them in formal legal copy, API references, or generated text.
Prefer simpler English over Latinisms: use for example or such as instead of e.g., and so on instead of etc., that is instead of i.e., compared to instead of vs., and by, through, or using instead of via. Use industry-standard terms such as in silico, in vitro, and in vivo when appropriate, and italicize them in running text.
Use that without commas for essential clauses, and which with commas for nonessential clauses.
Format dates and times clearly: spell out months in body text; use forms such as June 12, 2025; avoid numeric or ordinal dates; capitalize days; use 12-hour time when appropriate; include a space before a.m. or p.m.; use ET and PT for needed time zones; avoid 24/7; and prefer from 12:30 to 1:00 p.m. for prose ranges.
Format numbers consistently: spell out zero through nine in body text, use numerals for 10 or greater and for technical values, use commas in thousands, do not begin a sentence with a numeral, spell out ordinals, and use numerals consistently within a category wh...

Files:

  • external/nat/README.md
  • docs/adapter-contract/normalized-configuration.md
  • adapters/common/README.md
  • skills/nemo-fabric-build-adapter/SKILL.md
  • docs/adapter-contract/execution.md
  • adapter-contract/pypi.md
**/*.{md,mdx}

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

**/*.{md,mdx}: Use the full product name NVIDIA NeMo Fabric on first use, typically in the title and H1; use NeMo Fabric thereafter. Use fabric alone only for the CLI tool and surround it with backticks.
Treat incorrect or stale commands, package names, paths, APIs, support claims, procedures, examples, terminology, or public behavior documentation as blocking issues.
Capitalize NVIDIA correctly and format code, commands, paths, and filenames as inline code where needed.
Use title case for technical-documentation headings.
Introduce code blocks, tables, and lists with complete lead-in sentences; ensure examples match current APIs and build commands.
Use descriptive anchor text, avoid raw URLs and generic labels such as here, and use repository-relative .mdx paths for links within docs/.
Prefer active voice, present tense, short sentences, plain English, consistent terminology, and imperative, parallel, scannable procedures.
Use after instead of once when expressing temporal sequence, and use can rather than may when describing possibility rather than permission.
Avoid ambiguous numeric dates and ordinal dates in body text.
For learning-oriented documentation, do not force trademark symbols unless the source document explicitly requires them.
When reporting documentation-review findings, lead with Must fix, Should fix, and Nice to have categories; include file path, line reference, current problem, rationale, and a concrete rewrite or direction.

Files:

  • external/nat/README.md
  • docs/adapter-contract/normalized-configuration.md
  • adapters/common/README.md
  • skills/nemo-fabric-build-adapter/SKILL.md
  • docs/adapter-contract/execution.md
  • adapter-contract/pypi.md
**/*.md

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Update relevant SDK, API reference, adapter, example, integration, and support documentation when the corresponding public surface changes.

Files:

  • external/nat/README.md
  • docs/adapter-contract/normalized-configuration.md
  • adapters/common/README.md
  • skills/nemo-fabric-build-adapter/SKILL.md
  • docs/adapter-contract/execution.md
  • adapter-contract/pypi.md
**/*.{html,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

HTML and Markdown files must use the specified SPDX HTML-comment header.

Files:

  • external/nat/README.md
  • docs/adapter-contract/normalized-configuration.md
  • adapters/common/README.md
  • skills/nemo-fabric-build-adapter/SKILL.md
  • docs/adapter-contract/execution.md
  • adapter-contract/pypi.md
{*.md,**/*.md,**/*.mdx,**/*.ipynb}

⚙️ CodeRabbit configuration file

{*.md,**/*.md,**/*.mdx,**/*.ipynb}: Enforce the product name in user-facing prose: use "NVIDIA NeMo Fabric" on first use and "NeMo Fabric" thereafter. Flag standalone capitalized "Fabric" when it refers to the product. Do not flag the lowercase fabric CLI command, package/import/crate names, code identifiers, API symbols, configuration keys, file paths, or unrelated generic uses of the word.

Files:

  • external/nat/README.md
  • docs/adapter-contract/normalized-configuration.md
  • adapters/common/README.md
  • skills/nemo-fabric-build-adapter/SKILL.md
  • docs/adapter-contract/execution.md
  • adapter-contract/pypi.md
{README.md,docs/**/*.{md,mdx,yml},examples/**/*.{md,mdx,yml}}

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

Keep package names, repository references, and build commands current in documentation and examples.

Files:

  • docs/adapter-contract/normalized-configuration.md
  • docs/adapter-contract/execution.md
{docs/**/*.{md,mdx,yml},examples/**/*.{md,mdx,yml}}

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

Update relevant getting-started, reference, adapter, and example documentation when the corresponding examples or adapters change.

Files:

  • docs/adapter-contract/normalized-configuration.md
  • docs/adapter-contract/execution.md
docs/**/*.{md,mdx,yml}

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

Run just docs when the documentation site changes.

Files:

  • docs/adapter-contract/normalized-configuration.md
  • docs/adapter-contract/execution.md
docs/**

📄 CodeRabbit inference engine (AGENTS.md)

Run just docs after changing the documentation site.

Files:

  • docs/adapter-contract/normalized-configuration.md
  • docs/adapter-contract/execution.md
{docs/**,README.md,AGENTS.md}

⚙️ CodeRabbit configuration file

{docs/**,README.md,AGENTS.md}: Review documentation for technical accuracy against the current API, command correctness, and consistency with generated schemas.
For links between files under docs/, require paths relative to the source file with the target file's .mdx extension so they work in both Fern builds and repository browsers. Flag Fern site-root links such as NeMo Fabric overview; use the repository-relative equivalent, such as NeMo Fabric overview.

Files:

  • docs/adapter-contract/normalized-configuration.md
  • docs/adapter-contract/execution.md
adapters/*/{README.md,fabric-adapter.json}

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

Document installation, supported configuration, harness-only settings, credentials, lifecycle, telemetry, artifacts, limitations, and focused test commands; keep documentation consistent with descriptor claims.

Files:

  • adapters/common/README.md
adapters/*/README.md

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

Provide a credential-free fixture covering plan, doctor, and run, plus a canonical typed SDK example and, when required, a canonical harness-native YAML fixture.

Files:

  • adapters/common/README.md
{adapters/**,examples/**}

⚙️ CodeRabbit configuration file

{adapters/**,examples/**}: Review adapter and example changes for command correctness, config/schema consistency, artifact handling, and compatibility with the public NeMo Fabric contracts.

Files:

  • adapters/common/README.md
  • adapters/common/src/nemo_fabric_adapters/common/lifecycle.py
**/SKILL.md

📄 CodeRabbit inference engine (.agents/skills/README.md)

Each maintainer skill file must begin with YAML frontmatter containing at least name and description.

Files:

  • skills/nemo-fabric-build-adapter/SKILL.md

⚙️ CodeRabbit configuration file

**/SKILL.md: Do not flag SKILL.md files for missing SPDX headers. Skill entrypoints intentionally start with YAML frontmatter instead.
Verify that every SKILL.md keeps valid YAML frontmatter with at least name and description fields before the Markdown body.

Files:

  • skills/nemo-fabric-build-adapter/SKILL.md
skills/**

📄 CodeRabbit inference engine (AGENTS.md)

skills/**: Keep consumer skills self-contained and dependent only on supported public Python SDK contracts and published documentation; do not include repository internals.
Do not add repository-internal contribution guidance to consumer skills.
Consumer skills must link to public GitHub documentation and example URLs rather than a docs-site domain so they remain portable when exported.

Files:

  • skills/nemo-fabric-build-adapter/SKILL.md
tests/**/*.{rs,py}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

When adding functionality, include tests in the corresponding Rust crate or the relevant area under tests/.

Files:

  • tests/adapter_contract/test_dependency_boundary.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapter_contract/test_agent_execution.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapter_contract/test_agent_config.py
  • tests/adapters/test_adapters_common_lifecycle.py
tests/**/*.py

📄 CodeRabbit inference engine (.agents/skills/python-tests/SKILL.md)

tests/**/*.py: Use pytest to run Python tests.
Do not add @pytest.mark.asyncio to tests; async tests are automatically detected by the async runner.
Do not add -> None return type annotations to test functions.
When mocking a class, use unittest.mock.MagicMock or AsyncMock, using the spec argument when necessary, rather than defining a new class.
Prefix mocked class names with mock, not fake.
Prefer pytest fixtures over helper methods.
If a fixture is needed in multiple test files, define it once in conftest.py rather than repeating it.
Define fixtures using @pytest.fixture(name="<fixture_name>"[, scope="<scope>"]) and a <fixture_name>_fixture function; specify scope only when it is not function.
Prefer pytest.mark.parametrize over separate tests for different input types.
Use @pytest.mark.usefixtures when a fixture is needed but its returned value is unused or it returns no value.
Avoid defensive programming in tests; access expected values directly so missing data raises a clear failure, such as using results["data"] instead of results.get("data").
When adapter installation metadata changes, packaging metadata tests must directly assert that the root project depends unconditionally on the exact-version nemo-fabric-runtime distribution.
Packaging metadata tests must verify that each root harness extra delegates to the matching version of the leaf adapter's harness extra.
Packaging metadata tests must verify that bare leaf dependencies remain adapter-owned and that the root adapter-tests dependency group installs each leaf through its harness extra.
Packaging metadata tests must verify that every leaf provides full; only adapters importing NeMo Relay Python APIs provide relay, while adapters using an external Relay executable have full equal to harness.

Files:

  • tests/adapter_contract/test_dependency_boundary.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapter_contract/test_agent_execution.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapter_contract/test_agent_config.py
  • tests/adapters/test_adapters_common_lifecycle.py
{tests/**,python/tests/**}

⚙️ CodeRabbit configuration file

{tests/**,python/tests/**}: Tests should cover the behavior promised by the changed API surface, including error paths, lifecycle cleanup, and SDK/native parity where relevant.

Files:

  • tests/adapter_contract/test_dependency_boundary.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapter_contract/test_agent_execution.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapter_contract/test_agent_config.py
  • tests/adapters/test_adapters_common_lifecycle.py
tests/adapters/**/*.py

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

tests/adapters/**/*.py: If an adapter or integration changes, run its focused tests.
For adapter behavior changes, run focused adapter tests under tests/adapters, then run just test-python.

Files:

  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapters/test_adapters_common_lifecycle.py
adapters/*/src/**/*.py

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

adapters/*/src/**/*.py: Implement adapters using the existing Fabric python or process runner and normalized request/result contracts; do not add a runner or one-off abstraction for a single adapter.
Treat normalized config, Fabric-resolved plans, and runtime_context as authoritative; reserve harness.settings for adapter-wide behavior and apply precedence in the order: normalized config, plans/context, harness settings, descriptor/default values.
Reject conflicting duplicate declarations and unsupported behavior with actionable errors naming the field and supported alternatives; never silently drop configuration.
Validate dependency versions, hooks, and credentials before harness invocation, and never expose credential values in outputs, errors, events, logs, or fixtures.
Forward only required system, selected credential, telemetry, and documented harness-specific environment variables; never forward or log unrelated environment values.
Maintain one local adapter host per Fabric runtime across ordered startinvoke*stop operations. Emit one JSON lifecycle response per request on stdout and diagnostics on stderr.
Return harness-level invocation failures as successful lifecycle responses containing response: null, failed: true, and structured error fields (code, message, retryable, and optional metadata).
Do not emit NeMo Relay stream records on adapter stdout; return exactly one terminal lifecycle response while streaming occurs through the SDK-owned out-of-band endpoint.
Scope workspace, generated configuration, state, sessions, and artifacts to the resolved runtime context, and isolate stateful adapter instances by Fabric runtime ID.
Use start to initialize adapter-owned harness state, retain it for continuation across repeated invoke calls on the same runtime, and release it in stop.

Files:

  • adapters/common/src/nemo_fabric_adapters/common/lifecycle.py
🧠 Learnings (2)
📚 Learning: 2026-08-07T07:15:59.993Z
Learnt from: AnuradhaKaruppiah
Repo: NVIDIA/NeMo-Fabric PR: 186
File: docs/adapter-contract/registration-and-discovery.md:103-104
Timestamp: 2026-08-07T07:15:59.993Z
Learning: Keep documentation files under docs/adapter-contract/ in portable Markdown (.md), not MDX. GitHub and the public authoring skill consume these files directly, and the NVIDIA NeMo Fabric documentation pipeline accepts them without conversion; do not flag the lack of MDX conversion for these files.

Applied to files:

  • docs/adapter-contract/normalized-configuration.md
  • docs/adapter-contract/execution.md
📚 Learning: 2026-08-07T16:20:01.603Z
Learnt from: AnuradhaKaruppiah
Repo: NVIDIA/NeMo-Fabric PR: 186
File: docs/adapter-contract/README.md:1-4
Timestamp: 2026-08-07T16:20:01.603Z
Learning: For maintained Markdown files under docs/adapter-contract/, Fern parses content as MDX. Write SPDX license headers as JSX comments (`{/* ... */}`), not HTML comments, because HTML comments cause Fern parsing failures. This JSX form is accepted by the repository copyright checker and validated by Docs Preview.

Applied to files:

  • docs/adapter-contract/normalized-configuration.md
  • docs/adapter-contract/execution.md
🪛 ast-grep (0.45.0)
tests/adapter_contract/test_dependency_boundary.py

[error] 43-43: Command coming from incoming request
Context: subprocess.run([sys.executable, "-c", script], check=True, env=env)
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(subprocess-from-request)

🪛 Ruff (0.16.1)
tests/adapter_contract/test_dependency_boundary.py

[error] 44-44: subprocess call: check for execution of untrusted input

(S603)

adapter-contract/src/nemo_fabric_adapter_contract/pydantic_support.py

[warning] 40-40: Avoid specifying long messages outside the exception class

(TRY003)

adapter-contract/src/nemo_fabric_adapter_contract/codec.py

[warning] 42-42: Remove quotes from type annotation

Remove quotes

(UP037)


[warning] 48-48: Dynamically typed expressions (typing.Any) are disallowed in value

(ANN401)


[warning] 57-57: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 68-70: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 73-73: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 83-83: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 87-87: Dynamically typed expressions (typing.Any) are disallowed in value

(ANN401)


[warning] 93-93: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 95-95: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 100-103: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 112-115: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 123-123: Dynamically typed expressions (typing.Any) are disallowed in instance

(ANN401)


[warning] 138-138: Dynamically typed expressions (typing.Any) are disallowed in instance

(ANN401)


[warning] 152-152: Too many return statements (17 > 6)

(PLR0911)


[warning] 152-152: Too many branches (32 > 12)

(PLR0912)


[warning] 152-152: Too many statements (57 > 50)

(PLR0915)


[warning] 153-153: Dynamically typed expressions (typing.Any) are disallowed in annotation

(ANN401)


[warning] 154-154: Dynamically typed expressions (typing.Any) are disallowed in value

(ANN401)


[warning] 158-158: Dynamically typed expressions (typing.Any) are disallowed in _decode_value

(ANN401)


[warning] 177-179: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 186-186: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 191-191: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 199-199: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 215-215: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 223-226: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 231-231: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 235-235: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 239-239: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 243-243: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 246-246: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 250-250: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 254-254: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 257-257: Dynamically typed expressions (typing.Any) are disallowed in value

(ANN401)


[warning] 257-257: Dynamically typed expressions (typing.Any) are disallowed in _encode_value

(ANN401)

adapter-contract/src/nemo_fabric_adapter_contract/models.py

[warning] 27-27: Missing return type annotation for private function _optional

(ANN202)


[warning] 27-27: Dynamically typed expressions (typing.Any) are disallowed in default

(ANN401)


[warning] 31-31: Missing return type annotation for private function _empty_dict

(ANN202)


[warning] 35-35: Missing return type annotation for private function _json_dict

(ANN202)


[warning] 39-39: Missing return type annotation for private function _empty_list

(ANN202)


[warning] 43-43: Missing return type annotation for private function _json_value_field

(ANN202)


[warning] 43-43: Dynamically typed expressions (typing.Any) are disallowed in default

(ANN401)


[warning] 54-54: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 59-62: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 84-84: Dynamically typed expressions (typing.Any) are disallowed in value

(ANN401)


[warning] 99-99: Do not perform function call _json_dict in dataclass defaults

(RUF009)


[warning] 105-105: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 117-117: Do not perform function call _json_dict in dataclass defaults

(RUF009)


[warning] 129-129: Do not perform function call _json_dict in dataclass defaults

(RUF009)


[warning] 137-140: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 163-163: Do not perform function call _optional in dataclass defaults

(RUF009)


[warning] 174-177: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 184-184: Do not perform function call _empty_list in dataclass defaults

(RUF009)


[warning] 189-192: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 201-201: Do not perform function call _empty_list in dataclass defaults

(RUF009)


[warning] 202-202: Do not perform function call _empty_dict in dataclass defaults

(RUF009)


[warning] 203-203: Do not perform function call _optional in dataclass defaults

(RUF009)


[warning] 204-204: Do not perform function call _empty_list in dataclass defaults

(RUF009)


[warning] 215-217: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 224-224: Do not perform function call _empty_dict in dataclass defaults

(RUF009)


[warning] 233-233: Do not perform function call _json_dict in dataclass defaults

(RUF009)


[warning] 244-244: Do not perform function call _empty_dict in dataclass defaults

(RUF009)


[warning] 245-245: Do not perform function call _optional in dataclass defaults

(RUF009)


[warning] 246-246: Do not perform function call _empty_list in dataclass defaults

(RUF009)


[warning] 255-257: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 277-277: Do not perform function call _json_dict in dataclass defaults

(RUF009)


[warning] 284-284: Do not perform function call _optional in dataclass defaults

(RUF009)


[warning] 285-285: Do not perform function call _empty_dict in dataclass defaults

(RUF009)


[warning] 286-286: Do not perform function call _optional in dataclass defaults

(RUF009)


[warning] 287-287: Do not perform function call _optional in dataclass defaults

(RUF009)


[warning] 288-288: Do not perform function call _optional in dataclass defaults

(RUF009)


[warning] 289-289: Do not perform function call _optional in dataclass defaults

(RUF009)


[warning] 290-290: Do not perform function call _optional in dataclass defaults

(RUF009)


[warning] 291-291: Do not perform function call _optional in dataclass defaults

(RUF009)


[warning] 298-298: Do not perform function call _json_value_field in dataclass defaults

(RUF009)


[warning] 299-299: Do not perform function call _json_dict in dataclass defaults

(RUF009)


[warning] 335-338: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 372-374: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 382-382: Do not perform function call _json_value_field in dataclass defaults

(RUF009)


[warning] 383-383: Do not perform function call _optional in dataclass defaults

(RUF009)


[warning] 384-384: Do not perform function call _optional in dataclass defaults

(RUF009)


[warning] 385-385: Do not perform function call _empty_list in dataclass defaults

(RUF009)


[warning] 389-389: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 391-391: Avoid specifying long messages outside the exception class

(TRY003)


[warning] 415-415: Do not perform function call _optional in dataclass defaults

(RUF009)


[warning] 416-416: Do not perform function call _optional in dataclass defaults

(RUF009)


[warning] 417-417: Do not perform function call _empty_dict in dataclass defaults

(RUF009)


[warning] 419-419: Do not perform function call _json_dict in dataclass defaults

(RUF009)


[warning] 420-420: Do not perform function call _json_dict in dataclass defaults

(RUF009)


[warning] 435-435: Do not perform function call _json_dict in dataclass defaults

(RUF009)


[warning] 448-448: Do not perform function call _optional in dataclass defaults

(RUF009)


[warning] 449-449: Do not perform function call _empty_list in dataclass defaults

(RUF009)


[warning] 457-457: Do not perform function call _optional in dataclass defaults

(RUF009)


[warning] 458-458: Do not perform function call _empty_dict in dataclass defaults

(RUF009)


[warning] 459-459: Do not perform function call _json_dict in dataclass defaults

(RUF009)


[warning] 471-471: Do not perform function call _optional in dataclass defaults

(RUF009)

🔇 Additional comments (25)
adapters/common/src/nemo_fabric_adapters/common/lifecycle.py (2)

39-39: LGTM!

Also applies to: 224-233, 285-293, 328-328, 356-356, 410-410


393-400: 🗄️ Data Integrity & Integration

No stale config_model callers remain. All lifecycle.serve call sites use the current API.

			> Likely an incorrect or invalid review comment.
adapters/common/README.md (1)

53-57: LGTM!

docs/adapter-contract/execution.md (1)

97-97: LGTM!

tests/adapters/test_adapters_common_lifecycle.py (1)

165-165: LGTM!

Also applies to: 205-205

external/nat/src/nemo_fabric_adapters/nat/adapter.py (1)

59-59: LGTM!

tests/adapters/test_external_nat_adapter.py (1)

44-44: LGTM!

Also applies to: 95-95, 274-277, 431-431, 1084-1088, 1098-1099

external/nat/README.md (1)

13-14: LGTM!

skills/nemo-fabric-build-adapter/SKILL.md (2)

134-134: LGTM!


74-75: 📐 Maintainability & Code Quality

No changes needed. SKILL.md contains valid YAML frontmatter with non-empty name and description fields.

adapter-contract/src/nemo_fabric_adapter_contract/codec.py (4)

33-84: LGTM!


87-120: LGTM!


138-149: LGTM!


257-273: LGTM!

adapter-contract/src/nemo_fabric_adapter_contract/models.py (2)

65-299: LGTM!

Also applies to: 310-391, 408-476


27-49: 📐 Maintainability & Code Quality

Do not flag RUF009. Ruff selects only B019; RUF009 is not enabled, so these helpers do not cause just lint to fail.

			> Likely an incorrect or invalid review comment.
tests/adapter_contract/test_agent_execution.py (1)

9-9: LGTM!

Also applies to: 19-25, 41-45, 90-97, 112-116, 151-154, 172-172

docs/adapter-contract/normalized-configuration.md (1)

48-49: LGTM!

Also applies to: 83-84

adapter-contract/pyproject.toml (1)

27-32: LGTM!

adapter-contract/pypi.md (1)

18-29: LGTM!

Also applies to: 41-43

adapter-contract/src/nemo_fabric_adapter_contract/pydantic_support.py (2)

21-42: LGTM!


10-15: 🔒 Security & Privacy

No package-level Pydantic import exists. __init__.py is empty, so importing nemo_fabric_adapter_contract does not load pydantic_support.

			> Likely an incorrect or invalid review comment.
tests/adapter_contract/test_agent_config.py (1)

9-10: LGTM!

Also applies to: 29-32, 80-80, 95-110, 120-144, 147-175

tests/adapter_contract/test_dependency_boundary.py (1)

17-44: LGTM!

tests/adapters/test_adapter_package_metadata.py (1)

53-53: LGTM!

Also applies to: 62-62, 99-102

Comment thread adapter-contract/pypi.md Outdated
Comment thread adapter-contract/src/nemo_fabric_adapter_contract/codec.py
Comment thread adapter-contract/src/nemo_fabric_adapter_contract/codec.py
Comment thread tests/adapter_contract/test_agent_execution.py
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
@AnuradhaKaruppiah
AnuradhaKaruppiah marked this pull request as ready for review August 8, 2026 00:56
@AnuradhaKaruppiah
AnuradhaKaruppiah requested review from a team as code owners August 8, 2026 00:56
…ataclass

Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>

# Conflicts:
#	tests/adapters/test_adapter_package_metadata.py

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

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

⚠️ Outside diff range comments (2)
external/nat/README.md (1)

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

Format the Pydantic package name as code.

Line 14 uses Pydantic as plain prose. Write it as Pydantic.

As per coding guidelines: "Format commands, code elements, expressions, package names, file names, and paths as inline code."

Proposed documentation fix
-... depend on Pydantic for its contract boundary.
+... depend on `Pydantic` for its contract boundary.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@external/nat/README.md` at line 14, Update the documentation sentence near
“FabricConfig” to format the package name `Pydantic` as inline code, preserving
the surrounding wording.

Source: Coding guidelines

adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py (1)

512-514: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

Drain the MCP shutdown worker before continuing cleanup.

If stop() is cancelled during asyncio.to_thread(shutdown_mcp_servers), the worker continues after the await is cancelled. The current handler then closes the agent, session database, and Relay context before MCP shutdown completes. Store and shield the shutdown task, drain it on cancellation, and add a cancellation test.

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

In `@adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py` around lines 512
- 514, Update stop() around shutdown_mcp_servers so the asyncio.to_thread
operation is stored as a task and shielded from cancellation; if stop() is
cancelled, await the task to completion before continuing cleanup, then
propagate cancellation. Add a cancellation test verifying the MCP shutdown
worker completes before the agent, session database, and Relay context are
closed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py`:
- Around line 512-514: Update stop() around shutdown_mcp_servers so the
asyncio.to_thread operation is stored as a task and shielded from cancellation;
if stop() is cancelled, await the task to completion before continuing cleanup,
then propagate cancellation. Add a cancellation test verifying the MCP shutdown
worker completes before the agent, session database, and Relay context are
closed.

In `@external/nat/README.md`:
- Line 14: Update the documentation sentence near “FabricConfig” to format the
package name `Pydantic` as inline code, preserving the surrounding wording.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: f95df6fd-fbf1-4609-96d5-a7ab9d4eb18d

📥 Commits

Reviewing files that changed from the base of the PR and between b9f314a and d60db9f.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • external/nat/README.md
  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_external_nat_adapter.py
📜 Review details
⏰ Context from checks skipped due to timeout. (16)
  • GitHub Check: Preview docs
  • GitHub Check: Test (Python 3.14, linux-amd64)
  • GitHub Check: Test (Python 3.12, linux-amd64)
  • GitHub Check: Test (Python 3.12, linux-arm64)
  • GitHub Check: Test (Python 3.12, macos-arm64)
  • GitHub Check: Test (Python 3.11, windows-amd64)
  • GitHub Check: Test (Python 3.11, linux-amd64)
  • GitHub Check: Test (Python 3.13, linux-arm64)
  • GitHub Check: Test (Python 3.11, linux-arm64)
  • GitHub Check: Test (Python 3.14, windows-amd64)
  • GitHub Check: Test (Python 3.13, linux-amd64)
  • GitHub Check: Test (Python 3.12, windows-amd64)
  • GitHub Check: Test (Python 3.14, linux-arm64)
  • GitHub Check: Test (Python 3.13, windows-amd64)
  • GitHub Check: Test (Python 3.13, macos-arm64)
  • GitHub Check: Pre-commit
🧰 Additional context used
📓 Path-based instructions (22)
**/*.{rs,py,pyi,json,yaml,yml}

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

Determine and update every affected public surface, including the CLI, PyO3 bindings, Python SDK, type stubs, schemas, and adapter contract, so they remain in parity.

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
**/*

📄 CodeRabbit inference engine (.agents/skills/karpathy-guidelines/SKILL.md)

**/*: Before implementing, explicitly state assumptions, surface ambiguity and tradeoffs, present multiple interpretations when relevant, and ask for clarification rather than silently deciding or proceeding when requirements are unclear.
Prefer the minimum code needed to solve the requested problem: avoid speculative features, unnecessary abstractions, unrequested flexibility, and handling of impossible scenarios; simplify overcomplicated solutions.
When editing existing code, make surgical changes only: do not modify unrelated code, comments, formatting, or pre-existing dead code; match the existing style, and remove only unused imports, variables, or functions introduced by your changes.
Define verifiable success criteria for each task, such as writing regression tests for bugs and invalid-input tests for validation, then verify the implementation against those criteria. For multi-step work, state a brief plan with a verification check for each step.

**/*: Always spell NVIDIA in all caps; do not use Nvidia, nvidia, nVidia, nVIDIA, or NV.
Use an NVIDIA before a noun, because the name begins 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 required by the document type or legal guidance.
Verify official capitalization, spacing, hyphenation, and spelling for NVIDIA and third-party product names; do not rewrite official product names for grammar or title-case rules.
Precede NVIDIA product names with NVIDIA on first mention when natural and accurate, and link the first mention when the destination helps the reader.
On first use, include the company name and full model qualifier when it helps identify the model; preserve official capitalization and punctuation, and use shorter family names only after establishing the full name.
For learning-oriented and developer content, do not force trademark symbols unless explicitly required; for press, ...

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • external/nat/README.md
  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
**/*.{rs,py}

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

For native binding changes, run cargo check -p fabric-python --locked.

Use snake_case for functions and variables; use PascalCase for Rust types and Python classes.

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
**/*.{py,pyi}

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

If Python code or a Python-facing adapter changes, run just test-python.

In Python SDK, adapters, examples, and tests, follow the existing style, use type annotations for public APIs, and keep native binding declarations synchronized with their Rust implementations.

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
**/*.{rs,py,pyi}

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

**/*.{rs,py,pyi}: If public configuration types change, confirm schema snapshot tests in just test-rust pass and review generated schema diffs.
For schema or public contract changes, run both language suites and review changes under schemas/ and generated API references.

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
**/*.{py,pyi,rs}

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

For Python SDK or PyO3 binding changes, use python-tests, run focused pytest tests first, then just test-python; rebuild with just build-python when native code or packaging changes.

Public contract changes must keep native Python binding declarations synchronized with their Rust implementations.

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
**/*.{rs,py,toml}

📄 CodeRabbit inference engine (.agents/skills/update-project-version/SKILL.md)

When editing version helpers, verify every nemo-fabric-* workspace package through Cargo metadata and reject a static version in python/pyproject.toml.

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
**/*.{toml,rs,py}

📄 CodeRabbit inference engine (.agents/skills/update-project-version/SKILL.md)

Avoid blind repository-wide replacement of version-like strings; distinguish package-version references from examples and unrelated dependency versions.

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
**/*.{md,mdx,yml,py,rs,sh}

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

Keep documentation aligned with current NeMo Fabric behavior, repository layout, entry points, commands, package names, APIs, bindings, and support claims.

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • external/nat/README.md
  • external/nat/src/nemo_fabric_adapters/nat/adapter.py
  • tests/adapters/test_external_nat_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
adapters/*/src/**/*.py

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

adapters/*/src/**/*.py: Implement adapters using the existing Fabric python or process runner and normalized request/result contracts; do not add a runner or one-off abstraction for a single adapter.
Treat normalized config, Fabric-resolved plans, and runtime_context as authoritative; reserve harness.settings for adapter-wide behavior and apply precedence in the order: normalized config, plans/context, harness settings, descriptor/default values.
Reject conflicting duplicate declarations and unsupported behavior with actionable errors naming the field and supported alternatives; never silently drop configuration.
Validate dependency versions, hooks, and credentials before harness invocation, and never expose credential values in outputs, errors, events, logs, or fixtures.
Forward only required system, selected credential, telemetry, and documented harness-specific environment variables; never forward or log unrelated environment values.
Maintain one local adapter host per Fabric runtime across ordered startinvoke*stop operations. Emit one JSON lifecycle response per request on stdout and diagnostics on stderr.
Return harness-level invocation failures as successful lifecycle responses containing response: null, failed: true, and structured error fields (code, message, retryable, and optional metadata).
Do not emit NeMo Relay stream records on adapter stdout; return exactly one terminal lifecycle response while streaming occurs through the SDK-owned out-of-band endpoint.
Scope workspace, generated configuration, state, sessions, and artifacts to the resolved runtime context, and isolate stateful adapter instances by Fabric runtime ID.
Use start to initialize adapter-owned harness state, retain it for continuation across repeated invoke calls on the same runtime, and release it in stop.

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
{adapters/**,examples/**}

⚙️ CodeRabbit configuration file

{adapters/**,examples/**}: Review adapter and example changes for command correctness, config/schema consistency, artifact handling, and compatibility with the public NeMo Fabric contracts.

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
**/*.{md,rst}

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

Update documentation and examples in the same branch as the public API change.

Files:

  • external/nat/README.md
**/*.{md,mdx,rst}

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

**/*.{md,mdx,rst}: For NeMo Fabric documentation, verify technical claims against the current repository, public API, or documented command before reviewing style.
Always 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, parallel steps; split long procedures into smaller tasks.
Prefer active voice, present tense, short sentences, contractions, and plain English while preserving necessary technical precision.
Use can for possibility and reserve may for permission.
Use after for temporal relationships instead of once, and prefer refer to over see when directing 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 commas in thousands.
Do not add trademark symbols to learning-oriented documentation unless the source, platform, or legal guidance explicitly requires them.
Do not replace precise technical terms with simpler words when doing so would lose precision.
Do not flag passive voice when the actor is unknown or the action is the important part.
Do not rewrite API names, package names, command flags, or code literals for style.

**/*.{md,mdx,rst}: Use consistent title case for technical-document headings and table headers; avoid quotation marks, ampersands, and exclamation marks in headings, while preserving official product, event, research, and whitepaper title ...

Files:

  • external/nat/README.md
**/*.{md,rst,txt,adoc}

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

**/*.{md,rst,txt,adoc}: For technical documentation, use professional, active, conversational, engaging, precise, and plain-English prose. Prefer active voice, present tense, short sentences, and scannable paragraphs. Avoid casual or imprecise language, swearing, threats, insults, jokes, puns, culture-specific idioms, marketing exaggeration, and unsupported third-party comparisons.
Use can for possibility and reserve may for permission; use after for temporal order; use refer to for cross-references; prefer short direct sentences and specific verbs; avoid unnecessary please in technical documentation.
Prefer active voice when the actor matters. Passive voice is acceptable when the actor is unknown or irrelevant, when the action or result is the focus, or in programmer documentation.
Use natural contractions in conversational technical prose, but do not force them in formal legal copy, API references, or generated text.
Prefer simpler English over Latinisms: use for example or such as instead of e.g., and so on instead of etc., that is instead of i.e., compared to instead of vs., and by, through, or using instead of via. Use industry-standard terms such as in silico, in vitro, and in vivo when appropriate, and italicize them in running text.
Use that without commas for essential clauses, and which with commas for nonessential clauses.
Format dates and times clearly: spell out months in body text; use forms such as June 12, 2025; avoid numeric or ordinal dates; capitalize days; use 12-hour time when appropriate; include a space before a.m. or p.m.; use ET and PT for needed time zones; avoid 24/7; and prefer from 12:30 to 1:00 p.m. for prose ranges.
Format numbers consistently: spell out zero through nine in body text, use numerals for 10 or greater and for technical values, use commas in thousands, do not begin a sentence with a numeral, spell out ordinals, and use numerals consistently within a category wh...

Files:

  • external/nat/README.md
**/*.{md,mdx}

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

**/*.{md,mdx}: Use the full product name NVIDIA NeMo Fabric on first use, typically in the title and H1; use NeMo Fabric thereafter. Use fabric alone only for the CLI tool and surround it with backticks.
Treat incorrect or stale commands, package names, paths, APIs, support claims, procedures, examples, terminology, or public behavior documentation as blocking issues.
Capitalize NVIDIA correctly and format code, commands, paths, and filenames as inline code where needed.
Use title case for technical-documentation headings.
Introduce code blocks, tables, and lists with complete lead-in sentences; ensure examples match current APIs and build commands.
Use descriptive anchor text, avoid raw URLs and generic labels such as here, and use repository-relative .mdx paths for links within docs/.
Prefer active voice, present tense, short sentences, plain English, consistent terminology, and imperative, parallel, scannable procedures.
Use after instead of once when expressing temporal sequence, and use can rather than may when describing possibility rather than permission.
Avoid ambiguous numeric dates and ordinal dates in body text.
For learning-oriented documentation, do not force trademark symbols unless the source document explicitly requires them.
When reporting documentation-review findings, lead with Must fix, Should fix, and Nice to have categories; include file path, line reference, current problem, rationale, and a concrete rewrite or direction.

Files:

  • external/nat/README.md
**/*.md

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Update relevant SDK, API reference, adapter, example, integration, and support documentation when the corresponding public surface changes.

Files:

  • external/nat/README.md
**/*.{html,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

HTML and Markdown files must use the specified SPDX HTML-comment header.

Files:

  • external/nat/README.md
{*.md,**/*.md,**/*.mdx,**/*.ipynb}

⚙️ CodeRabbit configuration file

{*.md,**/*.md,**/*.mdx,**/*.ipynb}: Enforce the product name in user-facing prose: use "NVIDIA NeMo Fabric" on first use and "NeMo Fabric" thereafter. Flag standalone capitalized "Fabric" when it refers to the product. Do not flag the lowercase fabric CLI command, package/import/crate names, code identifiers, API symbols, configuration keys, file paths, or unrelated generic uses of the word.

Files:

  • external/nat/README.md
tests/adapters/**/*.py

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

tests/adapters/**/*.py: If an adapter or integration changes, run its focused tests.
For adapter behavior changes, run focused adapter tests under tests/adapters, then run just test-python.

Files:

  • tests/adapters/test_external_nat_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
tests/**/*.{rs,py}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

When adding functionality, include tests in the corresponding Rust crate or the relevant area under tests/.

Files:

  • tests/adapters/test_external_nat_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
tests/**/*.py

📄 CodeRabbit inference engine (.agents/skills/python-tests/SKILL.md)

tests/**/*.py: Use pytest to run Python tests.
Do not add @pytest.mark.asyncio to tests; async tests are automatically detected by the async runner.
Do not add -> None return type annotations to test functions.
When mocking a class, use unittest.mock.MagicMock or AsyncMock, using the spec argument when necessary, rather than defining a new class.
Prefix mocked class names with mock, not fake.
Prefer pytest fixtures over helper methods.
If a fixture is needed in multiple test files, define it once in conftest.py rather than repeating it.
Define fixtures using @pytest.fixture(name="<fixture_name>"[, scope="<scope>"]) and a <fixture_name>_fixture function; specify scope only when it is not function.
Prefer pytest.mark.parametrize over separate tests for different input types.
Use @pytest.mark.usefixtures when a fixture is needed but its returned value is unused or it returns no value.
Avoid defensive programming in tests; access expected values directly so missing data raises a clear failure, such as using results["data"] instead of results.get("data").
When adapter installation metadata changes, packaging metadata tests must directly assert that the root project depends unconditionally on the exact-version nemo-fabric-runtime distribution.
Packaging metadata tests must verify that each root harness extra delegates to the matching version of the leaf adapter's harness extra.
Packaging metadata tests must verify that bare leaf dependencies remain adapter-owned and that the root adapter-tests dependency group installs each leaf through its harness extra.
Packaging metadata tests must verify that every leaf provides full; only adapters importing NeMo Relay Python APIs provide relay, while adapters using an external Relay executable have full equal to harness.

Files:

  • tests/adapters/test_external_nat_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
{tests/**,python/tests/**}

⚙️ CodeRabbit configuration file

{tests/**,python/tests/**}: Tests should cover the behavior promised by the changed API surface, including error paths, lifecycle cleanup, and SDK/native parity where relevant.

Files:

  • tests/adapters/test_external_nat_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
🧠 Learnings (1)
📚 Learning: 2026-07-09T22:28:51.689Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 43
File: adapters/claude-sdk/src/nemo_fabric_adapters/claude_sdk/adapter.py:164-168
Timestamp: 2026-07-09T22:28:51.689Z
Learning: In the NeMo-Fabric adapters, treat path values used in Fabric adapter configuration (including logic like `_resolve_path` in adapter.py) as config-root-relative. Do not apply `Path.expanduser()` (or otherwise apply `~`/home or shell-style expansion), because it will make the resolved paths normalize inconsistently across adapters. Also, do not rely on or add any resolution behavior that uses `harness.settings.cwd` as an override point for these adapter paths—`harness.settings.cwd` is explicitly unsupported in this adapter context.

Applied to files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
🔇 Additional comments (5)
tests/adapters/test_adapter_package_metadata.py (1)

53-55: LGTM!

Also applies to: 64-64, 101-106

tests/adapters/test_external_nat_adapter.py (1)

44-44: LGTM!

Also applies to: 95-95, 274-277, 431-431, 451-454, 1052-1060, 1080-1090, 1093-1097, 1107-1108

external/nat/src/nemo_fabric_adapters/nat/adapter.py (1)

58-58: LGTM!

Also applies to: 279-283

external/nat/README.md (1)

12-13: LGTM!

Also applies to: 53-56

adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py (1)

306-307: LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant