Skip to content

feat: move Deep Agents adapter to v1alpha2 - #196

Draft
zhongxuanwang-nv wants to merge 2 commits into
NVIDIA:mainfrom
zhongxuanwang-nv:feat/deepagents-contract-v1alpha2
Draft

feat: move Deep Agents adapter to v1alpha2#196
zhongxuanwang-nv wants to merge 2 commits into
NVIDIA:mainfrom
zhongxuanwang-nv:feat/deepagents-contract-v1alpha2

Conversation

@zhongxuanwang-nv

@zhongxuanwang-nv zhongxuanwang-nv commented Aug 11, 2026

Copy link
Copy Markdown
Member

Overview

Moves the Deep Agents adapter to the v1alpha2 southbound contract while preserving its existing model-key, workspace, checkpointer, Relay, and native-observability behavior. The adapter now has the narrow direct dependency on the in-repository contract package; no third-party or transitive package was added, and no attribution change is required.

Details

  • Select agent_config in both shipped Deep Agents descriptors and decode it with the dependency-free AgentConfig dataclass.
  • Read normalized models, instructions, tools, skills, MCP servers, artifacts, and request identifiers through contract dataclasses; retain opaque Deep Agents settings, invocation input, and model results unchanged.
  • Surface the existing native telemetry configuration in typed runtime-context metadata so the adapter no longer reads the legacy telemetry plan.
  • Preserve Relay ATIF precedence while supplying the validated model name only as the fallback for typed Deep Agents configurations.
  • Cover typed startup, MCP/skills/tool policy, native and Relay telemetry, package metadata, and the core runtime-context projection.

Validation

  • python -m pytest tests/adapters/test_deepagents.py tests/adapters/test_adapaters_common_utils.py tests/adapters/test_adapter_package_metadata.py -q (111 passed)
  • cargo fmt --all -- --check
  • just test-rust (93 passed)
  • cargo check -p fabric-python --locked
  • Attempted just test-python; it cannot start in this environment because uv is unavailable. The available project environment also lacks a built native extension, so the complete local suite could not run. PR CI is running the native-backed matrix.

Where should the reviewer start?

Start with adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py: each legacy normalized-payload read maps directly to an AgentConfig or RuntimeContext field. Then review crates/fabric-core/src/runtime.rs for the small native-telemetry context projection.

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

  • Relates to FABRIC-186

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

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The DeepAgents adapter now consumes validated AgentConfig and RuntimeContext objects. Adapter descriptors and dependencies use the contract package. Runtime telemetry preserves native configuration metadata. Relay configuration accepts an explicit model name. Tests cover the typed lifecycle and configuration paths.

Changes

DeepAgents typed contract migration

Layer / File(s) Summary
Contract wiring and telemetry context
adapters/deepagents/fabric-adapter.json, adapters/deepagents/pyproject.toml, crates/fabric-cli/assets/adapters/deepagents/fabric-adapter.json, crates/fabric-core/src/runtime.rs
The adapter declares agent_config input and adds the pinned contract dependency. Runtime telemetry retains native configuration metadata.
Typed adapter lifecycle and execution flow
adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py, adapters/common/src/nemo_fabric_adapters/common/utils.py
Lifecycle startup validates AgentConfig, constructs RuntimeContext, and passes typed configuration to model, MCP, skill, persistence, invocation, observability, and Relay configuration handling.
Typed configuration validation and regression coverage
tests/adapters/test_adapter_package_metadata.py, tests/adapters/test_deepagents.py, tests/adapters/test_adapaters_common_utils.py
Tests use validated configuration and runtime context objects. Coverage includes telemetry, MCP, skills, subagent gating, lifecycle loading, model-name overrides, and validation errors.

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

Sequence Diagram(s)

sequenceDiagram
  participant AdapterLifecycle
  participant AgentConfig
  participant RuntimeContext
  participant DeepAgentsRuntime
  participant RelayConfig
  AdapterLifecycle->>AgentConfig: from_mapping(config)
  AdapterLifecycle->>RuntimeContext: construct runtime context
  AdapterLifecycle->>DeepAgentsRuntime: build typed model, tools, skills, and backend
  RuntimeContext->>DeepAgentsRuntime: provide runtime, telemetry, request, and artifact metadata
  DeepAgentsRuntime->>RelayConfig: load configuration with model_name
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.26% 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 uses valid Conventional Commits format and accurately describes the adapter migration.
Description check ✅ Passed The description includes the required overview, reviewer guidance, related issue, confirmations, and validation details.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

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

⚠️ Outside diff range comments (1)
adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py (1)

279-303: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Reject blank MCP transports.

Line 281 converts an empty or whitespace-only spec.transport to streamable_http at Lines 297-298. The southbound contract requires a non-blank transport. Reject this value before transport normalization. Add regression coverage for empty and whitespace-only transports.

Proposed fix
     transport = str(spec.transport or "").strip().lower().replace("-", "_")
+    if not transport:
+        raise AdapterConfigError(
+            f"MCP server '{name}' requires a non-empty transport."
+        )
     # AgentMcpServerConfig carries the command in ``url`` and stdio extensions.
     target = os.path.expandvars(str(spec.url or "")).strip()
@@
-    if transport in ("", "http", "streamable_http", "streamablehttp"):
+    if transport in ("http", "streamable_http", "streamablehttp"):
         transport = "streamable_http"

As per path instructions, “MCP servers require non-blank transport and URL.”

🤖 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/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py` around
lines 279 - 303, Update _mcp_connection to reject empty or whitespace-only
spec.transport before normalization, raising AdapterConfigError consistently
with the existing blank-URL validation. Preserve supported transport
normalization for non-blank values, and add regression coverage for both empty
and whitespace-only transports.

Source: Path instructions

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

Inline comments:
In `@adapters/deepagents/fabric-adapter.json`:
- Line 167: Update config.accepts in
adapters/deepagents/fabric-adapter.json:167-167 and
crates/fabric-cli/assets/adapters/deepagents/fabric-adapter.json:167-167 to list
only the top-level sections models, instructions, tools, and telemetry,
replacing dotted entries such as models.base_url and tools.blocked. Keep both
descriptors identical.

---

Outside diff comments:
In `@adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py`:
- Around line 279-303: Update _mcp_connection to reject empty or whitespace-only
spec.transport before normalization, raising AdapterConfigError consistently
with the existing blank-URL validation. Preserve supported transport
normalization for non-blank values, and add regression coverage for both empty
and whitespace-only transports.
🪄 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: e67f7a28-f5f8-478a-8a02-d515f87f8ecf

📥 Commits

Reviewing files that changed from the base of the PR and between 4112bea and b72cbb8.

⛔ Files ignored due to path filters (2)
  • adapters/deepagents/uv.lock is excluded by !**/*.lock
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • adapters/deepagents/fabric-adapter.json
  • adapters/deepagents/pyproject.toml
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
  • crates/fabric-cli/assets/adapters/deepagents/fabric-adapter.json
  • crates/fabric-core/src/runtime.rs
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
📜 Review details
⏰ Context from checks skipped due to timeout. (19)
  • GitHub Check: Preview docs
  • GitHub Check: Test (Python 3.14, windows-amd64)
  • GitHub Check: Test (Python 3.13, windows-amd64)
  • GitHub Check: Test (Python 3.11, windows-amd64)
  • GitHub Check: Test (Python 3.12, windows-amd64)
  • GitHub Check: Test (Python 3.14, macos-arm64)
  • GitHub Check: Test (Python 3.13, linux-arm64)
  • GitHub Check: Test (Python 3.11, linux-amd64)
  • GitHub Check: Test (Python 3.14, linux-amd64)
  • GitHub Check: Test (Python 3.12, macos-arm64)
  • GitHub Check: Test (Python 3.13, macos-arm64)
  • GitHub Check: Test (Python 3.11, macos-arm64)
  • GitHub Check: Test (Python 3.11, linux-arm64)
  • GitHub Check: Test (Python 3.12, linux-amd64)
  • GitHub Check: Test (Python 3.14, linux-arm64)
  • GitHub Check: Test (Python 3.13, linux-amd64)
  • GitHub Check: Test (Python 3.12, linux-arm64)
  • GitHub Check: Pre-commit
  • GitHub Check: Test (x86_64)
🧰 Additional context used
📓 Path-based instructions (33)
**/*.{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:

  • crates/fabric-cli/assets/adapters/deepagents/fabric-adapter.json
  • adapters/deepagents/fabric-adapter.json
  • tests/adapters/test_adapter_package_metadata.py
  • crates/fabric-core/src/runtime.rs
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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:

  • crates/fabric-cli/assets/adapters/deepagents/fabric-adapter.json
  • adapters/deepagents/fabric-adapter.json
  • adapters/deepagents/pyproject.toml
  • tests/adapters/test_adapter_package_metadata.py
  • crates/fabric-core/src/runtime.rs
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
**/*.{json,jsonschema}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Public contract changes must keep checked-in JSON Schema snapshots synchronized.

Files:

  • crates/fabric-cli/assets/adapters/deepagents/fabric-adapter.json
  • adapters/deepagents/fabric-adapter.json
adapters/*/fabric-adapter.json

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

Define a narrow, truthful adapter descriptor; keep config.accepts, config.generates, requirements, telemetry declarations, lifecycle capabilities, and advertised capabilities synchronized with implementation and tests.

Files:

  • adapters/deepagents/fabric-adapter.json
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/deepagents/fabric-adapter.json
{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/deepagents/fabric-adapter.json
  • adapters/deepagents/pyproject.toml
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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:

  • adapters/deepagents/pyproject.toml
  • crates/fabric-core/src/runtime.rs
**/{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:

  • adapters/deepagents/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:

  • adapters/deepagents/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:

  • adapters/deepagents/pyproject.toml
{pyproject.toml,adapters/**/pyproject.toml}

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

{pyproject.toml,adapters/**/pyproject.toml}: Update the literal project.version in the root setuptools project and every adapter pyproject.toml.
Keep internal exact-version requirements aligned: root nemo-fabric-* == <version> optional dependencies and each adapter's nemo-fabric-adapters-common == <version> dependency.

Files:

  • adapters/deepagents/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:

  • adapters/deepagents/pyproject.toml
  • tests/adapters/test_adapter_package_metadata.py
  • crates/fabric-core/src/runtime.rs
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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/deepagents/pyproject.toml
  • tests/adapters/test_adapter_package_metadata.py
  • crates/fabric-core/src/runtime.rs
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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:

  • adapters/deepagents/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:

  • adapters/deepagents/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:

  • adapters/deepagents/pyproject.toml
adapters/*/pyproject.toml

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

adapters/*/pyproject.toml: Keep leaf adapter runtime dependencies razor-thin and adapter-owned. Do not declare the wrapped harness/SDK or dependencies already declared by its supported package; provide dependency-free fallbacks for optional libraries.
Provide every installable Python leaf adapter with a harness extra and a full extra for package-installable integrations; provide a relay extra when importing NeMo Relay Python APIs, but not when Relay is an external executable.
For packaged harnesses, declare and document a harness version constraint supported by upstream contracts and test evidence; do not claim a broader range than the evidence supports.

Files:

  • adapters/deepagents/pyproject.toml
adapters/*/{pyproject.toml,uv.lock}

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

Keep each adapter package independent and small, using Python package metadata and lock files as applicable.

Files:

  • adapters/deepagents/pyproject.toml
**/*.{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:

  • tests/adapters/test_adapter_package_metadata.py
  • crates/fabric-core/src/runtime.rs
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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:

  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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:

  • tests/adapters/test_adapter_package_metadata.py
  • crates/fabric-core/src/runtime.rs
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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_deepagents.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:

  • tests/adapters/test_adapter_package_metadata.py
  • crates/fabric-core/src/runtime.rs
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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:

  • tests/adapters/test_adapter_package_metadata.py
  • crates/fabric-core/src/runtime.rs
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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_adapter_package_metadata.py
  • tests/adapters/test_deepagents.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_adapter_package_metadata.py
  • tests/adapters/test_deepagents.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_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
**/*.rs

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

Implement new runtime or binding behavior in the shared Rust core first.

Files:

  • crates/fabric-core/src/runtime.rs
crates/fabric-core/**/*.{rs,py}

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

Changes under crates/fabric-core must run both the Rust and Python test suites.

Files:

  • crates/fabric-core/src/runtime.rs
**/*.{rs,rmeta}

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

If Rust code changes, run cargo fmt --all -- --check and just test-rust.

Files:

  • crates/fabric-core/src/runtime.rs
crates/fabric-core/**/*.rs

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

If crates/fabric-core changes in a way exposed through Python, run both the Rust and Python suites.

For Rust API reference changes, update Rust documentation comments under crates/fabric-core/ instead of generated API reference files.

Files:

  • crates/fabric-core/src/runtime.rs
crates/fabric-core/src/**/*.rs

⚙️ CodeRabbit configuration file

crates/fabric-core/src/**/*.rs: Review the Rust core for runtime lifecycle correctness, handle validation, capability routing accuracy, schema stability, and error semantics.
Public API changes should match committed schemas, tests, and documentation.

Files:

  • crates/fabric-core/src/runtime.rs
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/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
🧠 Learnings (2)
📚 Learning: 2026-06-29T22:34:52.407Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 27
File: adapters/codex-cli/fabric-adapter.json:13-15
Timestamp: 2026-06-29T22:34:52.407Z
Learning: In NeMo-Fabric adapter manifest files (e.g., `*/fabric-adapter.json`), keep `config.accepts` limited to the top-level Fabric capability sections that `resolve_capability_plan` consumes (such as `models`, `tools`, `mcp`, `skills`, `telemetry`). Do not add adapter-owned `harness.settings` keys to `config.accepts`; `harness.settings` should remain adapter-owned and be passed through unchanged.

Applied to files:

  • crates/fabric-cli/assets/adapters/deepagents/fabric-adapter.json
  • adapters/deepagents/fabric-adapter.json
📚 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/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
🪛 ast-grep (0.45.1)
tests/adapters/test_deepagents.py

[warning] 1091-1091: Do not make http calls without encryption
Context: "http://x/mcp"
Note: [CWE-319] Cleartext Transmission of Sensitive Information.

(requests-http)

🪛 Ruff (0.16.1)
adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py

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

(TRY003)


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

(TRY003)


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

(TRY003)


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

(ANN401)


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

(ANN401)


[warning] 492-495: Abstract raise to an inner function

(TRY301)


[warning] 777-777: Boolean-typed positional argument in function definition

(FBT001)

🔇 Additional comments (6)
adapters/deepagents/pyproject.toml (1)

28-28: LGTM!

Also applies to: 67-67

crates/fabric-core/src/runtime.rs (1)

1819-1821: LGTM!

Also applies to: 2460-2460, 2650-2668

adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py (2)

118-121: 📐 Maintainability & Code Quality

Complete the required Python validation.

The PR validation states that just test-python did not run. Run it after the required uv and native-extension prerequisites are available. Focused tests do not replace this required suite.

As per coding guidelines, “If Python code or a Python-facing adapter changes, run just test-python.”

Source: Coding guidelines


26-29: LGTM!

Also applies to: 93-242, 261-269, 309-373, 490-598, 774-797

tests/adapters/test_adapter_package_metadata.py (1)

83-83: LGTM!

tests/adapters/test_deepagents.py (1)

26-35: LGTM!

Also applies to: 175-185, 353-358, 375-437, 489-530, 627-635, 737-737, 853-855, 903-982, 1090-1106, 1178-1180

Comment thread adapters/deepagents/fabric-adapter.json
@github-actions

Copy link
Copy Markdown

Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@adapters/common/src/nemo_fabric_adapters/common/utils.py`:
- Line 306: Update the ATIF model-name assignment in
adapters/common/src/nemo_fabric_adapters/common/utils.py:306-306 to overwrite
any existing atif.model_name when model_name is provided, using
relay_model_name(payload) only when it is absent. In
tests/adapters/test_adapaters_common_utils.py:349-376, preconfigure an ATIF
model name and verify the explicit model_name replaces it.
🪄 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: 7373a31f-5fc9-4b17-9c09-42e3c4805bcf

📥 Commits

Reviewing files that changed from the base of the PR and between b72cbb8 and a62d427.

📒 Files selected for processing (4)
  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
  • tests/adapters/test_adapaters_common_utils.py
  • tests/adapters/test_deepagents.py
📜 Review details
⏰ Context from checks skipped due to timeout. (18)
  • GitHub Check: Preview docs
  • GitHub Check: Test (Python 3.11, windows-amd64)
  • GitHub Check: Test (Python 3.14, windows-amd64)
  • GitHub Check: Test (Python 3.13, linux-amd64)
  • GitHub Check: Test (Python 3.14, macos-arm64)
  • GitHub Check: Test (Python 3.11, linux-amd64)
  • GitHub Check: Test (Python 3.13, windows-amd64)
  • GitHub Check: Test (Python 3.13, linux-arm64)
  • GitHub Check: Test (Python 3.11, macos-arm64)
  • GitHub Check: Test (Python 3.11, linux-arm64)
  • GitHub Check: Test (Python 3.14, linux-arm64)
  • GitHub Check: Test (Python 3.13, macos-arm64)
  • GitHub Check: Test (Python 3.12, macos-arm64)
  • GitHub Check: Test (Python 3.12, linux-amd64)
  • GitHub Check: Test (Python 3.12, linux-arm64)
  • GitHub Check: Test (Python 3.14, linux-amd64)
  • GitHub Check: Test (Python 3.12, windows-amd64)
  • GitHub Check: Pre-commit
🧰 Additional context used
📓 Path-based instructions (15)
**/*.{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:

  • tests/adapters/test_adapaters_common_utils.py
  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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:

  • tests/adapters/test_adapaters_common_utils.py
  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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:

  • tests/adapters/test_adapaters_common_utils.py
  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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:

  • tests/adapters/test_adapaters_common_utils.py
  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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:

  • tests/adapters/test_adapaters_common_utils.py
  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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_adapaters_common_utils.py
  • tests/adapters/test_deepagents.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:

  • tests/adapters/test_adapaters_common_utils.py
  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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:

  • tests/adapters/test_adapaters_common_utils.py
  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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:

  • tests/adapters/test_adapaters_common_utils.py
  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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:

  • tests/adapters/test_adapaters_common_utils.py
  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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_adapaters_common_utils.py
  • tests/adapters/test_deepagents.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_adapaters_common_utils.py
  • tests/adapters/test_deepagents.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_adapaters_common_utils.py
  • tests/adapters/test_deepagents.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/utils.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/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/common/src/nemo_fabric_adapters/common/utils.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
🪛 ast-grep (0.45.1)
tests/adapters/test_deepagents.py

[warning] 1095-1095: Do not make http calls without encryption
Context: "http://x/mcp"
Note: [CWE-319] Cleartext Transmission of Sensitive Information.

(requests-http)

🪛 Ruff (0.16.1)
adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py

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

(TRY003)


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

(TRY003)


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

(TRY003)


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

(ANN401)


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

(ANN401)


[warning] 492-495: Abstract raise to an inner function

(TRY301)


[warning] 779-779: Boolean-typed positional argument in function definition

(FBT001)


[warning] 794-794: Boolean positional value in function call

(FBT003)

🔇 Additional comments (4)
adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py (2)

26-29: LGTM!

Also applies to: 93-107, 118-121, 139-139, 148-182, 214-242, 261-294, 309-319, 350-373, 582-599, 775-799


490-535: 📐 Maintainability & Code Quality

Run the required Python suite.

The PR objectives state that just test-python did not run. This change modifies a Python-facing adapter. Run just test-python in an environment with uv and the native extension before merge.

As per coding guidelines, “If Python code or a Python-facing adapter changes, run just test-python.”

Source: Coding guidelines

adapters/common/src/nemo_fabric_adapters/common/utils.py (1)

234-260: LGTM!

tests/adapters/test_deepagents.py (1)

26-35: LGTM!

Also applies to: 175-183, 353-388, 412-441, 493-507, 520-534, 631-639, 741-741, 849-859, 907-914, 951-958, 978-986, 1094-1110, 1182-1184

Comment thread adapters/common/src/nemo_fabric_adapters/common/utils.py
@zhongxuanwang-nv zhongxuanwang-nv self-assigned this Aug 11, 2026
@zhongxuanwang-nv zhongxuanwang-nv added this to the 0.2 milestone Aug 11, 2026
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>

@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 (1)
tests/adapters/test_deepagents.py (1)

235-240: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Use MagicMock for the Relay scope handle.

_Handle is a Relay test double. Replace the custom class with a MagicMock factory that assigns a unique uuid.

As per coding guidelines, “When mocking a class, use unittest.mock.MagicMock or AsyncMock ... rather than defining a new class.”

🤖 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 `@tests/adapters/test_deepagents.py` around lines 235 - 240, Replace the custom
_Handle test double with a MagicMock factory that assigns each mock a unique
uuid while preserving the existing name attribute and scope-handle behavior
expected by the adapter tests. Remove the _Handle class and update its call
sites to use the factory.

Source: Coding guidelines

🤖 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 `@tests/adapters/test_deepagents.py`:
- Around line 235-240: Replace the custom _Handle test double with a MagicMock
factory that assigns each mock a unique uuid while preserving the existing name
attribute and scope-handle behavior expected by the adapter tests. Remove the
_Handle class and update its call sites to use the factory.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: a907657f-8331-4462-8d8f-4bf99b032ede

📥 Commits

Reviewing files that changed from the base of the PR and between a62d427 and 80caac8.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
📜 Review details
⏰ Context from checks skipped due to timeout. (19)
  • GitHub Check: Preview docs
  • GitHub Check: Test (Python 3.14, windows-amd64)
  • GitHub Check: Test (Python 3.13, windows-amd64)
  • GitHub Check: Test (Python 3.13, macos-arm64)
  • GitHub Check: Test (Python 3.12, macos-arm64)
  • GitHub Check: Test (Python 3.14, linux-arm64)
  • GitHub Check: Test (Python 3.14, macos-arm64)
  • GitHub Check: Test (Python 3.11, linux-amd64)
  • GitHub Check: Test (Python 3.11, windows-amd64)
  • GitHub Check: Test (Python 3.14, linux-amd64)
  • GitHub Check: Test (Python 3.12, windows-amd64)
  • GitHub Check: Test (Python 3.12, linux-amd64)
  • GitHub Check: Test (Python 3.12, linux-arm64)
  • GitHub Check: Test (Python 3.13, linux-arm64)
  • GitHub Check: Test (Python 3.11, linux-arm64)
  • GitHub Check: Test (Python 3.11, macos-arm64)
  • GitHub Check: Test (Python 3.13, linux-amd64)
  • GitHub Check: Test (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/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
**/*.{rs,py}

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

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

Keep package names, import paths, and module names internally consistent, including the editable maturin build producing nemo_fabric._native and native artifacts being placed under python/src/nemo_fabric as expected by consumers.

Files:

  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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.

Use type annotations for public Python APIs and keep native binding declarations synchronized with their Rust implementations.

Files:

  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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.

**/*.{rs,py,pyi}: Use snake_case for Rust and Python functions and variables; use PascalCase for Rust types and Python classes.
Run tests for every affected language surface. Changes touching the Rust core or public schemas require both Rust and Python test suites.
Use the existing style in the Python SDK, adapters, examples, and tests, and maintain synchronization between native Python binding declarations and Rust implementations.
If a change touches the Rust core or public schemas, run both just test-rust and just test-python; otherwise run the test targets for every affected language surface.

Files:

  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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.

Files:

  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
**/*.{rs,py,pyi,json}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Public contract changes must keep checked-in JSON Schema snapshots and native Python binding declarations synchronized.

Files:

  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
**/*.{rs,py,html,md,mdx,toml,yaml,yml,sh,bash}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

All source files must include the appropriate SPDX copyright and Apache-2.0 license headers using the comment syntax for their file type; MDX files must use a JSX comment.

Files:

  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
adapters/*/

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

Place each first-party adapter under adapters/<name>/ with LICENSE -> ../../LICENSE, README.md, fabric-adapter.json, language-native package and lock files, a source entry point, and focused tests.

Files:

  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
{adapters/*/fabric-adapter.json,adapters/*/**,tests/adapters/**,docs/**,catalogs/**,share/nemo-fabric/adapters/**}

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

Keep descriptor claims, implementation, focused tests, public documentation, catalog entries, and packaged metadata synchronized, starting with the narrowest truthful capability set.

Files:

  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
adapters/*/**

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

adapters/*/**: Use the public nemo-fabric-build-adapter skill for adapter-contract semantics, descriptor design, configuration mapping, lifecycle behavior, and conformance evidence.
Use the closest shared first-party host pattern with the same target boundary, consulting adapters/common/ and the closest matching adapter.

Files:

  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
**/*.{md,mdx,rst,yml,yaml,py,sh}

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

**/*.{md,mdx,rst,yml,yaml,py,sh}: Keep package names, repository references, and build commands current.
Ensure example commands match current package names and paths.

Files:

  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
{docs,examples,adapters}/**/*

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

Update appropriate current-version installation, package, and configuration examples under docs, examples, and adapters from the old version to <next-version>, while preserving release notes, changelogs, generated output, and third-party attribution references.

Files:

  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/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/common/src/nemo_fabric_adapters/common/utils.py
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.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_deepagents.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_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
tests/**/*.{rs,py,pyi}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

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

Files:

  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_deepagents.py
tests/adapters/test_*.py

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

tests/adapters/test_*.py: Include a subprocess test of the packaged entry point, exact descriptor assertions for every claimed capability, and a credential-free fixture exercising plan, doctor, and run.
Keep credentialed live-target tests opt-in and provide deterministic CI coverage.

Files:

  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_deepagents.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_adapter_package_metadata.py
  • tests/adapters/test_deepagents.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/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
🪛 Ruff (0.16.1)
tests/adapters/test_deepagents.py

[warning] 468-468: Unused function argument: fake_sdks

(ARG001)


[warning] 468-468: Unused function argument: fake_relay

(ARG001)


[warning] 480-480: Missing return type annotation for private function exploding_scope

(ANN202)


[warning] 480-480: Unused function argument: name

(ARG001)


[warning] 480-480: Unused function argument: scope_type

(ARG001)


[warning] 480-480: Unused function argument: kwargs

(ARG001)


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

(TRY003)


[warning] 503-503: Unused function argument: fake_sdks

(ARG001)


[warning] 503-503: Unused function argument: fake_relay

(ARG001)


[warning] 514-514: Missing return type annotation for private function exploding_plugin

(ANN202)


[warning] 514-514: Unused function argument: config

(ARG001)


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

(TRY003)


[warning] 531-531: Unused function argument: fake_sdks

(ARG001)


[warning] 545-545: Missing return type annotation for private function leaking_scope

(ANN202)


[warning] 545-545: Unused function argument: scope_type

(ARG001)


[warning] 545-545: Unused function argument: kwargs

(ARG001)


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

(TRY003)


[warning] 585-585: Unused function argument: fake_sdks

(ARG001)


[warning] 592-592: Missing return type annotation for private function leaking_scope

(ANN202)


[warning] 592-592: Unused function argument: scope_type

(ARG001)


[warning] 592-592: Unused function argument: kwargs

(ARG001)


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

(TRY003)


[warning] 607-607: Missing return type annotation for private function boom

Add return type annotation: Never

(ANN202)


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

(TRY003)


[warning] 623-623: Unused function argument: fake_sdks

(ARG001)


[warning] 636-636: Missing return type annotation for private function leaks_once

(ANN202)


[warning] 636-636: Unused function argument: scope_type

(ARG001)


[warning] 636-636: Unused function argument: kwargs

(ARG001)


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

(TRY003)


[warning] 685-685: Lambda may be unnecessary; consider inlining inner function

Inline function call

(PLW0108)


[warning] 691-691: Unused function argument: fake_sdks

(ARG001)


[warning] 691-691: Unused function argument: fake_relay

(ARG001)


[warning] 704-704: Missing return type annotation for private function flaky_plugin

(ANN202)


[warning] 704-704: Unused function argument: config

(ARG001)


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

(TRY003)


[warning] 720-720: Unused function argument: fake_sdks

(ARG001)


[warning] 720-720: Unused function argument: fake_relay

(ARG001)


[warning] 730-730: Missing return type annotation for private function exploding_scope

(ANN202)


[warning] 730-730: Unused function argument: name

(ARG001)


[warning] 730-730: Unused function argument: scope_type

(ARG001)


[warning] 730-730: Unused function argument: kwargs

(ARG001)


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

(TRY003)


[warning] 735-735: Missing return type annotation for private function exploding_plugin

(ANN202)


[warning] 735-735: Unused function argument: config

(ARG001)


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

(TRY003)


[warning] 752-752: Unused function argument: fake_sdks

(ARG001)


[warning] 752-752: Unused function argument: fake_relay

(ARG001)


[warning] 760-760: Missing return type annotation for private function exploding_handler

Add return type annotation: Never

(ANN202)


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

(TRY003)


[warning] 786-786: Unused function argument: fake_sdks

(ARG001)


[warning] 786-786: Unused function argument: fake_relay

(ARG001)


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

(TRY003)


[warning] 809-809: Unused function argument: fake_sdks

(ARG001)


[warning] 809-809: Unused function argument: fake_relay

(ARG001)


[warning] 816-816: Missing return type annotation for private function exploding_scope

(ANN202)


[warning] 816-816: Unused function argument: name

(ARG001)


[warning] 816-816: Unused function argument: scope_type

(ARG001)


[warning] 816-816: Unused function argument: kwargs

(ARG001)


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

(TRY003)


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

(TRY003)


[warning] 835-835: Unused function argument: fake_sdks

(ARG001)


[warning] 835-835: Unused function argument: fake_relay

(ARG001)


[warning] 842-842: Missing return type annotation for private function failing_scope

(ANN202)


[warning] 842-842: Unused function argument: name

(ARG001)


[warning] 842-842: Unused function argument: scope_type

(ARG001)


[warning] 842-842: Unused function argument: kwargs

(ARG001)


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

(TRY003)


[warning] 863-863: Unused function argument: fake_sdks

(ARG001)


[warning] 863-863: Unused function argument: fake_relay

(ARG001)


[warning] 867-867: Missing return type annotation for private function boom

Add return type annotation: Never

(ANN202)


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

(TRY003)


[warning] 883-883: Unused function argument: fake_sdks

(ARG001)


[warning] 883-883: Unused function argument: fake_relay

(ARG001)


[warning] 889-889: Missing return type annotation for private function boom

Add return type annotation: Never

(ANN202)


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

(TRY003)


[warning] 893-893: Missing return type annotation for private function exploding_scope

(ANN202)


[warning] 893-893: Unused function argument: name

(ARG001)


[warning] 893-893: Unused function argument: scope_type

(ARG001)


[warning] 893-893: Unused function argument: kwargs

(ARG001)


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

(TRY003)

adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py

[warning] 682-682: Do not catch blind exception: Exception

(BLE001)


[warning] 684-684: Do not catch blind exception: Exception

(BLE001)


[warning] 713-713: Do not catch blind exception: Exception

(BLE001)


[warning] 745-745: Do not catch blind exception: Exception

(BLE001)


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

(ANN401)


[warning] 870-870: Do not catch blind exception: Exception

(BLE001)


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

(ANN401)

🔇 Additional comments (7)
adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py (3)

57-69: LGTM!

Also applies to: 494-495, 505-566


597-747: LGTM!


847-904: LGTM!

Also applies to: 962-999

adapters/common/src/nemo_fabric_adapters/common/utils.py (1)

223-224: LGTM!

Also applies to: 416-416

tests/adapters/test_adapter_package_metadata.py (1)

53-54: LGTM!

tests/adapters/test_deepagents.py (2)

46-50: 📐 Maintainability & Code Quality

Run the required Python test suite before merge.

The stated validation did not run just test-python because uv and the native extension were unavailable. Run just test-python after those prerequisites are available.

As per coding guidelines, “If Python code or a Python-facing adapter changes, run just test-python.”

Source: Coding guidelines


18-18: LGTM!

Also applies to: 55-69, 242-266, 446-908

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