Skip to content

fix: report partial Hermes results as failures - #148

Draft
bbednarski9 wants to merge 3 commits into
NVIDIA:mainfrom
bbednarski9:fix/hermes-incomplete-result-status
Draft

fix: report partial Hermes results as failures#148
bbednarski9 wants to merge 3 commits into
NVIDIA:mainfrom
bbednarski9:fix/hermes-incomplete-result-status

Conversation

@bbednarski9

@bbednarski9 bbednarski9 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Overview

Hermes Agent can return a terminal partial result with completed=false,
partial=true, and a non-empty error, while leaving failed=false. Fabric
currently trusts only the Hermes failed field and therefore reports that
invocation 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

  • Treat Hermes failed, partial, or non-empty error values as independent adapter-reported failure signals.
  • Normalize a non-empty Hermes string error into Fabric's structured error contract while preserving its original message.
  • Preserve an existing structured Hermes error mapping unchanged.
  • Preserve existing Hermes behavior where completed=false by itself is not a failure. Hermes 0.18.2 emits that shape for ordinary successful finish_reason=stop responses.
  • Add regression coverage for the exact Terminal-Bench truncation result: Response remained truncated after 4 continuation attempts.
  • Keep this normalization Hermes-specific. Claude, Codex, and DeepAgents already normalize their SDK-specific terminal states, while Fabric core intentionally consumes the adapter-neutral failed contract.

Validation

  • Rebased independently onto current main at 2b4cf99.
  • Reproduced this Hermes status issue in the Terminal-Bench task 010 Inference Hub smoke run: Hermes returned completed=false, failed=false, partial=true, and Response 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.
  • Focused pre-commit validation for the review fixes — 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 the
result-shape regressions in tests/adapters/test_hermes_adapter.py. The key
design choice is intentionally not treating completed=false alone as failure
because 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

    • Improved handling of Hermes runtime failures, including partial and incomplete responses.
    • Errors reported as text are now presented in a consistent structured format.
    • Existing structured error details are preserved.
    • Failure status is now correctly reported even when a response is incomplete or marked partial.
  • Tests

    • Added coverage for failure detection, partial responses, and structured error handling.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 9344505a-b441-4910-98cf-e6e4c3640139

📥 Commits

Reviewing files that changed from the base of the PR and between a8e01ed and ce70fcb.

📒 Files selected for processing (1)
  • tests/adapters/test_hermes_adapter.py
📜 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)

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

Files:

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

Files:

  • tests/adapters/test_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}: Use snake_case for functions and variables; use PascalCase for 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:

  • tests/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:

  • tests/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 in just test-rust pass and review generated schema diffs.
For schema or public contract changes, run both language suites and review changes under schemas/ and generated API references.

Files:

  • tests/adapters/test_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 under tests/adapters, then run just test-python.

Files:

  • tests/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, then just test-python; rebuild with just build-python when native code or packaging changes.

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.asyncio to tests; async tests are automatically detected and run by the async runner.
Do not add -> None return type annotations to test functions.
When mocking a class, use unittest.mock.MagicMock or unittest.mock.AsyncMock, using the spec argument when necessary, rather than defining a new class.
Prefix mocked class names with mock, not fake.
Prefer pytest fixtures over helper methods.
Do not repeat fixtures; place fixtures needed by multiple test files in conftest.py.
Define fixtures using @pytest.fixture(name="<fixture_name>"[, scope="<scope>"]) and a function named <fixture_name>_fixture; specify scope only when it is not function.
Prefer pytest.mark.parametrize over separate tests for different input types.
Use @pytest.mark.usefixtures when a fixture is needed but its return value is unused or it does not return a value.
Use the autouse restore_environ_fixture from tests/conftest.py to restore environment variables; modify variables with os.environ and do not use monkeypatch.setenv.
Avoid defensive programming in tests; access expected data directly so missing data raises a clear failure, such as using results["data"] instead of results.get("data").

Files:

  • tests/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 in python/pyproject.toml.

Files:

  • tests/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:

  • tests/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:

  • tests/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:

  • tests/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:

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

  • 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
🔇 Additional comments (2)
tests/adapters/test_hermes_adapter.py (2)

504-517: LGTM!


529-551: LGTM!


Walkthrough

HermesRuntime.invoke now derives failure status from failed, partial, and error, normalizes string errors, preserves structured errors, and adds coverage for incomplete Hermes responses.

Changes

Hermes result status

Layer / File(s) Summary
Hermes result failure interpretation
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py, tests/adapters/test_hermes_adapter.py
HermesRuntime.invoke combines failure indicators, converts string errors into structured errors, preserves existing error objects, and tests incomplete and inconsistent result shapes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title follows Conventional Commits, is concise, and accurately summarizes the Hermes failure-normalization change.
Description check ✅ Passed The description matches the template sections and includes overview, review start point, related issue status, and validation details.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@github-actions

Copy link
Copy Markdown

@bbednarski9
bbednarski9 force-pushed the fix/hermes-incomplete-result-status branch from 756de0f to 6f25cfd Compare July 28, 2026 21:34
@bbednarski9
bbednarski9 changed the base branch from release/0.1 to main July 28, 2026 21:35

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

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

Inline comments:
In `@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

📥 Commits

Reviewing files that changed from the base of the PR and between a618842 and 6f25cfd.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (15)
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • crates/fabric-core/src/error.rs
  • crates/fabric-core/src/runtime.rs
  • crates/fabric-python/src/lib.rs
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx
  • docs/sdk/python.mdx
  • python/src/nemo_fabric/client.py
  • python/src/nemo_fabric/runtime.py
  • skills/integrations/consumer/nemo-fabric-integrate/SKILL.md
  • skills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.md
  • tests/adapters/test_hermes_adapter.py
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py
  • tests/python/test_native_sdk.py
  • tests/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.md
  • skills/integrations/consumer/nemo-fabric-integrate/SKILL.md
  • skills/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.md
  • docs/sdk/python.mdx
  • docs/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.md
  • docs/sdk/python.mdx
  • docs/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 docs when the documentation site changes.

Files:

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

Files:

  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • crates/fabric-python/src/lib.rs
  • tests/python/test_native_sdk.py
  • crates/fabric-core/src/error.rs
  • python/src/nemo_fabric/client.py
  • tests/adapters/test_hermes_adapter.py
  • skills/integrations/consumer/nemo-fabric-integrate/SKILL.md
  • docs/sdk/python.mdx
  • skills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.md
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py
  • tests/python/test_runtime.py
  • docs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx
  • python/src/nemo_fabric/runtime.py
  • crates/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 spell NVIDIA in all caps; do not use Nvidia, nvidia, or NV.
Format commands, code elements, expressions, package names, file names, and paths as inline code.
Use descriptive link text; avoid raw URLs and weak anchors such as here or read more.
Use title case consistently for technical documentation headings.
Introduce code blocks, lists, tables, and images with complete sentences.
Write procedures as imperative, parallel steps; split long procedures into smaller tasks.
Prefer active voice, present tense, short sentences, contractions, and plain English while preserving necessary technical precision.
Use can for possibility and reserve may for permission.
Use after for temporal relationships instead of once, and prefer refer to over see when directing readers to another resource.
Avoid culture-specific idioms, unnecessary Latinisms, jokes, and marketing exaggeration in technical documentation.
Spell out months in body text, avoid ordinal dates, and use clear time zones.
Spell out whole numbers from zero through nine unless they are technical values, parameters, versions, or UI values; use numerals for 10 or greater and commas in thousands.
Do not add trademark symbols to learning-oriented documentation unless the source, platform, or legal guidance explicitly requires them.
Do not replace precise technical terms with simpler words when doing so would lose precision.
Do not flag passive voice when the actor is unknown or the action is the important part.
Do not rewrite API names, package names, command flags, or code literals for style.

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

Files:

  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • skills/integrations/consumer/nemo-fabric-integrate/SKILL.md
  • docs/sdk/python.mdx
  • skills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.md
  • docs/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.
Use can for possibility and reserve may for permission; use after for temporal order; use refer to for cross-references; prefer short direct sentences and specific verbs; avoid unnecessary please in technical documentation.
Prefer active voice when the actor matters. Passive voice is acceptable when the actor is unknown or irrelevant, when the action or result is the focus, or in programmer documentation.
Use natural contractions in conversational technical prose, but do not force them in formal legal copy, API references, or generated text.
Prefer simpler English over Latinisms: use for example or such as instead of e.g., and so on instead of etc., that is instead of i.e., compared to instead of vs., and by, through, or using instead of via. Use industry-standard terms such as in silico, in vitro, and in vivo when appropriate, and italicize them in running text.
Use that without commas for essential clauses, and which with commas for nonessential clauses.
Format dates and times clearly: spell out months in body text; use forms such as June 12, 2025; avoid numeric or ordinal dates; capitalize days; use 12-hour time when appropriate; include a space before a.m. or p.m.; use ET and PT for needed time zones; avoid 24/7; and prefer from 12:30 to 1:00 p.m. for prose ranges.
Format numbers consistently: spell out zero through nine in body text, use numerals for 10 or greater and for technical values, use commas in thousands, do not begin a sentence with a numeral, spell out ordinals, and use numerals consistently within a category wh...

Files:

  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • skills/integrations/consumer/nemo-fabric-integrate/SKILL.md
  • skills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.md
docs/**/*

📄 CodeRabbit inference engine (AGENTS.md)

Update Fern documentation under docs/ when public behavior, the nemo-fabric package, examples, or supported bindings change.

Files:

  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/sdk/python.mdx
  • docs/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.md
  • docs/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 name NVIDIA NeMo Fabric on its first usage, typically in the title or H1; use NeMo Fabric thereafter.
Use fabric by itself only when referring to the CLI tool, and surround those references with backticks.
Capitalize NVIDIA correctly 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 as here.
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.
Use after instead of once when expressing temporal sequence.
Use can instead of may when 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 docs to regenerate Python and Rust API references and validate the Fern configuration.

Files:

  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • skills/integrations/consumer/nemo-fabric-integrate/SKILL.md
  • docs/sdk/python.mdx
  • skills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.md
  • docs/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.md
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • crates/fabric-python/src/lib.rs
  • tests/python/test_native_sdk.py
  • crates/fabric-core/src/error.rs
  • python/src/nemo_fabric/client.py
  • tests/adapters/test_hermes_adapter.py
  • skills/integrations/consumer/nemo-fabric-integrate/SKILL.md
  • docs/sdk/python.mdx
  • skills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.md
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py
  • tests/python/test_runtime.py
  • docs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx
  • python/src/nemo_fabric/runtime.py
  • crates/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.md
  • skills/integrations/consumer/nemo-fabric-integrate/SKILL.md
  • docs/sdk/python.mdx
  • skills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.md
  • docs/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.md
  • skills/integrations/consumer/nemo-fabric-integrate/SKILL.md
  • skills/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.md
  • docs/sdk/python.mdx
  • docs/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 lowercase fabric CLI 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.md
  • skills/integrations/consumer/nemo-fabric-integrate/SKILL.md
  • docs/sdk/python.mdx
  • skills/integrations/consumer/nemo-fabric-integrate/references/results-and-errors.md
  • docs/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.py
  • crates/fabric-python/src/lib.rs
  • tests/python/test_native_sdk.py
  • crates/fabric-core/src/error.rs
  • python/src/nemo_fabric/client.py
  • tests/adapters/test_hermes_adapter.py
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py
  • tests/python/test_runtime.py
  • python/src/nemo_fabric/runtime.py
  • crates/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 under tests/.

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • crates/fabric-python/src/lib.rs
  • tests/python/test_native_sdk.py
  • crates/fabric-core/src/error.rs
  • python/src/nemo_fabric/client.py
  • tests/adapters/test_hermes_adapter.py
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py
  • tests/python/test_runtime.py
  • python/src/nemo_fabric/runtime.py
  • crates/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.py
  • tests/python/test_native_sdk.py
  • python/src/nemo_fabric/client.py
  • tests/adapters/test_hermes_adapter.py
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py
  • tests/python/test_runtime.py
  • python/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 in just test-rust pass and review generated schema diffs.
For schema or public contract changes, run both language suites and review changes under schemas/ and generated API references.

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • crates/fabric-python/src/lib.rs
  • tests/python/test_native_sdk.py
  • crates/fabric-core/src/error.rs
  • python/src/nemo_fabric/client.py
  • tests/adapters/test_hermes_adapter.py
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py
  • tests/python/test_runtime.py
  • python/src/nemo_fabric/runtime.py
  • crates/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, then just test-python; rebuild with just build-python when native code or packaging changes.

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • crates/fabric-python/src/lib.rs
  • tests/python/test_native_sdk.py
  • crates/fabric-core/src/error.rs
  • python/src/nemo_fabric/client.py
  • tests/adapters/test_hermes_adapter.py
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py
  • tests/python/test_runtime.py
  • python/src/nemo_fabric/runtime.py
  • crates/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 in python/pyproject.toml.

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • crates/fabric-python/src/lib.rs
  • tests/python/test_native_sdk.py
  • crates/fabric-core/src/error.rs
  • python/src/nemo_fabric/client.py
  • tests/adapters/test_hermes_adapter.py
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py
  • tests/python/test_runtime.py
  • python/src/nemo_fabric/runtime.py
  • crates/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.py
  • crates/fabric-python/src/lib.rs
  • tests/python/test_native_sdk.py
  • crates/fabric-core/src/error.rs
  • python/src/nemo_fabric/client.py
  • tests/adapters/test_hermes_adapter.py
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py
  • tests/python/test_runtime.py
  • python/src/nemo_fabric/runtime.py
  • crates/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.py
  • tests/python/test_native_sdk.py
  • python/src/nemo_fabric/client.py
  • tests/adapters/test_hermes_adapter.py
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py
  • tests/python/test_runtime.py
  • python/src/nemo_fabric/runtime.py
**/*.{py,rs}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.{py,rs}: Keep native Python binding declarations synchronized with their Rust implementations.
Use snake_case for functions and variables; use PascalCase for Rust types and Python classes.

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • crates/fabric-python/src/lib.rs
  • tests/python/test_native_sdk.py
  • crates/fabric-core/src/error.rs
  • python/src/nemo_fabric/client.py
  • tests/adapters/test_hermes_adapter.py
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py
  • tests/python/test_runtime.py
  • python/src/nemo_fabric/runtime.py
  • crates/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 with cargo fmt --all; Rust formatting checks must pass with cargo fmt --all -- --check.
Rust workspace changes must pass cargo check --workspace --locked.

Files:

  • crates/fabric-python/src/lib.rs
  • crates/fabric-core/src/error.rs
  • crates/fabric-core/src/runtime.rs
**/*.{rs,toml}

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

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

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

Files:

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

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

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

Files:

  • crates/fabric-python/src/lib.rs
  • crates/fabric-core/src/error.rs
  • crates/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-python and cargo 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.asyncio to tests; async tests are automatically detected and run by the async runner.
Do not add -> None return type annotations to test functions.
When mocking a class, use unittest.mock.MagicMock or unittest.mock.AsyncMock, using the spec argument when necessary, rather than defining a new class.
Prefix mocked class names with mock, not fake.
Prefer pytest fixtures over helper methods.
Do not repeat fixtures; place fixtures needed by multiple test files in conftest.py.
Define fixtures using @pytest.fixture(name="<fixture_name>"[, scope="<scope>"]) and a function named <fixture_name>_fixture; specify scope only when it is not function.
Prefer pytest.mark.parametrize over separate tests for different input types.
Use @pytest.mark.usefixtures when a fixture is needed but its return value is unused or it does not return a value.
Use the autouse restore_environ_fixture from tests/conftest.py to restore environment variables; modify variables with os.environ and do not use monkeypatch.setenv.
Avoid defensive programming in tests; access expected data directly so missing data raises a clear failure, such as using results["data"] instead of results.get("data").

Files:

  • tests/python/test_native_sdk.py
  • tests/adapters/test_hermes_adapter.py
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py
  • tests/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.py
  • tests/adapters/test_hermes_adapter.py
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py
  • tests/python/test_runtime.py
crates/fabric-core/**/*.{rs,py}

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

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

Files:

  • crates/fabric-core/src/error.rs
  • crates/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-core changes in a way exposed through Python, run both the Rust and Python suites.

Files:

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

⚙️ CodeRabbit configuration file

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

Files:

  • crates/fabric-core/src/error.rs
  • crates/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.py
  • python/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.py
  • python/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.py
  • python/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 under tests/adapters, then run just test-python.

Files:

  • tests/adapters/test_hermes_adapter.py
skills/**

📄 CodeRabbit inference engine (AGENTS.md)

skills/**: Keep consumer skills under skills/ 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.md
  • skills/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 least name and description.
Maintainer skills may reference repository internals, build and test commands, and contribution workflows, but external usage guidance must remain in the top-level skills/ 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.mdx
  • docs/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.mdx current 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.py
  • python/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! Verified Python::attach is the current PyO3 API (renamed, behavior-identical to with_gil), and the JSON payload shape matches the Python-side parser in runtime.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 & Availability

No change needed.

Comment thread adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
Comment thread crates/fabric-core/src/error.rs Outdated
Comment thread tests/adapters/test_hermes_adapter.py Outdated
Comment thread tests/python/test_runtime.py Outdated
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
@bbednarski9
bbednarski9 force-pushed the fix/hermes-incomplete-result-status branch from 6f25cfd to cd86bc5 Compare July 29, 2026 21:11
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 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

📥 Commits

Reviewing files that changed from the base of the PR and between cd86bc5 and a8e01ed.

📒 Files selected for processing (2)
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • tests/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.py
  • tests/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 spell NVIDIA in all caps; do not use Nvidia, nvidia, nVidia, nVIDIA, or NV.
Use an NVIDIA before a noun, because the name begins with an “en” sound.
Do not add a registered trademark symbol after NVIDIA when referring to the company; use trademark symbols with product names only when required by the document type or legal guidance.
Verify official capitalization, spacing, hyphenation, and spelling for NVIDIA and third-party product names; do not rewrite official product names for grammar or title-case rules.
Precede NVIDIA product names with NVIDIA on first mention when natural and accurate, and link the first mention when the destination helps the reader.
On first use, include the company name and full model qualifier when it helps identify the model; preserve official capitalization and punctuation, and use shorter family names only after establishing the full name.
For learning-oriented and developer content, do not force trademark symbols unless explicitly required; for press, ...

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • tests/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}: Use snake_case for functions and variables; use PascalCase for 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.py
  • tests/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.py
  • tests/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 in just test-rust pass and review generated schema diffs.
For schema or public contract changes, run both language suites and review changes under schemas/ and generated API references.

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • tests/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, then just test-python; rebuild with just build-python when native code or packaging changes.

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • tests/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 in python/pyproject.toml.

Files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • tests/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.py
  • tests/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.py
  • tests/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.py
  • tests/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.py
  • tests/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 python or process runner 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> with LICENSE -> ../../LICENSE, README.md, fabric-adapter.json, language-native package and lock files, a source entry point, and focused tests; Python adapters use the specified pyproject.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; treat config, capability_plan, telemetry_plan, and runtime_context as authoritative, reserving harness.settings for harness-specific behavior.
Apply precedence in this order: normalized config, 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 ordered startinvoke*stop; emit one JSON lifecycle response per request on stdout and diagnostics on stderr.
Return harness-level invoke failures in a successful lifecycle response with response: null, failed: true, and structured error containing code, message, retryable, and optional metadata.
Do not emit NeMo Relay stream records on adapter stdout; 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: emit response and adapter-specific extensions such as error, harness events, 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.py
  • tests/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 under tests/adapters, then run just 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.asyncio to tests; async tests are automatically detected and run by the async runner.
Do not add -> None return type annotations to test functions.
When mocking a class, use unittest.mock.MagicMock or unittest.mock.AsyncMock, using the spec argument when necessary, rather than defining a new class.
Prefix mocked class names with mock, not fake.
Prefer pytest fixtures over helper methods.
Do not repeat fixtures; place fixtures needed by multiple test files in conftest.py.
Define fixtures using @pytest.fixture(name="<fixture_name>"[, scope="<scope>"]) and a function named <fixture_name>_fixture; specify scope only when it is not function.
Prefer pytest.mark.parametrize over separate tests for different input types.
Use @pytest.mark.usefixtures when a fixture is needed but its return value is unused or it does not return a value.
Use the autouse restore_environ_fixture from tests/conftest.py to restore environment variables; modify variables with os.environ and do not use monkeypatch.setenv.
Avoid defensive programming in tests; access expected data directly so missing data raises a clear failure, such as using results["data"] instead of results.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!

Comment thread tests/adapters/test_hermes_adapter.py Outdated
Comment thread tests/adapters/test_hermes_adapter.py
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant