fix: report partial Hermes results as failures - #148
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (15)**/*.{rs,py,pyi,json,yaml,yml}📄 CodeRabbit inference engine (.agents/skills/contribute-api/SKILL.md)
Files:
**/*📄 CodeRabbit inference engine (.agents/skills/karpathy-guidelines/SKILL.md)
Files:
**/*.{rs,py}📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)
Files:
**/*.{py,pyi}📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Files:
**/*.{rs,py,pyi}📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Files:
tests/adapters/**/*.py📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Files:
**/*.{py,pyi,rs}📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Files:
tests/**/*.py📄 CodeRabbit inference engine (.agents/skills/python-tests/SKILL.md)
Files:
**/*.{rs,py,toml}📄 CodeRabbit inference engine (.agents/skills/update-project-version/SKILL.md)
Files:
**/*.{toml,rs,py}📄 CodeRabbit inference engine (.agents/skills/update-project-version/SKILL.md)
Files:
**/*.py📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*.{rs,py,json}📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*.{rs,py,html,md,mdx,toml,yaml,yml,sh,bash}📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*.{md,mdx,yml,py,rs,sh}📄 CodeRabbit inference engine (.agents/skills/review-doc-style/SKILL.md)
Files:
{tests/**,python/tests/**}⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (2)
Walkthrough
ChangesHermes result status
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Fern docs preview: https://nvidia-preview-pull-request-148.docs.buildwithfern.com/nemo/fabric |
756de0f to
6f25cfd
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py`:
- Around line 409-413: Update the Hermes result handling around the failed
calculation and its error assignment to normalize string-valued
result.get("error") values into the structured error contract expected by
adapter_output_status, preserving the original truncation message and existing
structured errors. Add an end-to-end assertion that RunResult.error retains the
original message when Hermes reports a string error.
In `@crates/fabric-core/src/error.rs`:
- Around line 123-126: The public FabricError::AdapterLifecycleOperation variant
adds required fields and breaks downstream construction and pattern matching.
Preserve the existing variant shape for compatibility, or move retryable and
metadata into a separate details variant; if the breaking change is intentional,
add the required migration and release-note guidance.
In `@tests/adapters/test_hermes_adapter.py`:
- Around line 504-535: The test covering incomplete Hermes results must exercise
each failure indicator independently. Update
test_incomplete_hermes_result_is_failed and the related cases to use
parametrization for failed=True, partial=True, non-empty error, and empty or
absent errors, while retaining the completed=False compatibility case; ensure
each case asserts the expected failure outcome without combining indicators that
would mask regressions.
In `@tests/python/test_runtime.py`:
- Line 600: Update the local test helper completed_invoke signature to replace
*args: Any with a narrower object-based variadic type, and remove the now-unused
Any import if applicable. Preserve the helper’s existing behavior and return
type.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: d50ce93f-0a6b-49b2-a1ad-1c61d8618050
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (15)
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pycrates/fabric-core/src/error.rscrates/fabric-core/src/runtime.rscrates/fabric-python/src/lib.rsdocs/reference/api/python-library-reference/nemo_fabric.client.mddocs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdxdocs/sdk/python.mdxpython/src/nemo_fabric/client.pypython/src/nemo_fabric/runtime.pyskills/integrations/consumer/nemo-fabric-integrate/SKILL.mdskills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.mdtests/adapters/test_hermes_adapter.pytests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.pytests/python/test_native_sdk.pytests/python/test_runtime.py
📜 Review details
⏰ Context from checks skipped due to timeout. (13)
- GitHub Check: Preview docs
- GitHub Check: Test (Python 3.11, windows-amd64)
- GitHub Check: Test (Python 3.11, linux-amd64)
- GitHub Check: Test (Python 3.12, macos-arm64)
- GitHub Check: Test (Python 3.12, windows-amd64)
- GitHub Check: Test (Python 3.11, macos-arm64)
- GitHub Check: Test (Python 3.13, linux-amd64)
- GitHub Check: Test (Python 3.13, windows-amd64)
- GitHub Check: Test (Python 3.14, macos-arm64)
- GitHub Check: Test (Python 3.12, linux-amd64)
- GitHub Check: Test (Python 3.14, windows-amd64)
- GitHub Check: Test (Python 3.13, macos-arm64)
- GitHub Check: Pre-commit
🧰 Additional context used
📓 Path-based instructions (43)
**/*.{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:
docs/reference/api/python-library-reference/nemo_fabric.client.mdskills/integrations/consumer/nemo-fabric-integrate/SKILL.mdskills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.md
{README.md,docs/**/*.{md,mdx,yml},examples/**/*.{md,mdx,yml}}
📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
Keep package names, repository references, and build commands current in documentation and examples.
Files:
docs/reference/api/python-library-reference/nemo_fabric.client.mddocs/sdk/python.mdxdocs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx
{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/reference/api/python-library-reference/nemo_fabric.client.mddocs/sdk/python.mdxdocs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx
docs/**/*.{md,mdx,yml}
📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
Run
just docswhen the documentation site changes.
Files:
docs/reference/api/python-library-reference/nemo_fabric.client.mddocs/sdk/python.mdxdocs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.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 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:
docs/reference/api/python-library-reference/nemo_fabric.client.mdadapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pycrates/fabric-python/src/lib.rstests/python/test_native_sdk.pycrates/fabric-core/src/error.rspython/src/nemo_fabric/client.pytests/adapters/test_hermes_adapter.pyskills/integrations/consumer/nemo-fabric-integrate/SKILL.mddocs/sdk/python.mdxskills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.mdtests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.pytests/python/test_runtime.pydocs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdxpython/src/nemo_fabric/runtime.pycrates/fabric-core/src/runtime.rs
**/*.{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:
docs/reference/api/python-library-reference/nemo_fabric.client.mdskills/integrations/consumer/nemo-fabric-integrate/SKILL.mddocs/sdk/python.mdxskills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.mddocs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx
**/*.{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:
docs/reference/api/python-library-reference/nemo_fabric.client.mdskills/integrations/consumer/nemo-fabric-integrate/SKILL.mdskills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.md
docs/**/*
📄 CodeRabbit inference engine (AGENTS.md)
Update Fern documentation under
docs/when public behavior, thenemo-fabricpackage, examples, or supported bindings change.
Files:
docs/reference/api/python-library-reference/nemo_fabric.client.mddocs/sdk/python.mdxdocs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx
docs/reference/api/**
📄 CodeRabbit inference engine (AGENTS.md)
Regenerate or update generated API references under
docs/reference/api/when the public API changes.Treat all files under
docs/reference/api/as generated output and do not modify them directly.
Files:
docs/reference/api/python-library-reference/nemo_fabric.client.mddocs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx
**/*.{md,mdx}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/SKILL.md)
**/*.{md,mdx}: Use the full product nameNVIDIA NeMo Fabricon its first usage, typically in the title or H1; useNeMo Fabricthereafter.
Usefabricby itself only when referring to the CLI tool, and surround those references with backticks.
CapitalizeNVIDIAcorrectly in public documentation.
Format commands, code elements, expressions, file names, paths, and filenames as inline code where needed.
Use title case consistently for headings in technical documentation.
Introduce code blocks, tables, and lists with complete lead-in sentences.
Use descriptive anchor text instead of raw URLs or generic link text such ashere.
Prefer active voice, present tense, short sentences, and plain English.
Use consistent terminology for the same concept throughout a document.
Write procedures as imperative, parallel, easy-to-scan steps, and split long sequences into smaller tasks.
Useafterinstead ofoncewhen expressing temporal sequence.
Usecaninstead ofmaywhen the intended meaning is 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.
Introduce examples' code blocks with full sentences and ensure examples match current APIs and build commands.For docs site changes, run
just docsto regenerate Python and Rust API references and validate the Fern configuration.
Files:
docs/reference/api/python-library-reference/nemo_fabric.client.mdskills/integrations/consumer/nemo-fabric-integrate/SKILL.mddocs/sdk/python.mdxskills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.mddocs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx
**/*.{rs,py,html,md,mdx,toml,yml,yaml,sh,bash}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
All Rust, Python, HTML, Markdown, MDX, TOML, YAML, and shell source files must include the project SPDX copyright and Apache-2.0 license headers using the comment syntax appropriate to each file type.
Files:
docs/reference/api/python-library-reference/nemo_fabric.client.mdadapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pycrates/fabric-python/src/lib.rstests/python/test_native_sdk.pycrates/fabric-core/src/error.rspython/src/nemo_fabric/client.pytests/adapters/test_hermes_adapter.pyskills/integrations/consumer/nemo-fabric-integrate/SKILL.mddocs/sdk/python.mdxskills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.mdtests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.pytests/python/test_runtime.pydocs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdxpython/src/nemo_fabric/runtime.pycrates/fabric-core/src/runtime.rs
**/{README.md,*.md,*.mdx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Update relevant documentation when changes affect public behavior, adapters, examples, or workspace structure.
Files:
docs/reference/api/python-library-reference/nemo_fabric.client.mdskills/integrations/consumer/nemo-fabric-integrate/SKILL.mddocs/sdk/python.mdxskills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.mddocs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx
**/*.md
📄 CodeRabbit inference engine (.agents/skills/README.md)
Documentation and examples must be updated consistently with changes to public behavior and reviewed for NVIDIA technical-writing style.
Files:
docs/reference/api/python-library-reference/nemo_fabric.client.mdskills/integrations/consumer/nemo-fabric-integrate/SKILL.mdskills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.md
{docs/**,README.md,AGENTS.md}
⚙️ CodeRabbit configuration file
{docs/**,README.md,AGENTS.md}: Review documentation for technical accuracy against the current API, command correctness, and consistency with generated schemas.
For links between files under docs/, require paths relative to the source file with the target file's .mdx extension so they work in both Fern builds and repository browsers. Flag Fern site-root links such as NeMo Fabric overview; use the repository-relative equivalent, such as NeMo Fabric overview.
Files:
docs/reference/api/python-library-reference/nemo_fabric.client.mddocs/sdk/python.mdxdocs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx
{*.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:
docs/reference/api/python-library-reference/nemo_fabric.client.mdskills/integrations/consumer/nemo-fabric-integrate/SKILL.mddocs/sdk/python.mdxskills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.mddocs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx
**/*.{rs,py,pyi,json,yaml,yml}
📄 CodeRabbit inference engine (.agents/skills/contribute-api/SKILL.md)
Determine and update every affected public surface, including the CLI, PyO3 bindings, Python SDK, type stubs, schemas, and adapter contract, so they remain in parity.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pycrates/fabric-python/src/lib.rstests/python/test_native_sdk.pycrates/fabric-core/src/error.rspython/src/nemo_fabric/client.pytests/adapters/test_hermes_adapter.pytests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.pytests/python/test_runtime.pypython/src/nemo_fabric/runtime.pycrates/fabric-core/src/runtime.rs
**/*.{rs,py}
📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)
For native binding changes, run
cargo check -p fabric-python --locked.
**/*.{rs,py}: When changing the Rust core or public schemas, run both the Rust and Python test suites.
When adding functionality, include tests in the corresponding Rust crate or the relevant area undertests/.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pycrates/fabric-python/src/lib.rstests/python/test_native_sdk.pycrates/fabric-core/src/error.rspython/src/nemo_fabric/client.pytests/adapters/test_hermes_adapter.pytests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.pytests/python/test_runtime.pypython/src/nemo_fabric/runtime.pycrates/fabric-core/src/runtime.rs
**/*.{py,pyi}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
If Python code or a Python-facing adapter changes, run
just test-python.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pytests/python/test_native_sdk.pypython/src/nemo_fabric/client.pytests/adapters/test_hermes_adapter.pytests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.pytests/python/test_runtime.pypython/src/nemo_fabric/runtime.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.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pycrates/fabric-python/src/lib.rstests/python/test_native_sdk.pycrates/fabric-core/src/error.rspython/src/nemo_fabric/client.pytests/adapters/test_hermes_adapter.pytests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.pytests/python/test_runtime.pypython/src/nemo_fabric/runtime.pycrates/fabric-core/src/runtime.rs
**/*.{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:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pycrates/fabric-python/src/lib.rstests/python/test_native_sdk.pycrates/fabric-core/src/error.rspython/src/nemo_fabric/client.pytests/adapters/test_hermes_adapter.pytests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.pytests/python/test_runtime.pypython/src/nemo_fabric/runtime.pycrates/fabric-core/src/runtime.rs
**/*.{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:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pycrates/fabric-python/src/lib.rstests/python/test_native_sdk.pycrates/fabric-core/src/error.rspython/src/nemo_fabric/client.pytests/adapters/test_hermes_adapter.pytests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.pytests/python/test_runtime.pypython/src/nemo_fabric/runtime.pycrates/fabric-core/src/runtime.rs
**/*.{toml,rs,py}
📄 CodeRabbit inference engine (.agents/skills/update-project-version/SKILL.md)
Avoid blind repository-wide replacement of version-like strings; distinguish package-version references from examples and unrelated dependency versions.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pycrates/fabric-python/src/lib.rstests/python/test_native_sdk.pycrates/fabric-core/src/error.rspython/src/nemo_fabric/client.pytests/adapters/test_hermes_adapter.pytests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.pytests/python/test_runtime.pypython/src/nemo_fabric/runtime.pycrates/fabric-core/src/runtime.rs
**/*.py
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Use type annotations for public Python APIs.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pytests/python/test_native_sdk.pypython/src/nemo_fabric/client.pytests/adapters/test_hermes_adapter.pytests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.pytests/python/test_runtime.pypython/src/nemo_fabric/runtime.py
**/*.{py,rs}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.{py,rs}: Keep native Python binding declarations synchronized with their Rust implementations.
Usesnake_casefor functions and variables; usePascalCasefor Rust types and Python classes.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pycrates/fabric-python/src/lib.rstests/python/test_native_sdk.pycrates/fabric-core/src/error.rspython/src/nemo_fabric/client.pytests/adapters/test_hermes_adapter.pytests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.pytests/python/test_runtime.pypython/src/nemo_fabric/runtime.pycrates/fabric-core/src/runtime.rs
{adapters/**,examples/**}
⚙️ CodeRabbit configuration file
{adapters/**,examples/**}: Review adapter and example changes for command correctness, config/schema consistency, artifact handling, and compatibility with the public NeMo Fabric contracts.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
**/*.rs
📄 CodeRabbit inference engine (.agents/skills/contribute-api/SKILL.md)
Implement new runtime or binding behavior in the shared Rust core first.
**/*.rs: Format Rust code withcargo fmt --all; Rust formatting checks must pass withcargo fmt --all -- --check.
Rust workspace changes must passcargo check --workspace --locked.
Files:
crates/fabric-python/src/lib.rscrates/fabric-core/src/error.rscrates/fabric-core/src/runtime.rs
**/*.{rs,toml}
📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)
For any Rust change, run
just test-rustandcargo 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.
Files:
crates/fabric-python/src/lib.rscrates/fabric-core/src/error.rscrates/fabric-core/src/runtime.rs
**/*.{rs,rmeta}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
If Rust code changes, run
cargo fmt --all -- --checkandjust test-rust.
Files:
crates/fabric-python/src/lib.rscrates/fabric-core/src/error.rscrates/fabric-core/src/runtime.rs
crates/fabric-python/**/*.{rs,toml}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
If the PyO3 bridge or package metadata changes, run
just build-pythonandcargo check -p fabric-python --locked.
Files:
crates/fabric-python/src/lib.rs
crates/fabric-python/**/*
⚙️ CodeRabbit configuration file
crates/fabric-python/**/*: Treat native binding changes as public API changes. Check JSON/type conversion, error propagation, GIL/thread behavior, and parity with the Python SDK.
Files:
crates/fabric-python/src/lib.rs
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 and run by the async runner.
Do not add-> Nonereturn type annotations to test functions.
When mocking a class, useunittest.mock.MagicMockorunittest.mock.AsyncMock, using thespecargument when necessary, rather than defining a new class.
Prefix mocked class names withmock, notfake.
Prefer pytest fixtures over helper methods.
Do not repeat fixtures; place fixtures needed by multiple test files inconftest.py.
Define fixtures using@pytest.fixture(name="<fixture_name>"[, scope="<scope>"])and a function named<fixture_name>_fixture; specifyscopeonly when it is notfunction.
Preferpytest.mark.parametrizeover separate tests for different input types.
Use@pytest.mark.usefixtureswhen a fixture is needed but its return value is unused or it does not return a value.
Use the autouserestore_environ_fixturefromtests/conftest.pyto restore environment variables; modify variables withos.environand do not usemonkeypatch.setenv.
Avoid defensive programming in tests; access expected data directly so missing data raises a clear failure, such as usingresults["data"]instead ofresults.get("data").
Files:
tests/python/test_native_sdk.pytests/adapters/test_hermes_adapter.pytests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.pytests/python/test_runtime.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/python/test_native_sdk.pytests/adapters/test_hermes_adapter.pytests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.pytests/python/test_runtime.py
crates/fabric-core/**/*.{rs,py}
📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)
Changes under
crates/fabric-coremust run both the Rust and Python test suites.
Files:
crates/fabric-core/src/error.rscrates/fabric-core/src/runtime.rs
crates/fabric-core/**/*.rs
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/SKILL.md)
For Rust API reference changes, update Rust documentation comments under
crates/fabric-core/instead of editing generated reference output.If
crates/fabric-corechanges in a way exposed through Python, run both the Rust and Python suites.
Files:
crates/fabric-core/src/error.rscrates/fabric-core/src/runtime.rs
crates/fabric-core/src/**/*.rs
⚙️ CodeRabbit configuration file
crates/fabric-core/src/**/*.rs: Review the Rust core for runtime lifecycle correctness, handle validation, capability routing accuracy, schema stability, and error semantics.
Public API changes should match committed schemas, tests, and documentation.
Files:
crates/fabric-core/src/error.rscrates/fabric-core/src/runtime.rs
python/src/nemo_fabric/**
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Ensure the editable maturin build continues to produce the native extension at
nemo_fabric._native, with generated artifacts placed where downstream consumers expect.
Files:
python/src/nemo_fabric/client.pypython/src/nemo_fabric/runtime.py
python/src/nemo_fabric/**/*.py
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/SKILL.md)
For Python API reference changes, update source docstrings under
python/src/nemo_fabric/instead of editing generated reference output.
Files:
python/src/nemo_fabric/client.pypython/src/nemo_fabric/runtime.py
python/src/nemo_fabric/**/*
⚙️ CodeRabbit configuration file
python/src/nemo_fabric/**/*: Review Python SDK changes for typed API consistency, import-time dependency neutrality, async/session behavior, and parity with the native extension.
Stubs and runtime implementations should stay aligned.
Files:
python/src/nemo_fabric/client.pypython/src/nemo_fabric/runtime.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_hermes_adapter.py
skills/**
📄 CodeRabbit inference engine (AGENTS.md)
skills/**: Keep consumer skills underskills/self-contained and dependent only on supported public Python SDK contracts and published documentation; do not add repository-internal contribution guidance.
Keep consumer skills in parity with the public SDK guide, model, and type details when the Python/Rust binding contract changes.
Files:
skills/integrations/consumer/nemo-fabric-integrate/SKILL.mdskills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.md
**/SKILL.md
📄 CodeRabbit inference engine (.agents/skills/README.md)
**/SKILL.md: Maintainer skills must begin with YAML frontmatter containing at leastnameanddescription.
Maintainer skills may reference repository internals, build and test commands, and contribution workflows, but external usage guidance must remain in the top-levelskills/directory.
Files:
skills/integrations/consumer/nemo-fabric-integrate/SKILL.md
⚙️ CodeRabbit configuration file
**/SKILL.md: Do not flag SKILL.md files for missing SPDX headers. Skill entrypoints intentionally start with YAML frontmatter instead.
Verify that every SKILL.md keeps valid YAML frontmatter with at least name and description fields before the Markdown body.
Files:
skills/integrations/consumer/nemo-fabric-integrate/SKILL.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.Use
{/* ... */}delimiters for top-of-file MDX SPDX comments, not HTML comment delimiters.
Files:
docs/sdk/python.mdxdocs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx
docs/sdk/python.mdx
📄 CodeRabbit inference engine (AGENTS.md)
Keep
docs/sdk/python.mdxcurrent when the public Python API changes.
Files:
docs/sdk/python.mdx
🧠 Learnings (3)
📚 Learning: 2026-07-09T22:28:51.689Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 43
File: adapters/claude-sdk/src/nemo_fabric_adapters/claude_sdk/adapter.py:164-168
Timestamp: 2026-07-09T22:28:51.689Z
Learning: In the NeMo-Fabric adapters, treat path values used in Fabric adapter configuration (including logic like `_resolve_path` in adapter.py) as config-root-relative. Do not apply `Path.expanduser()` (or otherwise apply `~`/home or shell-style expansion), because it will make the resolved paths normalize inconsistently across adapters. Also, do not rely on or add any resolution behavior that uses `harness.settings.cwd` as an override point for these adapter paths—`harness.settings.cwd` is explicitly unsupported in this adapter context.
Applied to files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
📚 Learning: 2026-06-28T04:03:32.877Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 26
File: python/tests/smoke_typed_config.py:163-177
Timestamp: 2026-06-28T04:03:32.877Z
Learning: In NVIDIA NeMo Fabric Python SDK serialization of `RuntimeCapabilities` (to satisfy the “parity contract” with Rust core and the CLI), do not emit metadata keys when the corresponding metadata is absent. Instead, omit those fields entirely so the produced JSON matches the Rust/CLI output (e.g., avoid `null`, empty objects, or placeholder metadata). During review, verify the serializer/builders follow this omission rule and that Python outputs/parity tests reflect the same shape.
Applied to files:
python/src/nemo_fabric/client.pypython/src/nemo_fabric/runtime.py
📚 Learning: 2026-07-24T16:07:22.255Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 118
File: docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterdescriptor.mdx:5-5
Timestamp: 2026-07-24T16:07:22.255Z
Learning: In this repo, files generated under `docs/reference/api/**` are NVIDIA NeMo Fabric API reference output. When reviewing changes to these generated pages, do not treat sidebar `position`/ordering updates as direct manual edits—these can be regenerated by running `just docs` after adding public types. Only flag substantive content changes that are not explained by generation.
Applied to files:
docs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx
🪛 ast-grep (0.45.0)
tests/python/test_runtime.py
[info] 94-102: use jsonify instead of json.dumps for JSON output
Context: json.dumps( # type: ignore[attr-defined]
{
"stage": stage,
"code": code,
"message": message,
"retryable": retryable,
"details": details,
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 602-602: use jsonify instead of json.dumps for JSON output
Context: json.dumps(result)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
🪛 Ruff (0.16.0)
tests/python/test_runtime.py
[warning] 600-600: Dynamically typed expressions (typing.Any) are disallowed in *args
(ANN401)
🔇 Additional comments (14)
docs/reference/api/python-library-reference/nemo_fabric.client.md (1)
134-134: LGTM!docs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx (1)
12-12: LGTM!Also applies to: 212-219
docs/sdk/python.mdx (1)
578-582: LGTM!Also applies to: 680-690
skills/integrations/consumer/nemo-fabric-integrate/SKILL.md (1)
284-290: LGTM!Also applies to: 323-323
skills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.md (1)
46-59: LGTM!Also applies to: 60-69
crates/fabric-core/src/runtime.rs (3)
458-472: LGTM!
1554-1561: LGTM!Also applies to: 1567-1665
2552-2561: LGTM!Also applies to: 2615-2621, 3047-3068, 3124-3131
crates/fabric-python/src/lib.rs (1)
185-219: LGTM! VerifiedPython::attachis the current PyO3 API (renamed, behavior-identical towith_gil), and the JSON payload shape matches the Python-side parser inruntime.py::_native_error_info.python/src/nemo_fabric/client.py (1)
27-27: LGTM!Also applies to: 167-169, 286-286
python/src/nemo_fabric/runtime.py (1)
216-216: LGTM!Also applies to: 331-331, 456-539
tests/python/test_runtime.py (1)
86-105: LGTM! Solid coverage of the new structured-error preservation paths across start/stop/run.Also applies to: 203-226, 308-330, 594-634
tests/python/test_native_sdk.py (1)
43-63: LGTM!tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py (1)
9-9: 🩺 Stability & AvailabilityNo change needed.
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
6f25cfd to
cd86bc5
Compare
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/adapters/test_hermes_adapter.py`:
- Around line 504-505: Update the started_hermes_runtime fixture declaration to
use `@pytest.fixture`(name="started_hermes_runtime") and rename the function to
started_hermes_runtime_fixture, preserving its existing return type and
behavior.
- Around line 529-533: Update test_hermes_failure_indicators_are_independent so
the expected_failed boolean parameter is keyword-only, while preserving the
existing fixture parameters and test behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 1cfb6717-208b-49a6-80b5-32ead490605e
📒 Files selected for processing (2)
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pytests/adapters/test_hermes_adapter.py
📜 Review details
⏰ Context from checks skipped due to timeout. (13)
- GitHub Check: Test (x86_64)
- GitHub Check: Test (Python 3.13, windows-amd64)
- GitHub Check: Test (Python 3.14, linux-amd64)
- GitHub Check: Test (Python 3.13, linux-amd64)
- GitHub Check: Test (Python 3.12, linux-arm64)
- GitHub Check: Test (Python 3.14, linux-arm64)
- GitHub Check: Test (Python 3.11, linux-amd64)
- GitHub Check: Test (Python 3.12, linux-amd64)
- GitHub Check: Test (Python 3.11, windows-amd64)
- GitHub Check: Test (Python 3.14, windows-amd64)
- GitHub Check: Test (Python 3.13, linux-arm64)
- GitHub Check: Test (Python 3.11, linux-arm64)
- GitHub Check: Pre-commit
🧰 Additional context used
📓 Path-based instructions (19)
**/*.{rs,py,pyi,json,yaml,yml}
📄 CodeRabbit inference engine (.agents/skills/contribute-api/SKILL.md)
Determine and update every affected public surface, including the CLI, PyO3 bindings, Python SDK, type stubs, schemas, and adapter contract, so they remain in parity.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pytests/adapters/test_hermes_adapter.py
**/*
📄 CodeRabbit inference engine (.agents/skills/karpathy-guidelines/SKILL.md)
**/*: Before implementing, explicitly state assumptions, surface ambiguity and tradeoffs, present multiple interpretations when relevant, and ask for clarification rather than silently deciding or proceeding when requirements are unclear.
Prefer the minimum code needed to solve the requested problem: avoid speculative features, unnecessary abstractions, unrequested flexibility, and handling of impossible scenarios; simplify overcomplicated solutions.
When editing existing code, make surgical changes only: do not modify unrelated code, comments, formatting, or pre-existing dead code; match the existing style, and remove only unused imports, variables, or functions introduced by your changes.
Define verifiable success criteria for each task, such as writing regression tests for bugs and invalid-input tests for validation, then verify the implementation against those criteria. For multi-step work, state a brief plan with a verification check for each step.
**/*: Always 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/hermes/src/nemo_fabric_adapters/hermes/adapter.pytests/adapters/test_hermes_adapter.py
**/*.{rs,py}
📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)
For native binding changes, run
cargo check -p fabric-python --locked.
**/*.{rs,py}: Usesnake_casefor functions and variables; usePascalCasefor Rust types and Python classes.
Run the relevant Rust and Python test suites for every affected language surface; changes to the Rust core or public schemas require both suites.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pytests/adapters/test_hermes_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.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pytests/adapters/test_hermes_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.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pytests/adapters/test_hermes_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:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pytests/adapters/test_hermes_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:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pytests/adapters/test_hermes_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/hermes/src/nemo_fabric_adapters/hermes/adapter.pytests/adapters/test_hermes_adapter.py
**/*.py
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Use type annotations for public Python APIs and keep native binding declarations synchronized with their Rust implementations.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pytests/adapters/test_hermes_adapter.py
**/*.{rs,py,json}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
When adding functionality, include tests in the corresponding Rust crate or relevant
tests/area; public contract changes must keep checked-in JSON Schema snapshots and native Python binding declarations synchronized.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pytests/adapters/test_hermes_adapter.py
**/*.{rs,py,html,md,mdx,toml,yaml,yml,sh,bash}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
All source files must include the specified SPDX copyright and Apache-2.0 license headers using the comment syntax appropriate to the file type.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pytests/adapters/test_hermes_adapter.py
adapters/*/src/**/*.{py,js,ts,rs,go}
📄 CodeRabbit inference engine (.agents/skills/contribute-adapter/SKILL.md)
Use the existing Fabric
pythonorprocessrunner and normalized request/result contracts; do not add a runner or abstraction for one adapter.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
adapters/*/{README.md,LICENSE,fabric-adapter.json,pyproject.toml,uv.lock,package.json,package-lock.json,src/**,tests/**}
📄 CodeRabbit inference engine (.agents/skills/contribute-adapter/SKILL.md)
Place each adapter under
adapters/<name>withLICENSE -> ../../LICENSE,README.md,fabric-adapter.json, language-native package and lock files, a source entry point, and focused tests; Python adapters use the specifiedpyproject.toml,uv.lock, source path, and test naming convention.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
adapters/*/src/**/*
📄 CodeRabbit inference engine (.agents/skills/contribute-adapter/SKILL.md)
adapters/*/src/**/*: Use the complete Fabric invocation for normalized configuration and runtime context; treatconfig,capability_plan,telemetry_plan, andruntime_contextas authoritative, reservingharness.settingsfor harness-specific behavior.
Apply precedence in this order: normalizedconfig, Fabric-resolved plans and runtime context, harness-specific settings, then descriptor and adapter defaults. Reject conflicting duplicate declarations or unsupported behavior with actionable field-specific errors; never silently drop configuration.
Forward only required system variables, selected credential variables, telemetry variables, and documented harness-specific environment; never forward or log unrelated environment values.
Never expose credential values in output, errors, events, logs, or fixtures.
Start one local adapter host per Fabric runtime and keep it alive for orderedstart→invoke*→stop; emit one JSON lifecycle response per request on stdout and diagnostics on stderr.
Return harness-level invoke failures in a successful lifecycle response withresponse: null,failed: true, and structurederrorcontainingcode,message,retryable, and optionalmetadata.
Do not emit NeMo Relay stream records on adapter stdout; return exactly one terminal lifecycle response while raw records are sent through the SDK-owned NDJSON ATOF endpoint.
Scope workspace, generated configuration, state, sessions, and artifacts to the resolved runtime context, and isolate stateful adapters by Fabric runtime ID.
Keep stdout stable: emitresponseand adapter-specific extensions such aserror, harnessevents,usage, and session IDs; Fabric supplies top-level identity, lifecycle IDs, status, errors, artifacts, telemetry, lifecycle events, and metadata.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
**/*.{md,mdx,yml,py,rs,sh}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/SKILL.md)
Keep documentation aligned with current NeMo Fabric behavior, repository layout, entry points, commands, package names, APIs, bindings, and support claims.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.pytests/adapters/test_hermes_adapter.py
{adapters/**,examples/**}
⚙️ CodeRabbit configuration file
{adapters/**,examples/**}: Review adapter and example changes for command correctness, config/schema consistency, artifact handling, and compatibility with the public NeMo Fabric contracts.
Files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
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_hermes_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 and run by the async runner.
Do not add-> Nonereturn type annotations to test functions.
When mocking a class, useunittest.mock.MagicMockorunittest.mock.AsyncMock, using thespecargument when necessary, rather than defining a new class.
Prefix mocked class names withmock, notfake.
Prefer pytest fixtures over helper methods.
Do not repeat fixtures; place fixtures needed by multiple test files inconftest.py.
Define fixtures using@pytest.fixture(name="<fixture_name>"[, scope="<scope>"])and a function named<fixture_name>_fixture; specifyscopeonly when it is notfunction.
Preferpytest.mark.parametrizeover separate tests for different input types.
Use@pytest.mark.usefixtureswhen a fixture is needed but its return value is unused or it does not return a value.
Use the autouserestore_environ_fixturefromtests/conftest.pyto restore environment variables; modify variables withos.environand do not usemonkeypatch.setenv.
Avoid defensive programming in tests; access expected data directly so missing data raises a clear failure, such as usingresults["data"]instead ofresults.get("data").
Files:
tests/adapters/test_hermes_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_hermes_adapter.py
🧠 Learnings (1)
📚 Learning: 2026-07-09T22:28:51.689Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 43
File: adapters/claude-sdk/src/nemo_fabric_adapters/claude_sdk/adapter.py:164-168
Timestamp: 2026-07-09T22:28:51.689Z
Learning: In the NeMo-Fabric adapters, treat path values used in Fabric adapter configuration (including logic like `_resolve_path` in adapter.py) as config-root-relative. Do not apply `Path.expanduser()` (or otherwise apply `~`/home or shell-style expansion), because it will make the resolved paths normalize inconsistently across adapters. Also, do not rely on or add any resolution behavior that uses `harness.settings.cwd` as an override point for these adapter paths—`harness.settings.cwd` is explicitly unsupported in this adapter context.
Applied to files:
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
🪛 Ruff (0.16.0)
tests/adapters/test_hermes_adapter.py
[warning] 532-532: Boolean-typed positional argument in function definition
(FBT001)
🔇 Additional comments (2)
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py (1)
409-435: LGTM!tests/adapters/test_hermes_adapter.py (1)
553-609: LGTM!
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Overview
Hermes Agent can return a terminal partial result with
completed=false,partial=true, and a non-emptyerror, while leavingfailed=false. Fabriccurrently trusts only the Hermes
failedfield and therefore reports thatinvocation as succeeded. This change normalizes Hermes-specific partial/error
signals at the adapter boundary so Fabric reports the invocation as failed
without discarding the original Hermes error.
This change is independent of the runtime cleanup-result preservation work in
#140 and can be reviewed and merged in either order.
Details
failed,partial, or non-emptyerrorvalues as independent adapter-reported failure signals.completed=falseby itself is not a failure. Hermes 0.18.2 emits that shape for ordinary successfulfinish_reason=stopresponses.Response remained truncated after 4 continuation attempts.failedcontract.Validation
mainat2b4cf99.completed=false,failed=false,partial=true, andResponse remained truncated after 4 continuation attempts, while Harbor recorded zero exceptions and Fabric reported success.pytest -q tests/adapters/test_hermes_adapter.py tests/e2e/test_hermes_e2e.py— 37 passed.pre-commit run --from-ref upstream/main --to-ref HEAD— all applicable checks passed.git diff --check upstream/main...HEAD.Where should the reviewer start?
Start with the failure normalization in
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py, then review theresult-shape regressions in
tests/adapters/test_hermes_adapter.py. The keydesign choice is intentionally not treating
completed=falsealone as failurebecause current Hermes successful responses also use that value.
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Relates to: none
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
Bug Fixes
Tests