Skip to content

feat: add external LangGraph reference adapter - #185

Open
zhongxuanwang-nv wants to merge 15 commits into
NVIDIA:mainfrom
zhongxuanwang-nv:feat/langgraph-workflow-planning
Open

feat: add external LangGraph reference adapter#185
zhongxuanwang-nv wants to merge 15 commits into
NVIDIA:mainfrom
zhongxuanwang-nv:feat/langgraph-workflow-planning

Conversation

@zhongxuanwang-nv

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

Copy link
Copy Markdown
Member

Overview

Adds a source-only LangGraph reference under external/ that demonstrates the public NVIDIA NeMo Fabric third-party adapter contract. It is not a bundled adapter, a published package, a catalog entry, or installed-adapter discovery wiring.

The descriptor owns the workflow contract: it validates kind: langgraph_factory, a module:factory reference, and workflow settings during planning. Runtime startup imports the selected factory, calls build_graph(context), and compiles the returned graph once. The factory context preserves application-owned workflow.settings and exposes normalized resources separately.

This change has no breaking changes.

Details

  • Adds the source-only descriptor and Python lifecycle host under external/langgraph/.
  • Defines a single LangGraphFactoryContext input with workflow_settings, models, instructions, policy-filtered tools and MCP servers, and resolved skill paths.
  • Removes reserved injected factory arguments. Graphs can use any setting names—including model_config, system_instruction, mcp_servers, and skill_paths—as application configuration.
  • Keeps graph topology, model-client construction, application tools, checkpointers, and user state in application-owned factory code.
  • Applies root tool policy to the graph-declared workflow.settings.tool_names inventory and exposes only selected MCP servers.
  • Translates the selected Fabric Streamable HTTP MCP server into the native LangChain client configuration, without forwarding Fabric-only metadata.
  • Keeps each application self-contained: its factory and graph definition are inlined in calculator.py or email_phishing.py; there are no separate _graph modules.
  • Adds a per-user calculator example using a Streamable HTTP MCP server and an email-phishing analyzer example using a configured NIM model role and a skill file.
  • Isolates imports by base_dir, supports synchronous and asynchronous factories, and normalizes graph invoke/output-projection failures into RunResult.error instead of raising a lifecycle exception.

Validation

  • pytest -q tests/adapters/test_external_langgraph_adapter.py — 14 passed.
  • git diff --check passed.
  • End to end, current head: started the included Streamable HTTP MCP server and invoked the calculator graph through the persistent adapter host; multiply(21, 2) returned 42.0.
  • End to end, current head: invoked the email-phishing graph through the persistent adapter host against the configured NVIDIA endpoint; the sample credential-request email was classified as phishing.

Where should the reviewer start?

Start with external/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py for the context contract, policy mapping, import isolation, compilation, and result normalization. Then review external/langgraph/examples/calculator.py for the Fabric-to-native MCP mapping, external/langgraph/fabric-adapter.json, and tests/adapters/test_external_langgraph_adapter.py, which prove that application settings remain unchanged while the factory receives normalized resources through its context.

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

  • Relates to FABRIC-179

  • Relates to FABRIC-166

  • I confirm this contribution is my own work, or I have the right to submit it under this project license.

  • I searched existing issues and open pull requests, and this does not duplicate existing work.

Summary by CodeRabbit

  • New Features

    • Added a LangGraph reference adapter for configuring, compiling, and invoking synchronous or asynchronous workflows.
    • Added calculator and email-phishing workflow examples.
    • Added a Streamable HTTP calculator service with arithmetic operations and division-by-zero handling.
    • Added adapter configuration and workflow schema support.
  • Documentation

    • Added setup, usage, configuration, and example guidance for the LangGraph adapter.
  • Tests

    • Added coverage for configuration validation, workflow compilation, invocation, and example workflows.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

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

Use the following commands to manage reviews:

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

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

This change adds a source-only LangGraph adapter for NeMo Fabric. It defines factory-based runtime execution, calculator MCP and email-phishing examples, adapter metadata, usage documentation, and focused integration tests.

Changes

LangGraph adapter

Layer / File(s) Summary
Adapter contract and manifest
external/README.md, external/langgraph/fabric-adapter.json, external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py, external/langgraph/README.md
Defines the langgraph_factory contract, workflow schemas, adapter metadata, package metadata, setup instructions, and example usage.
Factory runtime and graph execution
external/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py
Validates configuration, loads application factories, compiles graphs, invokes asynchronous or synchronous methods, serializes results, translates failures, and clears state on shutdown.
Calculator and email-phishing examples
external/langgraph/examples/*
Adds calculator MCP tools and LangGraph workflows, plus an email-phishing workflow using an OpenAI-compatible NVIDIA model and Fabric CLI configuration.
Adapter validation
tests/adapters/test_external_langgraph_adapter.py
Tests descriptor metadata, plan validation, example configurations, state adaptation, graph reuse, and synchronous invocation fallback.

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

Sequence Diagram(s)

sequenceDiagram
  participant FabricRuntime
  participant LangGraphRuntime
  participant WorkflowFactory
  participant CompiledGraph
  FabricRuntime->>LangGraphRuntime: provide workflow configuration
  LangGraphRuntime->>WorkflowFactory: load and call factory
  WorkflowFactory->>LangGraphRuntime: return graph
  LangGraphRuntime->>CompiledGraph: compile graph
  LangGraphRuntime->>CompiledGraph: invoke or ainvoke request
  CompiledGraph->>LangGraphRuntime: return JSON result
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.22% 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.
Description check ✅ Passed The description covers the change, review entry points, validation results, related issues, and required contribution confirmations.
Title check ✅ Passed The title follows Conventional Commits format with a valid type, concise imperative summary, no period, and fewer than 72 characters.
✨ 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: 8

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

Inline comments:
In `@Cargo.toml`:
- Line 36: Update the dependency documentation around the sha2 entry in
Cargo.toml to explain its SHA-256 contract-digest purpose, the alternatives
considered, and why sha2 is the narrowest fit. Afterward, run cargo metadata
--locked, git diff --check, and the repository’s license-diff and attribution
hooks when the required tooling is available.

In `@docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx`:
- Line 58: Update the Rust documentation comments that generate
WorkflowInjectionPoint, WorkflowContract, and WorkflowContractPlan pages, then
run just docs. In
docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx:58,
use “NeMo Fabric field”; in struct-workflowcontract.mdx:28 and
struct-workflowcontractplan.mdx:24, use “NVIDIA NeMo Fabric fields” on first
use; and in struct-workflowinjectionpoint.mdx:4-14, use “NVIDIA NeMo Fabric
field” first, then “NeMo Fabric field.” Avoid standalone capitalized “Fabric” as
the product name.

In
`@docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterdescriptor.mdx`:
- Around line 46-48: Update the Rust documentation comment for the adapter
descriptor’s workflow fields to document the legacy workflow_schema alternative
and explicitly state that workflow_schema and workflow_contracts are mutually
exclusive. Then run just docs to regenerate the API reference; do not edit the
generated MDX directly.

In
`@docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-runplan.mdx`:
- Around line 34-36: Update the source Rust documentation comments for RunPlan
and WorkflowContractPlan, then regenerate documentation with just docs. In
docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-runplan.mdx:34-36,
state that runtime verifies the effective workflow contract before startup; in
docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-workflowcontractplan.mdx:34-36,
state that digest is checked against the re-resolved contract before startup.

In
`@docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-workflowentrypointref.mdx`:
- Around line 18-24: Update the source Rust documentation comments for
WorkflowEntryPointRef so its kind and ref fields explicitly require nonblank
values, and update WorkflowInjectionPoint so name requires a nonblank value;
regenerate the committed API documentation with just docs. Apply the changes at
docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-workflowentrypointref.mdx:18-24
and
docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-workflowinjectionpoint.mdx:18-24,
ensuring both generated descriptions reflect the validation requirements.

In `@python/src/nemo_fabric/types.py`:
- Around line 1265-1276: Update FabricMapping’s to_mapping serialization to
explicitly omit workflow_contract when its value is None, rather than relying on
_omit_if_empty, so Python output matches Rust by excluding the field entirely.
Add a regression assertion covering a None workflow_contract and retain the
existing behavior for populated contracts.

In `@tests/python/test_sdk_contract.py`:
- Around line 717-729: Expand the workflow-contract assertions in the relevant
test to validate every exposed fixture field: entrypoint.ref,
injection_points.models.name, injection_points.instructions.system.name, and
execution_constraints.state_owner. Keep the existing assertions for
entrypoint.kind, accepted_fields, and digest so the test detects any Python SDK
omission across the full contract.

In `@tests/python/test_workflow_validation.py`:
- Around line 187-243: Add a Python test alongside the existing static workflow
contract tests that uses the descriptor from _write_static_contract_descriptor,
configures an unknown workflow entrypoint ref, and asserts Fabric().plan raises
FabricConfigError matching workflow.entrypoint. Keep the test focused on the
no-matching-contract validation path.
🪄 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: d19e7566-39ce-4de4-ad0d-f95bbacfcc13

📥 Commits

Reviewing files that changed from the base of the PR and between 7a3272d and 6f7314e.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (50)
  • ATTRIBUTIONS-Rust.md
  • Cargo.toml
  • README.md
  • adapters/README.md
  • crates/fabric-core/Cargo.toml
  • crates/fabric-core/src/config.rs
  • crates/fabric-core/src/doctor.rs
  • crates/fabric-core/src/lib.rs
  • crates/fabric-core/src/runtime.rs
  • docs/reference/api/python-library-reference/index.md
  • docs/reference/api/python-library-reference/nemo_fabric.types.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-capabilitykind.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-capabilitytarget.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatifstorageconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatofmode.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatofsinkconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatofstreamfieldnamepolicy.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatofstreamtransport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayotlptransport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayunsupportedbehavior.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/fn-load-adapter-descriptor.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/fn-resolve-run-plan-from-config.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterdescriptor.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-runplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-workflowcontract.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-workflowcontractplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-workflowentrypointconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-workflowentrypointref.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-workflowinjectionpoint.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/enum-doctorstatus.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/fn-doctor-plan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/struct-doctorcheck.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/struct-doctorreport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/error/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/error/type-result.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/fn-version.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/runtime/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/schema/index.mdx
  • docs/sdk/python.mdx
  • python/src/nemo_fabric/__init__.py
  • python/src/nemo_fabric/types.py
  • schemas/SCHEMA.md
  • schemas/adapter-descriptor.schema.json
  • schemas/run-plan.schema.json
  • tests/python/test_sdk_contract.py
  • tests/python/test_workflow_validation.py

Comment thread Cargo.toml Outdated
Comment thread docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx Outdated
Comment thread python/src/nemo_fabric/types.py Outdated
Comment thread tests/python/test_sdk_contract.py Outdated
Comment thread tests/python/test_workflow_validation.py Outdated
@zhongxuanwang-nv zhongxuanwang-nv changed the title feat: plan static workflow contracts feat: add LangGraph factory adapter Aug 6, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

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

⚠️ Outside diff range comments (1)
README.md (1)

127-132: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Must fix: Document both workflow descriptor forms.

These passages state or imply that workflow_schema is the only workflow mechanism. The PR adds workflow_contracts as an alternative public descriptor surface, selected by entrypoint kind and reference.

  • README.md#L127-L132: Describe adapter-owned workflows instead of only selectable executables. Document legacy workflow_schema and workflow_contracts.
  • adapters/README.md#L30-L35: Include workflow_contracts in the discovered descriptor metadata and planning behavior.
  • docs/sdk/python.mdx#L684-L691: Document contract selection and validation for both legacy schemas and keyed workflow contracts.

Based on PR objectives, descriptors support legacy workflow_schema and workflow_contracts keyed by entrypoint kind and reference.

🤖 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 `@README.md` around lines 127 - 132, Document both workflow descriptor forms
across README.md (127-132), adapters/README.md (30-35), and docs/sdk/python.mdx
(684-691): describe adapter-owned workflows using legacy workflow_schema and
keyed workflow_contracts selected by entrypoint kind and reference. Include
workflow_contracts in discovered descriptor metadata and planning behavior, and
explain contract selection and validation for both forms.
🤖 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/langgraph/fabric-adapter.json`:
- Line 42: Add a LangGraph version preflight in LangGraphRuntime.start() before
loading the factory: detect missing, supported (>=1.2,<2.0), and unsupported
installations, and cover each case with tests. Keep Python package version
constraints in pyproject.toml and leave the descriptor requirements object empty
because it does not support version declarations.

In `@tests/adapters/test_langgraph_adapter.py`:
- Around line 67-117: Add a separate test fixture alongside
test_runtime_compiles_factory_graph_once_and_invokes_it that builds a graph
object exposing only synchronous invoke, without ainvoke. Start the runtime with
this factory, call LangGraphRuntime.invoke, and assert the returned result
matches the fixture’s JSON output, covering the synchronous fallback path.

---

Outside diff comments:
In `@README.md`:
- Around line 127-132: Document both workflow descriptor forms across README.md
(127-132), adapters/README.md (30-35), and docs/sdk/python.mdx (684-691):
describe adapter-owned workflows using legacy workflow_schema and keyed
workflow_contracts selected by entrypoint kind and reference. Include
workflow_contracts in discovered descriptor metadata and planning behavior, and
explain contract selection and validation for both forms.
🪄 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: 09e34631-47c7-4917-8333-112132933387

📥 Commits

Reviewing files that changed from the base of the PR and between 6f7314e and b6b60ce.

⛔ Files ignored due to path filters (2)
  • adapters/langgraph/uv.lock is excluded by !**/*.lock
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (18)
  • README.md
  • adapters/README.md
  • adapters/langgraph/LICENSE
  • adapters/langgraph/README.md
  • adapters/langgraph/fabric-adapter.json
  • adapters/langgraph/pypi.md
  • adapters/langgraph/pyproject.toml
  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py
  • docs/getting-started/install.mdx
  • docs/index.yml
  • docs/integrations/harness/langgraph.mdx
  • docs/integrations/harness/overview.mdx
  • docs/sdk/python.mdx
  • justfile
  • pyproject.toml
  • tests/adapters/test_adapter_package_metadata.py
  • tests/adapters/test_langgraph_adapter.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (48)
**/*.{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:

  • docs/index.yml
  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • adapters/langgraph/fabric-adapter.json
  • tests/adapters/test_langgraph_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py
{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/index.yml
  • docs/integrations/harness/langgraph.mdx
  • docs/integrations/harness/overview.mdx
  • README.md
  • docs/getting-started/install.mdx
  • docs/sdk/python.mdx
{README.md,docs/index.yml}

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

Update README.md or docs/index.yml when documentation entry points or example reading paths change.

Files:

  • docs/index.yml
  • README.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/index.yml
  • docs/integrations/harness/langgraph.mdx
  • docs/integrations/harness/overview.mdx
  • docs/getting-started/install.mdx
  • docs/sdk/python.mdx
docs/**/*.{md,mdx,yml}

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

Run just docs when the documentation site changes.

Update user-facing Fern documentation, including docs/index.yml, when public behavior, the package, examples, or supported bindings change.

Files:

  • docs/index.yml
  • docs/integrations/harness/langgraph.mdx
  • docs/integrations/harness/overview.mdx
  • docs/getting-started/install.mdx
  • docs/sdk/python.mdx
**/*

📄 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:

  • docs/index.yml
  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • adapters/langgraph/README.md
  • docs/integrations/harness/langgraph.mdx
  • docs/integrations/harness/overview.mdx
  • adapters/langgraph/pypi.md
  • adapters/langgraph/pyproject.toml
  • adapters/langgraph/LICENSE
  • adapters/langgraph/fabric-adapter.json
  • pyproject.toml
  • README.md
  • docs/getting-started/install.mdx
  • docs/sdk/python.mdx
  • adapters/README.md
  • tests/adapters/test_langgraph_adapter.py
  • justfile
  • tests/adapters/test_adapter_package_metadata.py
  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py
**/*.{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:

  • docs/index.yml
  • adapters/langgraph/pyproject.toml
  • pyproject.toml
**/*.{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:

  • docs/index.yml
  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • adapters/langgraph/README.md
  • docs/integrations/harness/langgraph.mdx
  • docs/integrations/harness/overview.mdx
  • adapters/langgraph/pypi.md
  • README.md
  • docs/getting-started/install.mdx
  • docs/sdk/python.mdx
  • adapters/README.md
  • tests/adapters/test_langgraph_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/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:

  • docs/index.yml
  • adapters/langgraph/pyproject.toml
  • pyproject.toml
{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/index.yml
  • docs/integrations/harness/langgraph.mdx
  • docs/integrations/harness/overview.mdx
  • README.md
  • docs/getting-started/install.mdx
  • docs/sdk/python.mdx
**/*.{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/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • tests/adapters/test_langgraph_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/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:

  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • tests/adapters/test_langgraph_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/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:

  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • tests/adapters/test_langgraph_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/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.

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

Files:

  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • tests/adapters/test_langgraph_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/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/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • adapters/langgraph/pyproject.toml
  • pyproject.toml
  • tests/adapters/test_langgraph_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/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/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • adapters/langgraph/pyproject.toml
  • pyproject.toml
  • tests/adapters/test_langgraph_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py
adapters/**/*

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

Place repository adapters under adapters/<name>, define their install extra and packaged descriptor, select the matching harness.resolution strategy, and document repository or base_dir descriptor discovery.

Files:

  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • adapters/langgraph/README.md
  • adapters/langgraph/pypi.md
  • adapters/langgraph/pyproject.toml
  • adapters/langgraph/LICENSE
  • adapters/langgraph/fabric-adapter.json
  • adapters/README.md
  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py
adapters/**/*.{py,js,ts,java,go,rs}

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

adapters/**/*.{py,js,ts,java,go,rs}: Use the existing Fabric python or process runner and normalized request/result contracts. Reuse adapters/common/ only when its contract fits; do not add a runner or abstraction for one adapter.
For adapters consuming normalized configuration or runtime context, use the complete Fabric invocation and treat config, capability_plan, telemetry_plan, and runtime_context as authoritative. Reserve harness.settings for harness-specific behavior.
Apply configuration precedence in this order: normalized config; Fabric-resolved plans and runtime context; harness-specific settings; descriptor and adapter defaults. Reject conflicting duplicate declarations or unsupported behavior with actionable field-specific errors; never silently drop configuration.
Run dependency and authentication preflight before invoking the harness. Declare fixed dependencies in descriptor requirements, validate versions, hooks, and credentials, and never expose credential values in output, errors, events, logs, or fixtures.
Forward only required system variables, selected credential variables, telemetry variables, and documented harness-specific environment; never forward or log unrelated environment values.
Run one local adapter host per Fabric runtime for ordered startinvoke*stop. Emit one JSON lifecycle response per request on stdout and diagnostics on stderr; treat early exit as a host crash.
Return harness-level invoke failures in a successful lifecycle response with response: null, failed: true, and structured error containing code, message, retryable, and optional metadata.
Do not emit NeMo Relay stream records on adapter stdout. Relay records are sent out of band through the SDK-owned NDJSON ATOF endpoint; the adapter must return exactly one terminal lifecycle response.
Scope workspace, generated configuration, state, sessions, and artifacts to the resolved runtime context. Write artifacts only within the resolved r...

Files:

  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/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/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • adapters/langgraph/README.md
  • adapters/langgraph/pypi.md
  • adapters/langgraph/pyproject.toml
  • adapters/langgraph/LICENSE
  • adapters/langgraph/fabric-adapter.json
  • adapters/README.md
  • adapters/langgraph/src/nemo_fabric_adapters/langgraph/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:

  • adapters/langgraph/README.md
  • adapters/langgraph/pypi.md
  • README.md
  • adapters/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:

  • adapters/langgraph/README.md
  • docs/integrations/harness/langgraph.mdx
  • docs/integrations/harness/overview.mdx
  • adapters/langgraph/pypi.md
  • README.md
  • docs/getting-started/install.mdx
  • docs/sdk/python.mdx
  • adapters/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:

  • adapters/langgraph/README.md
  • adapters/langgraph/pypi.md
  • README.md
  • adapters/README.md
adapters/*/README.md

📄 CodeRabbit inference engine (AGENTS.md)

Update adapter integration READMEs when public behavior, examples, or supported bindings change.

Document adapter installation, supported configuration, harness-only settings, credentials, lifecycle, telemetry, artifacts, limitations, and focused test commands. Include a canonical typed SDK example and, when required, a canonical harness-native YAML fixture.

Files:

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

  • adapters/langgraph/README.md
  • docs/integrations/harness/langgraph.mdx
  • docs/integrations/harness/overview.mdx
  • adapters/langgraph/pypi.md
  • README.md
  • docs/getting-started/install.mdx
  • docs/sdk/python.mdx
  • adapters/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:

  • adapters/langgraph/README.md
  • adapters/langgraph/pypi.md
  • README.md
  • adapters/README.md
**/*.{html,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

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

Files:

  • adapters/langgraph/README.md
  • adapters/langgraph/pypi.md
  • README.md
  • adapters/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:

  • adapters/langgraph/README.md
  • docs/integrations/harness/langgraph.mdx
  • docs/integrations/harness/overview.mdx
  • adapters/langgraph/pypi.md
  • README.md
  • docs/getting-started/install.mdx
  • docs/sdk/python.mdx
  • adapters/README.md
**/*.mdx

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

In MDX files, use JSX comment delimiters ({/* and */}) for top-of-file comments, including SPDX headers; do not use HTML comments.

**/*.mdx: For documentation site changes, run just docs to regenerate Python and Rust API references and validate Fern configuration.
MDX files must use the specified JSX-comment SPDX header.

Files:

  • docs/integrations/harness/langgraph.mdx
  • docs/integrations/harness/overview.mdx
  • docs/getting-started/install.mdx
  • docs/sdk/python.mdx
docs/**/*.mdx

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

docs/**/*.mdx: Use source-relative links with the target .mdx extension for links between files under docs/; do not use Fern site-root paths.
Use {/* ... */} delimiters for top-of-file MDX SPDX comments, not HTML comment delimiters.

Files:

  • docs/integrations/harness/langgraph.mdx
  • docs/integrations/harness/overview.mdx
  • docs/getting-started/install.mdx
  • docs/sdk/python.mdx
**/*.{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/langgraph/pyproject.toml
  • 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:

  • adapters/langgraph/pyproject.toml
  • 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/langgraph/pyproject.toml
  • 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/langgraph/pyproject.toml
  • 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/langgraph/pyproject.toml
  • 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/langgraph/pyproject.toml
  • pyproject.toml
adapters/*/{pyproject.toml,package.json,*.lock}

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

Keep each published leaf adapter's runtime dependencies razor-thin and adapter-owned. Do not directly declare the wrapped harness/SDK or dependencies already declared by its supported package; provide and test a dependency-free fallback for optional libraries.

Files:

  • adapters/langgraph/pyproject.toml
adapters/*/pyproject.toml

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

Limit a leaf adapter's base installation to adapter-owned dependencies; provide a harness extra, a full extra for package-installable optional integrations, and a relay extra when it imports NeMo Relay Python APIs. If Relay is external, omit relay and make full equivalent to harness.

Files:

  • adapters/langgraph/pyproject.toml
**/*.{json,jsonschema}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

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

Files:

  • adapters/langgraph/fabric-adapter.json
adapters/*/fabric-adapter.json

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

Start with the narrowest truthful descriptor. Keep config.accepts, config.generates, requirements, telemetry declarations, and lifecycle capabilities synchronized with implementation and tests; omit unsupported claims.

Files:

  • adapters/langgraph/fabric-adapter.json
pyproject.toml

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

Keep nemo-fabric as a metapackage that unconditionally installs the exact-version nemo-fabric-runtime distribution; root harness extras must delegate to version-matched leaf adapter harness extras, without root adapter-only aliases.

pyproject.toml: Keep nemo-fabric-runtime as an exact-version unconditional dependency of the root nemo-fabric metapackage, and give every installable Python adapter one canonical root extra depending on the matching nemo-fabric-adapters-<adapter>[harness].
Install leaf adapters through their harness extras in the root adapter-tests dependency group, and keep other test-only packages in an appropriate non-published group.

Files:

  • pyproject.toml
README.md

📄 CodeRabbit inference engine (AGENTS.md)

Update the root README.md when public behavior, the nemo-fabric package (imported as nemo_fabric), examples, or supported bindings change.

Keep README.md current with the workspace, supported adapters, and top-level documentation.

Files:

  • README.md
docs/sdk/python.mdx

📄 CodeRabbit inference engine (AGENTS.md)

Keep the Python/Rust binding contract current when the public API changes.

Files:

  • docs/sdk/python.mdx
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_langgraph_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_langgraph_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_langgraph_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
tests/adapters/test_*.py

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

tests/adapters/test_*.py: Add focused tests for descriptor shape and exact capabilities, positive normalized-surface mappings, rejection of unsupported values and unenforceable policies, result normalization without secret leakage, one-shot execution, continuation, runtime isolation, and the packaged subprocess entry point.
Provide a credential-free fixture covering plan, doctor, and run; keep credential-dependent live-harness tests opt-in while retaining a deterministic CI end-to-end path.

Files:

  • tests/adapters/test_langgraph_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_langgraph_adapter.py
  • tests/adapters/test_adapter_package_metadata.py
justfile

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

justfile: The set-version recipe must run just lock-python after source metadata is updated.
set_project_version must invoke both Cargo and Python project version helpers.

Keep build, test, clean, and documentation recipes consistent with the current package names, install commands, and generated artifacts.

Files:

  • justfile
🧠 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:

  • adapters/langgraph/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/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py
🪛 ast-grep (0.45.0)
adapters/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py

[info] 112-112: use jsonify instead of json.dumps for JSON output
Context: json.dumps(value, allow_nan=False)
Note: [CWE-116] Improper Encoding or Escaping of Output.

(use-jsonify)

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

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

(TRY003)


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

(TRY003)


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

(TRY003)


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

(TRY003)


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

(TRY003)


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

(ANN401)


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

(TRY003)


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

(ANN401)


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

(ANN401)


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

(ANN401)


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

(ANN401)


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

(ANN401)


[warning] 190-190: Do not call getattr with a constant attribute value. It is not any safer than normal property access.

Replace getattr with attribute access

(B009)

🔇 Additional comments (18)
README.md (1)

47-47: LGTM!

Also applies to: 214-214

adapters/README.md (1)

49-49: LGTM!

Also applies to: 59-59, 86-115, 136-136

adapters/langgraph/README.md (1)

1-96: LGTM!

adapters/langgraph/pypi.md (1)

1-20: LGTM!

docs/getting-started/install.mdx (1)

36-45: LGTM!

Also applies to: 70-70, 95-95, 115-115

docs/integrations/harness/langgraph.mdx (1)

1-103: LGTM!

docs/integrations/harness/overview.mdx (1)

22-22: LGTM!

docs/sdk/python.mdx (1)

171-201: LGTM!

docs/index.yml (1)

41-42: 📐 Maintainability & Code Quality

Run just docs in an environment with just installed. This recipe validates Fern configuration and regenerates documentation references.

adapters/langgraph/fabric-adapter.json (1)

1-41: LGTM!

Also applies to: 43-45

adapters/langgraph/pyproject.toml (1)

1-54: LGTM!

adapters/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py (1)

1-4: LGTM!

adapters/langgraph/LICENSE (1)

1-1: LGTM!

pyproject.toml (1)

54-56: LGTM!

Also applies to: 79-87, 135-135

justfile (1)

15-15: LGTM!

tests/adapters/test_adapter_package_metadata.py (1)

47-51: LGTM!

Also applies to: 97-100, 115-115

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

1-206: LGTM!

tests/adapters/test_langgraph_adapter.py (1)

1-64: LGTM!

Comment thread external/langgraph/fabric-adapter.json
Comment thread tests/adapters/test_langgraph_adapter.py Outdated
@zhongxuanwang-nv zhongxuanwang-nv changed the title feat: add LangGraph factory adapter feat: add external LangGraph reference adapter Aug 6, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

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

⚠️ Outside diff range comments (1)
external/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py (1)

71-82: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Isolate factory imports by base_dir.

importlib.import_module(module_name) returns an existing sys.modules entry before it searches the newly inserted path. invalidate_caches() does not clear that entry.

If two runtimes use different base_dir values with the same module:factory reference, the second runtime can execute the first runtime’s factory. The global sys.path entry also remains after stop().

Load application modules in an import context isolated by resolved base_dir. Add a regression test that starts two runtimes from separate directories with the same module name and verifies that each uses its own factory.

🤖 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/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py` around
lines 71 - 82, Update _factory_from_ref to load the referenced module in an
import context isolated to the resolved base_dir, avoiding reuse of conflicting
sys.modules entries from other runtimes and ensuring temporary sys.path changes
are cleaned up when the runtime stops. Add a regression test that starts two
runtimes with separate base directories containing the same module name and
verifies each runtime invokes its own factory.
🤖 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 `@external/langgraph/examples/email_phishing.py`:
- Line 45: Align the email example’s invocation contract with EmailState: at
external/langgraph/examples/email_phishing.py:45 and lines 52-64, pass the input
as a state mapping containing input and use the matching RuntimeConfig schemas,
or otherwise adapt the graph consistently to accept text. Update
external/langgraph/README.md:104-112 to reflect the chosen input contract, and
extend tests/adapters/test_external_langgraph_adapter.py:100-118 to invoke the
email example itself rather than testing only its plan.

In `@tests/adapters/test_external_langgraph_adapter.py`:
- Around line 121-195: The existing test only covers the asynchronous ainvoke
path; add a separate factory graph test using the runtime setup that compiles to
an object exposing only invoke(input). Assert the adapter completes successfully
and returns the graph’s JSON-safe result, covering the documented synchronous
fallback without changing the existing async assertions.

---

Outside diff comments:
In `@external/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py`:
- Around line 71-82: Update _factory_from_ref to load the referenced module in
an import context isolated to the resolved base_dir, avoiding reuse of
conflicting sys.modules entries from other runtimes and ensuring temporary
sys.path changes are cleaned up when the runtime stops. Add a regression test
that starts two runtimes with separate base directories containing the same
module name and verifies each runtime invokes its own factory.
🪄 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: ad9bf735-af02-4dca-a3c0-3462b780f552

📥 Commits

Reviewing files that changed from the base of the PR and between b6b60ce and 432ecad.

📒 Files selected for processing (11)
  • external/README.md
  • external/langgraph/README.md
  • external/langgraph/examples/calculator.py
  • external/langgraph/examples/calculator_graph.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/examples/email_phishing_graph.py
  • external/langgraph/fabric-adapter.json
  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py
  • tests/adapters/test_external_langgraph_adapter.py
📜 Review details
🧰 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:

  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/langgraph/examples/calculator_graph.py
  • external/langgraph/examples/email_phishing_graph.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/examples/calculator.py
  • tests/adapters/test_external_langgraph_adapter.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py
  • external/langgraph/fabric-adapter.json
**/*

📄 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:

  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/README.md
  • external/langgraph/README.md
  • external/langgraph/examples/calculator_graph.py
  • external/langgraph/examples/email_phishing_graph.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/examples/calculator.py
  • tests/adapters/test_external_langgraph_adapter.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py
  • external/langgraph/fabric-adapter.json
**/*.{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/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/langgraph/examples/calculator_graph.py
  • external/langgraph/examples/email_phishing_graph.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/examples/calculator.py
  • tests/adapters/test_external_langgraph_adapter.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/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:

  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/langgraph/examples/calculator_graph.py
  • external/langgraph/examples/email_phishing_graph.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/examples/calculator.py
  • tests/adapters/test_external_langgraph_adapter.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/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:

  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/langgraph/examples/calculator_graph.py
  • external/langgraph/examples/email_phishing_graph.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/examples/calculator.py
  • tests/adapters/test_external_langgraph_adapter.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/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.

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

Files:

  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/langgraph/examples/calculator_graph.py
  • external/langgraph/examples/email_phishing_graph.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/examples/calculator.py
  • tests/adapters/test_external_langgraph_adapter.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/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:

  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/langgraph/examples/calculator_graph.py
  • external/langgraph/examples/email_phishing_graph.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/examples/calculator.py
  • tests/adapters/test_external_langgraph_adapter.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/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:

  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/langgraph/examples/calculator_graph.py
  • external/langgraph/examples/email_phishing_graph.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/examples/calculator.py
  • tests/adapters/test_external_langgraph_adapter.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/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:

  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/README.md
  • external/langgraph/README.md
  • external/langgraph/examples/calculator_graph.py
  • external/langgraph/examples/email_phishing_graph.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/examples/calculator.py
  • tests/adapters/test_external_langgraph_adapter.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/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/README.md
  • external/langgraph/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/README.md
  • external/langgraph/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/README.md
  • external/langgraph/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/README.md
  • external/langgraph/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/README.md
  • external/langgraph/README.md
**/*.{html,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

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

Files:

  • external/README.md
  • external/langgraph/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/README.md
  • external/langgraph/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_langgraph_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_external_langgraph_adapter.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_langgraph_adapter.py
tests/adapters/test_*.py

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

tests/adapters/test_*.py: Add focused tests for descriptor shape and exact capabilities, positive normalized-surface mappings, rejection of unsupported values and unenforceable policies, result normalization without secret leakage, one-shot execution, continuation, runtime isolation, and the packaged subprocess entry point.
Provide a credential-free fixture covering plan, doctor, and run; keep credential-dependent live-harness tests opt-in while retaining a deterministic CI end-to-end path.

Files:

  • tests/adapters/test_external_langgraph_adapter.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_langgraph_adapter.py
**/*.{json,jsonschema}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

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

Files:

  • external/langgraph/fabric-adapter.json
🧠 Learnings (1)
📚 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:

  • external/langgraph/fabric-adapter.json
🪛 ast-grep (0.45.0)
external/langgraph/examples/calculator.py

[info] 66-66: use jsonify instead of json.dumps for JSON output
Context: json.dumps(output.to_mapping(), indent=2)
Note: [CWE-116] Improper Encoding or Escaping of Output.

(use-jsonify)

external/langgraph/examples/email_phishing.py

[info] 65-65: use jsonify instead of json.dumps for JSON output
Context: json.dumps(output.to_mapping(), indent=2)
Note: [CWE-116] Improper Encoding or Escaping of Output.

(use-jsonify)

🪛 Ruff (0.16.1)
external/langgraph/examples/calculator_graph.py

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

(TRY003)

external/langgraph/examples/email_phishing_graph.py

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

(TRY003)

external/langgraph/examples/calculator_mcp.py

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

(TRY003)

external/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py

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

(ANN401)


[warning] 188-188: Do not call getattr with a constant attribute value. It is not any safer than normal property access.

Replace getattr with attribute access

(B009)

🔇 Additional comments (9)
external/README.md (1)

17-22: LGTM!

external/langgraph/fabric-adapter.json (1)

3-3: LGTM!

Also applies to: 23-23, 36-36, 43-50

external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py (1)

1-4: LGTM!

external/langgraph/README.md (1)

1-97: LGTM!

external/langgraph/examples/calculator.py (1)

1-71: LGTM!

external/langgraph/examples/calculator_graph.py (1)

1-52: LGTM!

external/langgraph/examples/calculator_mcp.py (1)

1-45: LGTM!

external/langgraph/examples/email_phishing_graph.py (1)

1-52: LGTM!

tests/adapters/test_external_langgraph_adapter.py (1)

1-99: LGTM!

Comment thread external/langgraph/examples/email_phishing.py
Comment thread tests/adapters/test_external_langgraph_adapter.py
@zhongxuanwang-nv zhongxuanwang-nv self-assigned this Aug 6, 2026
@zhongxuanwang-nv zhongxuanwang-nv added this to the 0.2 milestone Aug 6, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

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

⚠️ Outside diff range comments (1)
external/langgraph/examples/email_phishing_graph.py (1)

56-58: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add a regression test for the missing API-key path.

Remove the configured environment variable, call build_graph, assert the expected ValueError, and assert that ChatOpenAI was not constructed.

🤖 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/langgraph/examples/email_phishing_graph.py` around lines 56 - 58,
Add a regression test for build_graph that removes the configured API-key
environment variable, asserts the expected ValueError, and verifies ChatOpenAI
was not constructed; preserve the existing behavior in the api_key validation
path.

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.

Outside diff comments:
In `@external/langgraph/examples/email_phishing_graph.py`:
- Around line 56-58: Add a regression test for build_graph that removes the
configured API-key environment variable, asserts the expected ValueError, and
verifies ChatOpenAI was not constructed; preserve the existing behavior in the
api_key validation path.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: eeb443ba-b863-4b47-8c61-d5c8369c2aee

📥 Commits

Reviewing files that changed from the base of the PR and between 432ecad and 131a882.

📒 Files selected for processing (2)
  • external/langgraph/examples/email_phishing_graph.py
  • tests/adapters/test_external_langgraph_adapter.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (14)
**/*.{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_external_langgraph_adapter.py
  • external/langgraph/examples/email_phishing_graph.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_external_langgraph_adapter.py
  • external/langgraph/examples/email_phishing_graph.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_external_langgraph_adapter.py
  • external/langgraph/examples/email_phishing_graph.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_external_langgraph_adapter.py
  • external/langgraph/examples/email_phishing_graph.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_external_langgraph_adapter.py
  • external/langgraph/examples/email_phishing_graph.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_external_langgraph_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.

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

Files:

  • tests/adapters/test_external_langgraph_adapter.py
  • external/langgraph/examples/email_phishing_graph.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_external_langgraph_adapter.py
  • external/langgraph/examples/email_phishing_graph.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_external_langgraph_adapter.py
  • external/langgraph/examples/email_phishing_graph.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_external_langgraph_adapter.py
  • external/langgraph/examples/email_phishing_graph.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_langgraph_adapter.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_langgraph_adapter.py
tests/adapters/test_*.py

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

tests/adapters/test_*.py: Add focused tests for descriptor shape and exact capabilities, positive normalized-surface mappings, rejection of unsupported values and unenforceable policies, result normalization without secret leakage, one-shot execution, continuation, runtime isolation, and the packaged subprocess entry point.
Provide a credential-free fixture covering plan, doctor, and run; keep credential-dependent live-harness tests opt-in while retaining a deterministic CI end-to-end path.

Files:

  • tests/adapters/test_external_langgraph_adapter.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_langgraph_adapter.py
🪛 Ruff (0.16.1)
external/langgraph/examples/email_phishing_graph.py

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

Remove quotes

(UP037)


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

(ANN401)

🔇 Additional comments (4)
tests/adapters/test_external_langgraph_adapter.py (2)

123-137: Add coverage for the synchronous graph path.

This test covers only ainvoke. It does not verify the documented invoke(input) fallback. Add a temporary compiled graph that exposes only invoke, then assert that the adapter returns its JSON-safe result.

As per path instructions, tests should cover the behavior promised by the changed API surface, including error paths, lifecycle cleanup, and SDK/native parity where relevant.

Source: Path instructions


14-15: LGTM!

external/langgraph/examples/email_phishing_graph.py (2)

25-30: LGTM!

Also applies to: 43-46


9-9: 📐 Maintainability & Code Quality

Remove the unsupported lint findings.

The repository enables only Ruff rule B019; it does not report UP037 or ANN401. The quoted annotation is valid with postponed annotations, and the proposed protocol is not required by the verified configuration.

			> Likely an incorrect or invalid review comment.

Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
This reverts commit 6f7314e.

Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
This reverts commit b6b60ce.

Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
@zhongxuanwang-nv
zhongxuanwang-nv force-pushed the feat/langgraph-workflow-planning branch from 131a882 to b8170e3 Compare August 6, 2026 21:32
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@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: 3

🤖 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 `@external/langgraph/README.md`:
- Around line 77-92: Update the MCP server instructions near the server.run
workflow in the README to explicitly state that the server blocks the current
terminal, must remain running in one terminal, and that the plan and graph
invocation commands should be executed from a second terminal.

In `@external/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py`:
- Around line 71-102: Update _factory_from_ref to load the configured module
from the resolved base_dir without reusing an incompatible
sys.modules[module_name] entry, while preserving normal imports for modules
belonging to the current base directory. Ensure module and relevant submodule
cache state is isolated or replaced based on its origin, and add a regression
test that starts two applications with identically named factory modules in
different directories and verifies each application invokes its own factory.

In `@tests/adapters/test_external_langgraph_adapter.py`:
- Around line 139-254: Add coverage for an asynchronous graph factory such as
calculator.build_graph, verifying start_runtime awaits factory creation and
invocation succeeds. Extend lifecycle coverage around the runtime tests to stop
the runtime, confirm compiled graph state is cleared, and verify a subsequent
start or invocation recreates or rejects state according to the API contract.
🪄 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: 1e83f0a2-16cb-40c8-8b9c-180288e46e9e

📥 Commits

Reviewing files that changed from the base of the PR and between 7a3272d and b8170e3.

📒 Files selected for processing (9)
  • external/README.md
  • external/langgraph/README.md
  • external/langgraph/examples/calculator.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/fabric-adapter.json
  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py
  • tests/adapters/test_external_langgraph_adapter.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (22)
**/*.{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/README.md
  • external/langgraph/README.md
**/*

📄 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:

  • external/README.md
  • external/langgraph/fabric-adapter.json
  • tests/adapters/test_external_langgraph_adapter.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/langgraph/examples/calculator.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py
  • external/langgraph/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/README.md
  • external/langgraph/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/README.md
  • external/langgraph/README.md
**/*.{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/README.md
  • tests/adapters/test_external_langgraph_adapter.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/langgraph/examples/calculator.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py
  • external/langgraph/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/README.md
  • external/langgraph/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/README.md
  • external/langgraph/README.md
**/*.{html,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

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

Files:

  • external/README.md
  • external/langgraph/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/README.md
  • external/langgraph/README.md
**/*.{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/langgraph/fabric-adapter.json
  • tests/adapters/test_external_langgraph_adapter.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/langgraph/examples/calculator.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py
**/*.{json,jsonschema}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

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

Files:

  • external/langgraph/fabric-adapter.json
**/*.{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_external_langgraph_adapter.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/langgraph/examples/calculator.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/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_external_langgraph_adapter.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/langgraph/examples/calculator.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/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_external_langgraph_adapter.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/langgraph/examples/calculator.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/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_external_langgraph_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.

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

Files:

  • tests/adapters/test_external_langgraph_adapter.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/langgraph/examples/calculator.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/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_external_langgraph_adapter.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/langgraph/examples/calculator.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/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_external_langgraph_adapter.py
  • external/langgraph/examples/calculator_mcp.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py
  • external/langgraph/examples/calculator.py
  • external/langgraph/examples/email_phishing.py
  • external/langgraph/src/nemo_fabric_adapters/langgraph/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_external_langgraph_adapter.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_langgraph_adapter.py
tests/adapters/test_*.py

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

tests/adapters/test_*.py: Add focused tests for descriptor shape and exact capabilities, positive normalized-surface mappings, rejection of unsupported values and unenforceable policies, result normalization without secret leakage, one-shot execution, continuation, runtime isolation, and the packaged subprocess entry point.
Provide a credential-free fixture covering plan, doctor, and run; keep credential-dependent live-harness tests opt-in while retaining a deterministic CI end-to-end path.

Files:

  • tests/adapters/test_external_langgraph_adapter.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_langgraph_adapter.py
🧠 Learnings (1)
📚 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:

  • external/langgraph/fabric-adapter.json
🪛 ast-grep (0.45.0)
external/langgraph/examples/calculator.py

[info] 111-111: use jsonify instead of json.dumps for JSON output
Context: json.dumps(output.to_mapping(), indent=2)
Note: [CWE-116] Improper Encoding or Escaping of Output.

(use-jsonify)

external/langgraph/examples/email_phishing.py

[info] 131-131: use jsonify instead of json.dumps for JSON output
Context: json.dumps(output.to_mapping(), indent=2)
Note: [CWE-116] Improper Encoding or Escaping of Output.

(use-jsonify)

external/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py

[info] 110-110: use jsonify instead of json.dumps for JSON output
Context: json.dumps(value, allow_nan=False)
Note: [CWE-116] Improper Encoding or Escaping of Output.

(use-jsonify)

🪛 Ruff (0.16.1)
external/langgraph/examples/calculator_mcp.py

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

(TRY003)

external/langgraph/examples/calculator.py

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

(ANN401)


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

(TRY003)

external/langgraph/examples/email_phishing.py

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

(ANN401)


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

Remove quotes

(UP037)


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

(ANN401)


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

(TRY003)

external/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py

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

(TRY003)


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

(TRY003)


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

(TRY003)


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

(TRY003)


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

(TRY003)


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

(ANN401)


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

(TRY003)


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

(ANN401)


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

(ANN401)


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

(ANN401)


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

(ANN401)


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

(ANN401)


[warning] 188-188: Do not call getattr with a constant attribute value. It is not any safer than normal property access.

Replace getattr with attribute access

(B009)

🔇 Additional comments (6)
external/README.md (1)

17-22: LGTM!

external/langgraph/fabric-adapter.json (1)

1-51: LGTM!

external/langgraph/src/nemo_fabric_adapters/langgraph/__init__.py (1)

1-4: LGTM!

external/langgraph/examples/calculator.py (1)

1-116: LGTM!

external/langgraph/examples/calculator_mcp.py (1)

1-45: LGTM!

external/langgraph/examples/email_phishing.py (1)

1-136: LGTM!

Comment thread external/langgraph/README.md
Comment thread external/langgraph/src/nemo_fabric_adapters/langgraph/adapter.py
Comment thread tests/adapters/test_external_langgraph_adapter.py
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
@zhongxuanwang-nv
zhongxuanwang-nv marked this pull request as ready for review August 6, 2026 21:59
@zhongxuanwang-nv
zhongxuanwang-nv requested a review from a team as a code owner August 6, 2026 21:59
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
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