feat: Support MCP Authentication - #211
Conversation
…d), run discover_mcp_tools in a loop Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
…mprovements Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
…-fabric into david-mcp-auth Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
…mprovements Signed-off-by: David Gardner <dagardner@nvidia.com>
…-fabric into david-mcp-auth Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
There was a problem hiding this comment.
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 `@adapters/claude/src/nemo_fabric_adapters/claude/adapter.py`:
- Around line 416-437: The project_header_reference flow must preserve defaults
in ${VARIABLE:-fallback} expressions when the server-local or host environment
value is unset or empty. Update variable parsing to retain the default, use it
whenever the resolved source value is empty or unavailable, and only project the
resulting value; add regression coverage for both empty server-local and empty
host values.
In `@adapters/codex/src/nemo_fabric_adapters/codex/adapter.py`:
- Around line 669-675: Update the environment/header handling around
_native_mcp_server_specs and _environment_variable_name to project each HTTP
server’s local env values into unique child-environment names, then rewrite its
env_http_headers references to those names. Ensure the resulting requests use
server.env values instead of only shared os.environ values, while preserving
isolation between servers with identical variable names.
In `@adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py`:
- Around line 321-324: Update the header validation exception handler in the
adapter configuration flow around validate_http_headers to catch both ValueError
and TypeError, then wrap either failure in AdapterConfigError as currently done.
Add a regression test covering a non-string custom_headers value and assert it
raises AdapterConfigError.
🪄 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: 96999003-ed23-4ed7-b26c-c4b2c88bfb2b
📒 Files selected for processing (16)
adapters/claude/src/nemo_fabric_adapters/claude/adapter.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/common/src/nemo_fabric_adapters/common/utils.pyadapters/deepagents/README.mdadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/hermes/src/nemo_fabric_adapters/hermes/configuration.pyschemas/SCHEMA.mdtests/adapters/test_adapaters_common_utils.pytests/adapters/test_claude_adapter.pytests/adapters/test_codex_adapter.pytests/adapters/test_deepagents.pytests/adapters/test_hermes_adapter.pytests/e2e/test_claude.pytests/e2e/test_codex.pytests/e2e/test_deepagents.pytests/e2e/test_hermes_e2e.py
💤 Files with no reviewable changes (1)
- schemas/SCHEMA.md
📜 Review details
⏰ Context from checks skipped due to timeout. (17)
- GitHub Check: Preview docs
- GitHub Check: Test (Python 3.13, macos-arm64)
- GitHub Check: Test (Python 3.11, linux-amd64)
- GitHub Check: Test (Python 3.14, linux-amd64)
- GitHub Check: Test (Python 3.12, windows-amd64)
- GitHub Check: Test (Python 3.13, windows-amd64)
- GitHub Check: Test (Python 3.13, linux-amd64)
- GitHub Check: Test (Python 3.14, windows-amd64)
- GitHub Check: Test (Python 3.13, linux-arm64)
- GitHub Check: Test (Python 3.12, linux-amd64)
- GitHub Check: Test (Python 3.12, macos-arm64)
- GitHub Check: Test (Python 3.11, macos-arm64)
- GitHub Check: Test (Python 3.14, linux-arm64)
- GitHub Check: Test (Python 3.11, windows-amd64)
- GitHub Check: Test (Python 3.14, macos-arm64)
- GitHub Check: Test (Python 3.12, linux-arm64)
- GitHub Check: Pre-commit
🧰 Additional context used
📓 Path-based instructions (27)
**/*.{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/deepagents/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 spellNVIDIAin all caps; do not useNvidia,nvidia,nVidia,nVIDIA, orNV.
Usean NVIDIAbefore a noun, because the name begins with an “en” sound.
Do not add a registered trademark symbol afterNVIDIAwhen 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 withNVIDIAon first mention when natural and accurate, and link the first mention when the destination helps the reader.
On first use, include the company name and full model qualifier when it helps identify the model; preserve official capitalization and punctuation, and use shorter family names only after establishing the full name.
For learning-oriented and developer content, do not force trademark symbols unless explicitly required; for press, ...
Files:
adapters/deepagents/README.mdtests/e2e/test_codex.pytests/e2e/test_hermes_e2e.pyadapters/hermes/src/nemo_fabric_adapters/hermes/configuration.pytests/e2e/test_deepagents.pytests/adapters/test_deepagents.pyadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/common/src/nemo_fabric_adapters/common/utils.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_adapaters_common_utils.pytests/adapters/test_codex_adapter.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.py
**/*.{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 spellNVIDIAin all caps; do not useNvidia,nvidia, orNV.
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 ashereorread 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.
Usecanfor possibility and reservemayfor permission.
Useafterfor temporal relationships instead ofonce, and preferrefer tooverseewhen 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/deepagents/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.
Usecanfor possibility and reservemayfor permission; useafterfor temporal order; userefer tofor cross-references; prefer short direct sentences and specific verbs; avoid unnecessarypleasein 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: usefor exampleorsuch asinstead ofe.g.,and so oninstead ofetc.,that isinstead ofi.e.,compared toinstead ofvs., andby,through, orusinginstead ofvia. Use industry-standard terms such as in silico, in vitro, and in vivo when appropriate, and italicize them in running text.
Usethatwithout commas for essential clauses, andwhichwith commas for nonessential clauses.
Format dates and times clearly: spell out months in body text; use forms such asJune 12, 2025; avoid numeric or ordinal dates; capitalize days; use 12-hour time when appropriate; include a space beforea.m.orp.m.; useETandPTfor needed time zones; avoid24/7; and preferfrom 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/deepagents/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:
adapters/deepagents/README.mdtests/e2e/test_codex.pytests/e2e/test_hermes_e2e.pyadapters/hermes/src/nemo_fabric_adapters/hermes/configuration.pytests/e2e/test_deepagents.pytests/adapters/test_deepagents.pyadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/common/src/nemo_fabric_adapters/common/utils.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_adapaters_common_utils.pytests/adapters/test_codex_adapter.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.py
**/*.{md,mdx}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/SKILL.md)
**/*.{md,mdx}: Use the full product nameNVIDIA NeMo Fabricon first use, typically in the title and H1; useNeMo Fabricthereafter. Usefabricalone 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.
CapitalizeNVIDIAcorrectly 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 ashere, and use repository-relative.mdxpaths for links withindocs/.
Prefer active voice, present tense, short sentences, plain English, consistent terminology, and imperative, parallel, scannable procedures.
Useafterinstead ofoncewhen expressing temporal sequence, and usecanrather thanmaywhen 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 withMust fix,Should fix, andNice to havecategories; include file path, line reference, current problem, rationale, and a concrete rewrite or direction.
**/*.{md,mdx}: When public behavior, adapters, examples, or workspace structure changes, update the corresponding documentation in the same branch.
For docs site changes, runjust docsto regenerate Python and Rust API references and validate Fern configuration.Keep release-process and release-history policy in
RELEASING.md, not in user-facing documentation or a duplicateCHANGELOG.md.
Files:
adapters/deepagents/README.md
{README.md,docs/**,adapters/*/README.md,python/src/nemo_fabric/integrations/*/README.md,examples/README.md}
📄 CodeRabbit inference engine (AGENTS.md)
Update user-facing entry points when public behavior, the
nemo-fabricpackage, examples, or supported bindings change.
Files:
adapters/deepagents/README.md
**/*.{rs,py,html,md,mdx,toml,yaml,yml,sh,bash}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
All source files must include the appropriate SPDX copyright and Apache-2.0 license headers using the comment syntax for their file type; MDX files must use a JSX comment.
Files:
adapters/deepagents/README.mdtests/e2e/test_codex.pytests/e2e/test_hermes_e2e.pyadapters/hermes/src/nemo_fabric_adapters/hermes/configuration.pytests/e2e/test_deepagents.pytests/adapters/test_deepagents.pyadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/common/src/nemo_fabric_adapters/common/utils.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_adapaters_common_utils.pytests/adapters/test_codex_adapter.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.py
**/*.{md,mdx,rst,yml,yaml,py,sh}
📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
**/*.{md,mdx,rst,yml,yaml,py,sh}: Keep package names, repository references, and build commands current.
Ensure example commands match current package names and paths.
Files:
adapters/deepagents/README.mdtests/e2e/test_codex.pytests/e2e/test_hermes_e2e.pyadapters/hermes/src/nemo_fabric_adapters/hermes/configuration.pytests/e2e/test_deepagents.pytests/adapters/test_deepagents.pyadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/common/src/nemo_fabric_adapters/common/utils.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_adapaters_common_utils.pytests/adapters/test_codex_adapter.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.py
**/*.{md,mdx,yml,yaml}
📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
**/*.{md,mdx,yml,yaml}: Update entry-point documentation, includingREADME.mdordocs/index.yml, when examples or reading paths change.
Update relevant getting-started, reference, entry-point, and example or adapter README documentation when examples or adapters change.
Files:
adapters/deepagents/README.md
**/*.{md,mdx,rst,yml,yaml}
📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
Run
just docswhen the documentation site changes.
Files:
adapters/deepagents/README.md
{docs,examples,adapters}/**/*
📄 CodeRabbit inference engine (.agents/skills/prepare-code-freeze/SKILL.md)
Update appropriate current-version installation, package, and configuration examples under
docs,examples, andadaptersfrom the old version to<next-version>, while preserving release notes, changelogs, generated output, and third-party attribution references.
Files:
adapters/deepagents/README.mdadapters/hermes/src/nemo_fabric_adapters/hermes/configuration.pyadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/common/src/nemo_fabric_adapters/common/utils.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.py
adapters/*/**
📄 CodeRabbit inference engine (.agents/skills/contribute-adapter/SKILL.md)
adapters/*/**: Place the adapter underadapters/<name>/withLICENSE -> ../../LICENSE,
README.md,fabric-adapter.json, language-native package and lock files,
a source entry point, and focused tests.
Give each Python leaf adapter a small base installation, aharnessextra
for supported target packages, and afullextra for package-installable
integrations. Add arelayextra only when the adapter imports NVIDIA NeMo
Relay Python APIs.
Files:
adapters/deepagents/README.mdadapters/hermes/src/nemo_fabric_adapters/hermes/configuration.pyadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/common/src/nemo_fabric_adapters/common/utils.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/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/deepagents/README.mdadapters/hermes/src/nemo_fabric_adapters/hermes/configuration.pyadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/common/src/nemo_fabric_adapters/common/utils.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.py
{*.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 lowercasefabricCLI command, package/import/crate names, code identifiers, API symbols, configuration keys, file paths, or unrelated generic uses of the word.
Files:
adapters/deepagents/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:
tests/e2e/test_codex.pytests/e2e/test_hermes_e2e.pyadapters/hermes/src/nemo_fabric_adapters/hermes/configuration.pytests/e2e/test_deepagents.pytests/adapters/test_deepagents.pyadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/common/src/nemo_fabric_adapters/common/utils.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_adapaters_common_utils.pytests/adapters/test_codex_adapter.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.py
**/*.{rs,py}
📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)
For native binding changes, run
cargo check -p fabric-python --locked.Keep package names, import paths, and module names internally consistent, including the editable maturin build producing
nemo_fabric._nativeand native artifacts being placed underpython/src/nemo_fabricas expected by consumers.
Files:
tests/e2e/test_codex.pytests/e2e/test_hermes_e2e.pyadapters/hermes/src/nemo_fabric_adapters/hermes/configuration.pytests/e2e/test_deepagents.pytests/adapters/test_deepagents.pyadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/common/src/nemo_fabric_adapters/common/utils.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_adapaters_common_utils.pytests/adapters/test_codex_adapter.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.py
**/*.{py,pyi}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
If Python code or a Python-facing adapter changes, run
just test-python.Use type annotations for public Python APIs and keep native binding declarations synchronized with their Rust implementations.
Files:
tests/e2e/test_codex.pytests/e2e/test_hermes_e2e.pyadapters/hermes/src/nemo_fabric_adapters/hermes/configuration.pytests/e2e/test_deepagents.pytests/adapters/test_deepagents.pyadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/common/src/nemo_fabric_adapters/common/utils.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_adapaters_common_utils.pytests/adapters/test_codex_adapter.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/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 injust test-rustpass and review generated schema diffs.
For schema or public contract changes, run both language suites and review changes underschemas/and generated API references.
**/*.{rs,py,pyi}: Usesnake_casefor Rust and Python functions and variables; usePascalCasefor Rust types and Python classes.
Run tests for every affected language surface. Changes touching the Rust core or public schemas require both Rust and Python test suites.
Use the existing style in the Python SDK, adapters, examples, and tests, and maintain synchronization between native Python binding declarations and Rust implementations.
If a change touches the Rust core or public schemas, run bothjust test-rustandjust test-python; otherwise run the test targets for every affected language surface.
Files:
tests/e2e/test_codex.pytests/e2e/test_hermes_e2e.pyadapters/hermes/src/nemo_fabric_adapters/hermes/configuration.pytests/e2e/test_deepagents.pytests/adapters/test_deepagents.pyadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/common/src/nemo_fabric_adapters/common/utils.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_adapaters_common_utils.pytests/adapters/test_codex_adapter.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/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, thenjust test-python; rebuild withjust build-pythonwhen native code or packaging changes.
Files:
tests/e2e/test_codex.pytests/e2e/test_hermes_e2e.pyadapters/hermes/src/nemo_fabric_adapters/hermes/configuration.pytests/e2e/test_deepagents.pytests/adapters/test_deepagents.pyadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/common/src/nemo_fabric_adapters/common/utils.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_adapaters_common_utils.pytests/adapters/test_codex_adapter.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/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 inpython/pyproject.toml.
Files:
tests/e2e/test_codex.pytests/e2e/test_hermes_e2e.pyadapters/hermes/src/nemo_fabric_adapters/hermes/configuration.pytests/e2e/test_deepagents.pytests/adapters/test_deepagents.pyadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/common/src/nemo_fabric_adapters/common/utils.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_adapaters_common_utils.pytests/adapters/test_codex_adapter.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/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/e2e/test_codex.pytests/e2e/test_hermes_e2e.pyadapters/hermes/src/nemo_fabric_adapters/hermes/configuration.pytests/e2e/test_deepagents.pytests/adapters/test_deepagents.pyadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/common/src/nemo_fabric_adapters/common/utils.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_adapaters_common_utils.pytests/adapters/test_codex_adapter.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/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.asyncioto tests; async tests are automatically detected by the async runner.
Do not add-> Nonereturn type annotations to test functions.
When mocking a class, useunittest.mock.MagicMockorAsyncMock, using thespecargument when necessary, rather than defining a new class.
Prefix mocked class names withmock, notfake.
Prefer pytest fixtures over helper methods.
If a fixture is needed in multiple test files, define it once inconftest.pyrather than repeating it.
Define fixtures using@pytest.fixture(name="<fixture_name>"[, scope="<scope>"])and a<fixture_name>_fixturefunction; specifyscopeonly when it is notfunction.
Preferpytest.mark.parametrizeover separate tests for different input types.
Use@pytest.mark.usefixtureswhen 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 usingresults["data"]instead ofresults.get("data").
When adapter installation metadata changes, packaging metadata tests must directly assert that the root project depends unconditionally on the exact-versionnemo-fabric-runtimedistribution.
Packaging metadata tests must verify that each root harness extra delegates to the matching version of the leaf adapter'sharnessextra.
Packaging metadata tests must verify that bare leaf dependencies remain adapter-owned and that the rootadapter-testsdependency group installs each leaf through itsharnessextra.
Packaging metadata tests must verify that every leaf providesfull; only adapters importing NeMo Relay Python APIs providerelay, while adapters using an external Relay executable havefullequal toharness.
Files:
tests/e2e/test_codex.pytests/e2e/test_hermes_e2e.pytests/e2e/test_deepagents.pytests/adapters/test_deepagents.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_adapaters_common_utils.pytests/adapters/test_codex_adapter.py
tests/**/*.{rs,py,pyi}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
When adding functionality, include tests in the corresponding Rust crate or in the relevant area under
tests/.
Files:
tests/e2e/test_codex.pytests/e2e/test_hermes_e2e.pytests/e2e/test_deepagents.pytests/adapters/test_deepagents.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_adapaters_common_utils.pytests/adapters/test_codex_adapter.py
**/*.{rs,py,pyi,json}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Public contract changes must keep checked-in JSON Schema snapshots and native Python binding declarations synchronized.
Files:
tests/e2e/test_codex.pytests/e2e/test_hermes_e2e.pyadapters/hermes/src/nemo_fabric_adapters/hermes/configuration.pytests/e2e/test_deepagents.pytests/adapters/test_deepagents.pyadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/common/src/nemo_fabric_adapters/common/utils.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_adapaters_common_utils.pytests/adapters/test_codex_adapter.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/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/e2e/test_codex.pytests/e2e/test_hermes_e2e.pytests/e2e/test_deepagents.pytests/adapters/test_deepagents.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_adapaters_common_utils.pytests/adapters/test_codex_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 undertests/adapters, then runjust test-python.
Files:
tests/adapters/test_deepagents.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_adapaters_common_utils.pytests/adapters/test_codex_adapter.py
🧠 Learnings (35)
📓 Common learnings
Learnt from: CR
Repo: NVIDIA/NeMo-Fabric
Timestamp: 2026-08-12T19:02:21.188Z
Learning: uv sync --group adapter-tests
uv run --no-sync pytest tests/adapters/test_<name>*.py
just test-python
just lock-python && just wheels
just schemas
cargo fmt --all -- --check && just test-rust
just docs
uv run pre-commit run --all-files --show-diff-on-failure
git diff --check
📚 Learning: 2026-08-11T03:40:11.868Z
Learnt from: AnuradhaKaruppiah
Repo: NVIDIA/NeMo-Fabric PR: 195
File: examples/langgraph_custom_agent/adapter/mcp.py:59-68
Timestamp: 2026-08-11T03:40:11.868Z
Learning: In `examples/langgraph_custom_agent/adapter/mcp.py`, the locked `langchain-mcp-adapters` version 0.2.2 scopes MCP discovery and tool-call sessions, including stdio subprocesses, internally. `MultiServerMCPClient.get_tools()` returns tools that create sessions per tool call, and persistent client context management is unsupported. `EmailPhishingRuntime.stop()` must not attempt to close a retained `MultiServerMCPClient` resource.
Applied to files:
adapters/deepagents/README.mdtests/adapters/test_deepagents.pyadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.py
📚 Learning: 2026-08-11T03:40:15.386Z
Learnt from: AnuradhaKaruppiah
Repo: NVIDIA/NeMo-Fabric PR: 195
File: examples/langgraph_custom_agent/adapter/runtime.py:125-130
Timestamp: 2026-08-11T03:40:15.386Z
Learning: In `examples/langgraph_custom_agent`, with locked `langchain-mcp-adapters` version `0.2.2`, `MultiServerMCPClient` scopes stdio MCP sessions and subprocesses to discovery and individual tool calls. `examples/langgraph_custom_agent/adapter/runtime.py` retains native `BaseTool` instances in the compiled graph, not a closeable `MultiServerMCPClient` or MCP session. Do not require MCP cleanup in `EmailPhishingRuntime.stop()` for this integration.
Applied to files:
adapters/deepagents/README.mdtests/e2e/test_deepagents.pytests/adapters/test_deepagents.pyadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pytests/adapters/test_claude_adapter.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.py
📚 Learning: 2026-07-17T17:38:13.526Z
Learnt from: AnuradhaKaruppiah
Repo: NVIDIA/NeMo-Fabric PR: 82
File: python/src/nemo_fabric/_bundled/adapters/deepagents/fabric-adapter.json:8-8
Timestamp: 2026-07-17T17:38:13.526Z
Learning: In NeMo-Fabric, `config.accepts` in an adapter manifest may declare the nested capability `tools.blocked` when the adapter explicitly enforces Fabric's blocked-tools policy. `crates/fabric-core/src/config.rs` checks `accepts("tools.blocked")` to route the policy to `HarnessNative`; absent that declaration, configured blocked tools are reported as unsupported. The Deep Agents manifest at `python/src/nemo_fabric/_bundled/adapters/deepagents/fabric-adapter.json` must retain `tools.blocked` because its adapter enforces the policy.
Applied to files:
adapters/deepagents/README.mdadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
📚 Learning: 2026-07-17T17:38:15.817Z
Learnt from: AnuradhaKaruppiah
Repo: NVIDIA/NeMo-Fabric PR: 82
File: python/src/nemo_fabric/_bundled/adapters/claude/fabric-adapter.json:7-7
Timestamp: 2026-07-17T17:38:15.817Z
Learning: In NeMo-Fabric adapter manifests, `config.accepts` may include explicit policy paths as well as top-level capability sections. In `crates/fabric-core/src/config.rs`, `resolve_capability_plan` checks for the exact `tools.blocked` entry to determine whether an adapter natively enforces Fabric's blocked-tools policy; adapters that support this policy, including the Claude adapter, must retain `"tools.blocked"` alongside `"tools"`.
Applied to files:
adapters/deepagents/README.mdadapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
📚 Learning: 2026-08-11T17:08:58.510Z
Learnt from: CR
Repo: NVIDIA/NeMo-Fabric PR: 0
File: .agents/skills/contribute-adapter/SKILL.md:0-0
Timestamp: 2026-08-11T17:08:58.510Z
Learning: Applies to tests/adapters/test_*.py : Include a subprocess test of the packaged entry point, exact descriptor assertions for every claimed capability, and a credential-free fixture exercising `plan`, `doctor`, and `run`.
Applied to files:
tests/e2e/test_codex.pytests/e2e/test_hermes_e2e.pytests/adapters/test_deepagents.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_adapaters_common_utils.pytests/adapters/test_codex_adapter.py
📚 Learning: 2026-06-29T20:57:13.377Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 26
File: tests/test_sdk_contract.py:355-448
Timestamp: 2026-06-29T20:57:13.377Z
Learning: In this repository's Python tests, `tests/test_sdk_contract.py` intentionally keeps a local stateful native boundary recorder/client to verify serialized native calls, request capture, and cleanup behavior, while `tests/test_session.py` uses `unittest.mock.MagicMock` for isolated unit mocking. Future reviews should not require moving these two distinct test layers into shared `conftest.py` fixtures without a stronger duplication signal.
Applied to files:
tests/e2e/test_hermes_e2e.pytests/adapters/test_deepagents.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_codex_adapter.py
📚 Learning: 2026-07-31T22:01:28.954Z
Learnt from: CR
Repo: NVIDIA/NeMo-Fabric PR: 0
File: .agents/skills/python-tests/SKILL.md:0-0
Timestamp: 2026-07-31T22:01:28.954Z
Learning: Applies to tests/**/*.py : Do not add `-> None` return type annotations to test functions.
Applied to files:
adapters/hermes/src/nemo_fabric_adapters/hermes/configuration.py
📚 Learning: 2026-07-31T22:01:28.954Z
Learnt from: CR
Repo: NVIDIA/NeMo-Fabric PR: 0
File: .agents/skills/python-tests/SKILL.md:0-0
Timestamp: 2026-07-31T22:01:28.954Z
Learning: Applies to tests/conftest.py : Use the existing autouse `restore_environ_fixture` from `tests/conftest.py`; modify environment variables directly through `os.environ` instead of using `monkeypatch.setenv`.
Applied to files:
tests/adapters/test_deepagents.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_codex_adapter.py
📚 Learning: 2026-07-09T22:28:55.875Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 43
File: tests/adapters/test_claude_sdk_adapter.py:39-47
Timestamp: 2026-07-09T22:28:55.875Z
Learning: In `tests/adapters/test_claude_sdk_adapter.py`, the module-level `load_claude_adapter()` helper and global `adapter` instance are intentional: they ensure the dynamically imported adapter module (from `adapters/claude-sdk/src/nemo_fabric_adapters/claude_sdk/adapter.py`) has a single stable instance, so that its exception classes and monkeypatch targets retain consistent identity across all tests in the file. Do not suggest converting this to a fixture, since fixture-based reloading would risk identity mismatches for exception isinstance checks and monkeypatch targets.
Applied to files:
tests/adapters/test_deepagents.pytests/e2e/test_claude.pytests/adapters/test_claude_adapter.pytests/adapters/test_codex_adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.py
📚 Learning: 2026-08-11T17:08:58.510Z
Learnt from: CR
Repo: NVIDIA/NeMo-Fabric PR: 0
File: .agents/skills/contribute-adapter/SKILL.md:0-0
Timestamp: 2026-08-11T17:08:58.510Z
Learning: Applies to tests/adapters/test_*.py : Keep credentialed live-target tests opt-in and provide deterministic CI coverage.
Applied to files:
tests/adapters/test_deepagents.pytests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_codex_adapter.py
📚 Learning: 2026-07-31T22:01:28.954Z
Learnt from: CR
Repo: NVIDIA/NeMo-Fabric PR: 0
File: .agents/skills/python-tests/SKILL.md:0-0
Timestamp: 2026-07-31T22:01:28.954Z
Learning: Applies to tests/**/*.py : Prefix mocked class names with `mock`, not `fake`.
Applied to files:
tests/adapters/test_deepagents.pytests/e2e/test_claude.pytests/adapters/test_codex_adapter.py
📚 Learning: 2026-07-31T22:01:28.954Z
Learnt from: CR
Repo: NVIDIA/NeMo-Fabric PR: 0
File: .agents/skills/python-tests/SKILL.md:0-0
Timestamp: 2026-07-31T22:01:28.954Z
Learning: Applies to tests/**/*.py : 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.
Applied to files:
tests/adapters/test_deepagents.py
📚 Learning: 2026-06-29T20:56:07.461Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 26
File: python/tests/smoke_sdk.py:26-57
Timestamp: 2026-06-29T20:56:07.461Z
Learning: In NVIDIA/NeMo-Fabric, `python/tests/smoke_sdk.py` is intentionally a standalone, dependency-free import smoke rather than a pytest test. CI launches each smoke in a fresh process, so temporary mutation of `nemo_fabric.client._native` inside that file does not leak into other smokes, and equivalent scoped pytest coverage for the missing-native path is already exercised in the unit test suite.
Applied to files:
tests/adapters/test_deepagents.py
📚 Learning: 2026-07-31T22:01:28.954Z
Learnt from: CR
Repo: NVIDIA/NeMo-Fabric PR: 0
File: .agents/skills/python-tests/SKILL.md:0-0
Timestamp: 2026-07-31T22:01:28.954Z
Learning: Applies to tests/**/*.py : Prefer pytest fixtures over helper methods.
Applied to files:
tests/adapters/test_deepagents.pytests/adapters/test_codex_adapter.py
📚 Learning: 2026-07-21T22:34:44.206Z
Learnt from: CR
Repo: NVIDIA/NeMo-Fabric PR: 0
File: .agents/skills/validate-change/SKILL.md:0-0
Timestamp: 2026-07-21T22:34:44.206Z
Learning: Applies to tests/adapters/**/*.py : For adapter behavior changes, run focused adapter tests under `tests/adapters`, then run `just test-python`.
Applied to files:
tests/adapters/test_deepagents.pytests/adapters/test_hermes_adapter.pytests/adapters/test_claude_adapter.pytests/adapters/test_codex_adapter.py
📚 Learning: 2026-08-07T07:15:38.344Z
Learnt from: AnuradhaKaruppiah
Repo: NVIDIA/NeMo-Fabric PR: 186
File: schemas/adapter-contract/agent-config.schema.json:374-381
Timestamp: 2026-08-07T07:15:38.344Z
Learning: For the NeMo Fabric southbound adapter contract, `AdapterDescriptor.contract_version` is negotiated before adapter start and versions `AgentConfig`, `AgentRunRequest`, `AgentRunResult`, and `RuntimeContext` as one contract. The payloads intentionally do not contain individual version fields. The maintained adapter-contract README documents this behavior.
Applied to files:
adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
📚 Learning: 2026-08-11T17:08:22.411Z
Learnt from: CR
Repo: NVIDIA/NeMo-Fabric PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-08-11T17:08:22.411Z
Learning: Applies to {README.md,docs/**,adapters/*/README.md,python/src/nemo_fabric/integrations/*/README.md,examples/README.md} : Update user-facing entry points when public behavior, the `nemo-fabric` package, examples, or supported bindings change.
Applied to files:
adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
📚 Learning: 2026-07-09T22:29:05.789Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 43
File: adapters/claude-sdk/src/nemo_fabric_adapters/claude_sdk/adapter.py:171-175
Timestamp: 2026-07-09T22:29:05.789Z
Learning: In `adapters/claude-sdk/src/nemo_fabric_adapters/claude_sdk/adapter.py`, `harness.settings.cwd` (and other normalized fields: `model_name`, `tools`, `mcp_servers`, `skills`) is explicitly rejected by `_validate_settings_boundary()` via the `NORMALIZED_SETTING_FIELDS` mapping. `resolve_cwd()` only derives `cwd` from `FabricConfig.environment.workspace` via `common_utils.environment_payload(payload)`, not from `harness.settings`, so type validation on a `settings["cwd"]` value is not applicable.
Applied to files:
adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.py
📚 Learning: 2026-08-11T21:31:51.236Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 208
File: crates/fabric-core/src/runtime.rs:822-868
Timestamp: 2026-08-11T21:31:51.236Z
Learning: In `crates/fabric-core/src/runtime.rs`, `validate_openai_stream_transport` intentionally rejects blank tokens and CR/LF characters only. This protects the authenticated loopback HTTP Authorization header from framing injection without expanding the OpenAI stream transport token contract to reject other control characters.
Applied to files:
adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
📚 Learning: 2026-07-09T22:28:34.671Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 43
File: adapters/claude-sdk/src/nemo_fabric_adapters/claude_sdk/adapter.py:0-0
Timestamp: 2026-07-09T22:28:34.671Z
Learning: In `adapters/claude-sdk/src/nemo_fabric_adapters/claude_sdk/adapter.py`, `MessageParseError` is intentionally imported from the private `claude_agent_sdk._errors` submodule (not from the public `claude_agent_sdk` top-level package) because `claude-agent-sdk==0.2.114` does not re-export `MessageParseError` at the top level. All other Claude SDK error classes (`ClaudeSDKError`, `CLINotFoundError`, `CLIConnectionError`, `ProcessError`, `CLIJSONDecodeError`) are imported from the public `claude_agent_sdk` package. Do not flag the private `MessageParseError` import as an issue unless the pinned SDK version changes to re-export it publicly.
Applied to files:
adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.py
📚 Learning: 2026-08-11T17:08:58.510Z
Learnt from: CR
Repo: NVIDIA/NeMo-Fabric PR: 0
File: .agents/skills/contribute-adapter/SKILL.md:0-0
Timestamp: 2026-08-11T17:08:58.510Z
Learning: Applies to {adapters/*/fabric-adapter.json,adapters/*/**,tests/adapters/**,docs/**,catalogs/**,share/nemo-fabric/adapters/**} : Keep descriptor claims, implementation, focused tests, public documentation, catalog entries, and packaged metadata synchronized, starting with the narrowest truthful capability set.
Applied to files:
adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pytests/adapters/test_claude_adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.py
📚 Learning: 2026-07-09T22:28:51.689Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 43
File: adapters/claude-sdk/src/nemo_fabric_adapters/claude_sdk/adapter.py:164-168
Timestamp: 2026-07-09T22:28:51.689Z
Learning: In the NeMo-Fabric adapters, treat path values used in Fabric adapter configuration (including logic like `_resolve_path` in adapter.py) as config-root-relative. Do not apply `Path.expanduser()` (or otherwise apply `~`/home or shell-style expansion), because it will make the resolved paths normalize inconsistently across adapters. Also, do not rely on or add any resolution behavior that uses `harness.settings.cwd` as an override point for these adapter paths—`harness.settings.cwd` is explicitly unsupported in this adapter context.
Applied to files:
adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.pyadapters/codex/src/nemo_fabric_adapters/codex/adapter.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.py
📚 Learning: 2026-07-09T22:28:55.333Z
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:55.333Z
Learning: In the NeMo-Fabric repository, path values in Fabric adapter configs (e.g., `adapters/claude-sdk/src/nemo_fabric_adapters/claude_sdk/adapter.py`'s `_resolve_path`) use config-root-relative semantics rather than shell/home (`~`) expansion. Applying `Path.expanduser()` would make the same normalized path resolve inconsistently across adapters, so it should not be added. Additionally, `harness.settings.cwd` is explicitly unsupported/not a valid override point in this adapter.
Applied to files:
adapters/common/src/nemo_fabric_adapters/common/utils.py
📚 Learning: 2026-06-29T20:55:58.831Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 26
File: python/tests/smoke_sdk_concurrency.py:23-29
Timestamp: 2026-06-29T20:55:58.831Z
Learning: In NVIDIA/NeMo-Fabric, `python/tests/smoke_sdk_concurrency.py` is intentionally kept as a standalone smoke script rather than a pytest-discovered test because it validates the installed Python SDK/native-extension entrypoint via per-file process execution; pytest-style behavior is covered separately elsewhere, so future reviews should not suggest converting this file to a pytest async test without evidence that this process-level coverage is no longer needed.
Applied to files:
tests/e2e/test_claude.py
📚 Learning: 2026-06-29T22:35:02.272Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 27
File: tests/smoke_codex_cli.py:19-31
Timestamp: 2026-06-29T22:35:02.272Z
Learning: In the NeMo-Fabric repository, files matching `tests/smoke_*.py` are intentionally kept as directly executed, gated smoke scripts rather than pytest-collected tests. This convention already applies to Hermes, Relay, and Harbor integrations, and pytest-collected behavioral coverage for the Codex CLI adapter lives separately in `tests/test_codex_cli.py`.
Applied to files:
tests/e2e/test_claude.pytests/adapters/test_hermes_adapter.pytests/adapters/test_codex_adapter.py
📚 Learning: 2026-07-31T22:01:28.954Z
Learnt from: CR
Repo: NVIDIA/NeMo-Fabric PR: 0
File: .agents/skills/python-tests/SKILL.md:0-0
Timestamp: 2026-07-31T22:01:28.954Z
Learning: Applies to tests/**/*.py : 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`.
Applied to files:
tests/adapters/test_hermes_adapter.py
📚 Learning: 2026-07-21T22:34:44.206Z
Learnt from: CR
Repo: NVIDIA/NeMo-Fabric PR: 0
File: .agents/skills/validate-change/SKILL.md:0-0
Timestamp: 2026-07-21T22:34:44.206Z
Learning: Applies to tests/test_harbor_runner.py : For Harbor integration changes, run `tests/test_harbor_runner.py`, then `just test-python`.
Applied to files:
tests/adapters/test_hermes_adapter.py
📚 Learning: 2026-07-31T22:01:28.954Z
Learnt from: CR
Repo: NVIDIA/NeMo-Fabric PR: 0
File: .agents/skills/python-tests/SKILL.md:0-0
Timestamp: 2026-07-31T22:01:28.954Z
Learning: Applies to tests/**/*.py : Packaging metadata tests must verify that each root harness extra delegates to the matching version of the leaf adapter's `harness` extra.
Applied to files:
tests/adapters/test_hermes_adapter.py
📚 Learning: 2026-06-29T20:56:03.999Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 26
File: python/tests/smoke_typed_config.py:180-185
Timestamp: 2026-06-29T20:56:03.999Z
Learning: In `NVIDIA/NeMo-Fabric`, `python/tests/smoke_typed_config.py` is intentionally kept as a standalone SDK/CLI parity smoke script rather than being split into pytest tests, because CI invokes it directly against the built extension and it provides explicit script-entrypoint coverage that would be lost by converting it into normal pytest cases.
Applied to files:
tests/adapters/test_hermes_adapter.py
📚 Learning: 2026-07-27T20:44:21.920Z
Learnt from: bbednarski9
Repo: NVIDIA/NeMo-Fabric PR: 124
File: adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py:49-53
Timestamp: 2026-07-27T20:44:21.920Z
Learning: In `adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py`, validation failures use direct `ValueError` to preserve the established adapter convention and stable caller-visible messages. `nemo_fabric_adapters.hermes.relay_cli.HermesRelayError` is reserved for NeMo Relay CLI lifecycle failures, not configuration validation.
Applied to files:
tests/adapters/test_hermes_adapter.py
📚 Learning: 2026-07-21T22:34:44.206Z
Learnt from: CR
Repo: NVIDIA/NeMo-Fabric PR: 0
File: .agents/skills/validate-change/SKILL.md:0-0
Timestamp: 2026-07-21T22:34:44.206Z
Learning: Applies to tests/adapters/**/*.py : If an adapter or integration changes, run its focused tests.
Applied to files:
tests/adapters/test_claude_adapter.pytests/adapters/test_codex_adapter.py
📚 Learning: 2026-07-31T22:01:28.954Z
Learnt from: CR
Repo: NVIDIA/NeMo-Fabric PR: 0
File: .agents/skills/python-tests/SKILL.md:0-0
Timestamp: 2026-07-31T22:01:28.954Z
Learning: Applies to tests/**/*.py : 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.
Applied to files:
tests/adapters/test_claude_adapter.pytests/adapters/test_codex_adapter.py
📚 Learning: 2026-07-31T22:01:28.954Z
Learnt from: CR
Repo: NVIDIA/NeMo-Fabric PR: 0
File: .agents/skills/python-tests/SKILL.md:0-0
Timestamp: 2026-07-31T22:01:28.954Z
Learning: Applies to tests/**/*.py : If a fixture is needed in multiple test files, define it once in `conftest.py` rather than repeating it.
Applied to files:
tests/adapters/test_codex_adapter.py
📚 Learning: 2026-08-11T03:39:59.941Z
Learnt from: AnuradhaKaruppiah
Repo: NVIDIA/NeMo-Fabric PR: 195
File: examples/langgraph_custom_agent/adapter/runtime.py:109-123
Timestamp: 2026-08-11T03:39:59.941Z
Learning: In `adapters/common/src/nemo_fabric_adapters/common/lifecycle.py`, the shared lifecycle host converts arbitrary adapter invocation exceptions into `_AdapterCallError` and returns the lifecycle protocol failure envelope with `outcome.status = "failed"`. Adapter runtimes, including `examples/langgraph_custom_agent/adapter/runtime.py`, must not catch these exceptions solely to return application-shaped `{response: null, failed: true}` output.
Applied to files:
adapters/codex/src/nemo_fabric_adapters/codex/adapter.py
🪛 Ruff (0.16.1)
adapters/common/src/nemo_fabric_adapters/common/utils.py
[warning] 24-26: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 29-32: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 35-38: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 43-46: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 49-52: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 55-58: Avoid specifying long messages outside the exception class
(TRY003)
adapters/claude/src/nemo_fabric_adapters/claude/adapter.py
[warning] 420-420: Function definition does not bind loop variable server_environment
(B023)
[warning] 421-421: Function definition does not bind loop variable server_environment
(B023)
[warning] 429-429: Function definition does not bind loop variable server_name
(B023)
[warning] 432-432: Function definition does not bind loop variable server_name
(B023)
[warning] 432-432: Function definition does not bind loop variable header_name
(B023)
🔇 Additional comments (6)
adapters/common/src/nemo_fabric_adapters/common/utils.py (1)
20-65: LGTM!adapters/deepagents/README.md (1)
65-66: LGTM!adapters/hermes/src/nemo_fabric_adapters/hermes/configuration.py (1)
188-215: LGTM!tests/adapters/test_adapaters_common_utils.py (1)
32-75: LGTM!tests/adapters/test_hermes_adapter.py (1)
571-646: LGTM!tests/e2e/test_hermes_e2e.py (1)
113-149: LGTM!
Signed-off-by: David Gardner <dagardner@nvidia.com>
AnuradhaKaruppiah
left a comment
There was a problem hiding this comment.
I ran the full Rust and Python suites and the package/schema checks locally. The implementation is well covered on its current paths, but I found several validation and capability-boundary gaps that should be addressed before merge.
The SDK documentation also needs an explicit MCP authentication/header support matrix. docs/sdk/python.mdx currently documents only transport and URL support; please state which adapters support custom headers and OAuth, that service-account authentication is currently unimplemented, and add a typed configuration example.
Validation performed: just test-rust (100 passed), just test-python (852 passed, 15 skipped), Rust formatting, cargo check -p fabric-python --locked, Python package build, schema regeneration, API-reference regeneration, and dependency-license comparison.
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
zhongxuanwang-nv
left a comment
There was a problem hiding this comment.
One nitty thing so far, will post comments incrementally as we want this to get merged ASAP!
Signed-off-by: David Gardner <dagardner@nvidia.com>
|
/merge |
move the check for status is None so that it is actually called Cast timeout to an int when passing to `timeoutSecs` which is an int value Signed-off-by: David Gardner <dagardner@nvidia.com>
#### Overview * Add `mcp.auth.oauth2` to `config.accepts` (`AdapterConfigField`) allowing run/plan/doctor to catch adapter incompatibilities * Fix issue where `status is None` check wasn't being reached * Cast Fabric's float `timeout` value to Codex's `timeoutSecs` which is an int field. #### Where should the reviewer start? * `crates/fabric-core/src/config.rs` #### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to) - Closes FABRIC-200 - [x] I confirm this contribution is my own work, or I have the right to submit it under this project's license. - [x] I searched existing issues and open pull requests, and this does not duplicate existing work. ## Summary by CodeRabbit ## New Features - Added support for configuring MCP OAuth 2.0 and service-account authentication. - Adapters can declare which MCP authentication methods they support. ## Bug Fixes - Improved fractional timeout handling and clearer authentication validation. - Unsupported authentication configurations are now rejected with actionable errors. - Enforced supported timeout settings for MCP OAuth authentication. ## Documentation - Updated configuration schemas, SDK references, and integration guidance. ## Tests - Expanded coverage for authentication compatibility, timeouts, status handling, and adapter behavior. Authors: - David Gardner (https://github.com/dagardner-nv) Approvers: - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah) - Ajay Thorve (https://github.com/AjayThorve) - Zhongxuan (Daniel) Wang (https://github.com/zhongxuanwang-nv) URL: #218
Overview
custom_headersfield toMcpServerConfigallowing for static API Key based authMcpOAuth2Config&McpServiceAccountConfigto adapter contractjust schemasrecipe for regenerating the schemas. (Unrelated improvement)Where should the reviewer start?
crates/fabric-core/src/config.rsRelated Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Closes FABRIC-170
I confirm this contribution is my own work, or I have the right to submit it under this project's license.
I searched existing issues and open pull requests, and this does not duplicate existing work.
Summary by CodeRabbit
Summary by CodeRabbit