Skip to content

feat: normalize portable adapter configuration#117

Open
AjayThorve wants to merge 9 commits into
NVIDIA:mainfrom
AjayThorve:feat/normalize-adapter-config
Open

feat: normalize portable adapter configuration#117
AjayThorve wants to merge 9 commits into
NVIDIA:mainfrom
AjayThorve:feat/normalize-adapter-config

Conversation

@AjayThorve

@AjayThorve AjayThorve commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Overview

Promote portable agent configuration into the typed FabricConfig contract and
map that contract consistently across Claude, Codex, Deep Agents, and Hermes.

This change:

  • adds typed system_prompt, max_turns, models.<role>.base_url,
    runtime.timeout_seconds, environment.env, and distinct tool/toolset policy;
  • makes adapter config.accepts a typed, fail-closed compatibility declaration;
  • preserves native Anthropic and OpenAI authentication while allowing explicitly
    configured Anthropic Messages-compatible and Responses-compatible providers;
  • routes explicit Claude and Codex model endpoints through the persistent NeMo
    Relay gateway as the selected upstream;
  • updates CLI presets/scaffolds, the Python SDK, Harbor integration, schemas,
    examples, consumer guidance, adapter docs, and generated API references; and
  • keeps harness launch details and other adapter-only controls in
    harness.settings.

Custom Claude, Codex, and non-native Deep Agents providers must set both
models.<role>.api_key_env and models.<role>.base_url; NeMo Fabric no longer
invents an NVIDIA endpoint or credential default in shared adapter code. The
maintained NVIDIA presets already provide both values.

Centralized role selection and adapter/model compatibility remain follow-up work
under FABRIC-64. This PR removes adapter identity allowlists; it does not add a
portable model-protocol field.

Details

Core means NeMo Fabric owns the behavior and applies it uniformly before or
around adapter execution. Yes means the adapter translates the portable field
into its harness. No means an explicitly configured value fails planning
instead of being ignored.

FabricConfig field Claude Codex Deep Agents Hermes Agent
schema_version Core Core Core Core
metadata.name, .description Core Core Core Core
harness.adapter_id, .resolution Core Core Core Core
harness.settings Adapter-owned escape hatch Adapter-owned escape hatch Adapter-owned escape hatch Adapter-owned escape hatch
models.<role>.provider anthropic uses native auth; custom names require an Anthropic Messages-compatible endpoint openai uses native auth; custom names require a Responses-compatible endpoint Dynamic LangChain provider Dynamic Hermes provider
models.<role>.model Yes Yes Yes Yes
models.<role>.api_key_env Yes Yes Yes Yes
models.<role>.base_url Yes Yes Yes Yes
models.<role>.temperature No No Yes Yes
models.<role>.settings.<key> No keys declared No keys declared No keys declared No keys declared
system_prompt Yes Yes; maps to Codex base instructions Yes Yes
max_turns Yes No No Yes; maps to Hermes iterations
runtime.input_schema, .output_schema Core Core Core Core
runtime.artifacts, .timeout_seconds Core Core Core Core
environment.provider, .control_location, .ownership Core Core Core Core
environment.workspace, .artifacts, .env Core Core Core Core
environment.connection, .metadata, .settings Environment-provider-owned Environment-provider-owned Environment-provider-owned Environment-provider-owned
tools.blocked Yes No Yes No
tools.toolsets.enabled, .blocked No No No Yes
skills.paths Yes Yes Yes Yes
mcp.servers.<name>.transport, .url with harness_native exposure Yes Yes Yes Yes
mcp.servers.<name>.exposure = "fabric_managed" No; not implemented No; not implemented No; not implemented No; not implemented
telemetry.providers.relay Yes Yes Yes Yes
telemetry.providers.native No Yes; OpenTelemetry Yes; OpenTelemetry and OpenInference No
telemetry.providers.<provider>.config Declared-provider pass-through Declared-provider pass-through Declared-provider pass-through Declared-provider pass-through
relay.project, .output_dir, .observability Yes Yes Yes Yes
relay.components, .policy Yes Yes Yes Yes
Additive extensions on typed config objects Preserved; no portable adapter semantics Preserved; no portable adapter semantics Preserved; no portable adapter semantics Preserved; no portable adapter semantics

The review follow-up also rejects conflicting Claude model/environment
declarations, fixes Hermes local-terminal enforcement, removes the incorrect
static Hermes NVIDIA credential requirement, makes toolset semantics explicit,
and keeps request context invocation-scoped.

Validation

  • RUSTUP_TOOLCHAIN=1.94.0 just test-rust — passed: 51 tests.
  • just test-python — passed: 403 passed, 45 skipped.
  • Focused common/Claude/Codex/Deep Agents/Hermes adapter tests — passed:
    182 passed, 24 skipped.
  • RUSTUP_TOOLCHAIN=1.94.0 just docs — generated references and strict
    documentation checks passed. Fern redirect validation was skipped because
    this machine is not authenticated to Fern.
  • Started and health-checked the installed nemo-relay 0.6.0 gateway with
    explicit OpenAI and Anthropic upstream flags, then stopped it cleanly.
  • Ruff formatting/lint, cargo fmt --all -- --check, just --fmt --check, and
    git diff --check — passed.

Where should the reviewer start?

Start with crates/fabric-core/src/config.rs for field ownership and fail-closed
planning. Then review
adapters/common/src/nemo_fabric_adapters/common/relay_gateway.py and the Claude
and Codex adapters for the native-versus-custom provider and Relay-upstream
boundary. The canonical support matrix is in docs/sdk/python.mdx and
adapters/README.md.

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

  • Closes FABRIC-131

  • Relates to FABRIC-64

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

@AjayThorve
AjayThorve requested review from a team as code owners July 24, 2026 08:36
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

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

Use the following commands to manage reviews:

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

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

FabricConfig now carries typed model endpoints, prompts, turn limits, timeouts, environment variables, and toolset policies. Planning validates adapter-declared support and reports compatibility errors. Claude, Codex, Deep Agents, Hermes, SDK integrations, runtime propagation, schemas, tests, and documentation consume the updated contract.

Changes

Normalized configuration pipeline

Layer / File(s) Summary
Typed configuration and compatibility planning
crates/fabric-core/..., schemas/...
Adds normalized fields, typed adapter capability declarations, toolset policies, validation, run-plan propagation, and compatibility errors.
Runtime propagation and enforcement
crates/fabric-core/src/runtime.rs, crates/fabric-core/src/schema.rs
Propagates configured environment variables, applies invocation timeouts, validates unsupported adapter routes, and updates runtime bindings.
Adapter mappings and normalized accessors
adapters/common/..., adapters/{claude,codex,deepagents,hermes}/...
Moves model, prompt, timeout, environment, and toolset sourcing to normalized payload fields and removes obsolete harness-setting paths.
SDK integrations and validation
python/..., crates/fabric-cli/..., tests/...
Updates typed Python models, Harbor configuration, scaffolding, examples, fixtures, adapter tests, SDK tests, and end-to-end tests.
Documentation and generated references
README.md, adapters/..., docs/..., skills/...
Documents field compatibility, tool blocking versus toolsets, adapter ownership, new APIs, and regenerated Rust/Python references.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant FabricConfig
  participant Planner
  participant AdapterDescriptor
  participant Runtime
  participant Harness
  FabricConfig->>Planner: configure normalized fields and tool policies
  Planner->>AdapterDescriptor: inspect accepted AdapterConfigField values
  AdapterDescriptor-->>Planner: return adapter capability support
  Planner->>Runtime: produce compatible run plan
  Runtime->>Harness: pass environment, timeout, model, prompt, and toolset state
  Harness-->>Runtime: execute invocation
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 30.23% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title follows Conventional Commits and accurately summarizes the main change to portable adapter configuration.
Description check ✅ Passed The description includes the required Overview, reviewer-start, related-issues, and confirmation sections, with substantive details and validation.
✨ 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

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

Caution

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

⚠️ Outside diff range comments (2)
crates/fabric-cli/src/scaffold.rs (1)

417-433: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Cover the newly rendered normalized fields.

This test only checks temperature and base_url; set system_prompt, max_turns, runtime.timeout_seconds, and environment.env, then assert both generated launchers preserve them. As per coding guidelines, “Run tests for every affected language surface.”

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

In `@crates/fabric-cli/src/scaffold.rs` around lines 417 - 433, Extend
renderers_preserve_model_base_url_and_temperature by setting system_prompt,
max_turns, runtime.timeout_seconds, and environment.env on the configuration,
then assert the generated Python and Rust launchers contain each normalized
field with its expected value. Run the relevant tests for both affected language
renderers.

Source: Coding guidelines

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

328-334: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Align the fallback state path with the root-based layout

state_dir() returns <root>/.fabric/deepagents when artifacts.root/FABRIC_ARTIFACTS is set, but falls back to <base_dir>/artifacts/deepagents/.fabric otherwise. That swaps the .fabric and deepagents segments, so persisted checkpointer files land in different layouts depending on config. Make the fallback mirror the root branch (<base_dir>/artifacts/.fabric/deepagents).

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

In `@adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py` around
lines 328 - 334, The fallback branch in state_dir must match the root-based
layout: change its returned path to place .fabric before deepagents, yielding
<base_dir>/artifacts/.fabric/deepagents. Leave the artifacts.root and
FABRIC_ARTIFACTS branch unchanged.
🤖 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/README.md`:
- Line 64: Update the user-facing prose in the Core definition to use “NVIDIA
NeMo Fabric” on first reference and “NeMo Fabric” thereafter, replacing the
standalone product reference “Fabric” while preserving the sentence’s meaning.

In `@crates/fabric-cli/src/examples.rs`:
- Around line 139-144: Update the example configuration logic around the
preset.name check so the default scripted variant also sets config.skills to
reference skills/code-review.md, ensuring the staged skill is used. Preserve the
existing SkillConfig paths and extensions values, and update any related example
metadata or tests only if needed to reflect this behavior.

In `@docs/sdk/python.mdx`:
- Around line 240-245: Replace the combined capability_config example with
separate adapter-specific examples: one demonstrating tools.blocked for Claude
and Deep Agents, and another demonstrating tools.toolsets for Hermes. Ensure
each example uses only the policy fields supported by its adapter and does not
combine blocked tools with toolsets.

In `@examples/harbor/README.md`:
- Around line 80-88: Update the field-mapping table in the README to use the
canonical FabricConfig paths: models.default.base_url, system_prompt, max_turns,
runtime.timeout_seconds, environment.env, tools.blocked, tools.toolsets.enabled,
tools.toolsets.blocked, and harness.settings. Replace the current descriptive
labels, remove the duplicate fabric_blocked_tools row, and retain one row per
field.

In `@python/src/nemo_fabric/models.py`:
- Line 114: Update the timeout_seconds field constraint in the model to reject
non-finite values such as positive infinity while retaining the existing
requirement that values be greater than zero. Use the model’s supported
finite-float constraint or add an isfinite() validator associated with
timeout_seconds.

In `@tests/e2e/test_codex.py`:
- Line 42: Preserve the custom Relay command in the _run_relay flow by passing
the resolved FABRIC_TEST_NEMO_RELAY_COMMAND value into with_relay or assigning
it to config.harness.settings["nemo_relay_command"] before runtime execution.
Ensure the adapter-owned harness setting remains unchanged and is not silently
discarded.

In `@tests/python/test_sdk_contract.py`:
- Around line 253-266: Update the ValidationError match in the FabricConfig test
to use a raw regex that escapes the dots and targets the emitted
models.<role>.settings.base_url path, such as the requested escaped pattern;
leave the test setup and validation behavior unchanged.

---

Outside diff comments:
In `@adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py`:
- Around line 328-334: The fallback branch in state_dir must match the
root-based layout: change its returned path to place .fabric before deepagents,
yielding <base_dir>/artifacts/.fabric/deepagents. Leave the artifacts.root and
FABRIC_ARTIFACTS branch unchanged.

In `@crates/fabric-cli/src/scaffold.rs`:
- Around line 417-433: Extend renderers_preserve_model_base_url_and_temperature
by setting system_prompt, max_turns, runtime.timeout_seconds, and
environment.env on the configuration, then assert the generated Python and Rust
launchers contain each normalized field with its expected value. Run the
relevant tests for both affected language renderers.
🪄 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: 4b312b67-42b5-48b4-9470-09325d7915c0

📥 Commits

Reviewing files that changed from the base of the PR and between c8bc400 and 949ad5a.

📒 Files selected for processing (130)
  • README.md
  • adapters/README.md
  • adapters/claude/README.md
  • adapters/claude/fabric-adapter.json
  • adapters/claude/src/nemo_fabric_adapters/claude/adapter.py
  • adapters/codex/README.md
  • adapters/codex/fabric-adapter.json
  • adapters/codex/src/nemo_fabric_adapters/codex/adapter.py
  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • adapters/deepagents/README.md
  • adapters/deepagents/fabric-adapter.json
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
  • adapters/hermes/README.md
  • adapters/hermes/fabric-adapter.json
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • crates/fabric-cli/assets/adapters/claude/fabric-adapter.json
  • crates/fabric-cli/assets/adapters/codex/fabric-adapter.json
  • crates/fabric-cli/assets/adapters/deepagents/fabric-adapter.json
  • crates/fabric-cli/assets/adapters/hermes/fabric-adapter.json
  • crates/fabric-cli/src/examples.rs
  • crates/fabric-cli/src/presets.rs
  • crates/fabric-cli/src/scaffold.rs
  • crates/fabric-cli/templates/python/main.py.tmpl
  • crates/fabric-cli/templates/rust/main.rs.tmpl
  • crates/fabric-core/src/config.rs
  • crates/fabric-core/src/error.rs
  • crates/fabric-core/src/lib.rs
  • crates/fabric-core/src/runtime.rs
  • docs/getting-started/quickstart.mdx
  • docs/integrations/claude.mdx
  • docs/integrations/codex.mdx
  • docs/reference/api/python-library-reference/index.md
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/reference/api/python-library-reference/nemo_fabric.models.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterdescriptorsource.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterkind.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-capabilitykind.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-capabilitytarget.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-controllocation.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-environmentownership.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-mcpexposure.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatifstorageconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatofendpointfieldnamepolicy.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatofendpointtransport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatofmode.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayotlptransport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayunsupportedbehavior.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-resolutionstrategy.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-telemetryprovider.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/fn-load-adapter-descriptor.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/fn-resolve-run-plan-from-config.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterconfigsupport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterdescriptor.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterrequirements.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adaptertelemetryprovidersupport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adaptertelemetrysupport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-capabilityplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-environmentconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-environmentplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-fabricconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-harnessconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-mcpconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-mcpserverplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-metadataconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-modelconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-resolvecontext.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-resolvedadapterdescriptor.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-runplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-runtimecapabilities.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-runtimeconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-skillconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-telemetryconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-telemetryplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-telemetryproviderconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsetconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/enum-doctorstatus.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/fn-doctor-plan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/struct-doctorcheck.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/struct-doctorreport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/error/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/error/type-result.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/fn-version.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/runtime/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/runtime/struct-environmenthandle.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/schema/index.mdx
  • docs/sdk/python.mdx
  • examples/code_review_agent/config.py
  • examples/harbor/README.md
  • examples/harbor/calculator/README.md
  • examples/harbor/swebench/README.md
  • examples/harbor/swebench/adapters/claude/fabric-adapter.json
  • examples/harbor/swebench/adapters/hermes/fabric-adapter.json
  • examples/notebooks/01_quickstart.ipynb
  • python/src/nemo_fabric/__init__.py
  • python/src/nemo_fabric/integrations/harbor/fabric_agent.py
  • python/src/nemo_fabric/models.py
  • python/src/nemo_fabric/types.py
  • schemas/adapter-descriptor.schema.json
  • schemas/adapter-invocation.schema.json
  • schemas/agent.schema.json
  • schemas/environment-handle.schema.json
  • schemas/run-plan.schema.json
  • schemas/runtime-context.schema.json
  • schemas/runtime-handle.schema.json
  • skills/nemo-fabric-integrate/SKILL.md
  • skills/nemo-fabric-integrate/references/config-mapping.md
  • tests/_utils/configs.py
  • tests/adapters/test_adapaters_common_utils.py
  • tests/adapters/test_claude_adapter.py
  • tests/adapters/test_codex_adapter.py
  • tests/adapters/test_deepagents.py
  • tests/adapters/test_hermes_adapter.py
  • tests/e2e/test_claude.py
  • tests/e2e/test_codex.py
  • tests/e2e/test_deepagents.py
  • tests/e2e/test_hermes_config_mapping.py
  • tests/e2e/test_hermes_e2e.py
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/fabric-adapter.json
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py
  • tests/integrations/test_harbor_runner.py
  • tests/python/test_native_sdk.py
  • tests/python/test_sdk_contract.py
  • tests/python/test_typed_config.py

Comment thread adapters/README.md Outdated
Comment thread crates/fabric-cli/src/examples.rs
Comment thread docs/sdk/python.mdx Outdated
Comment thread examples/harbor/README.md Outdated
Comment thread python/src/nemo_fabric/models.py Outdated
Comment thread tests/e2e/test_codex.py Outdated
Comment thread tests/python/test_sdk_contract.py Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

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

⚠️ Outside diff range comments (4)
adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py (2)

278-278: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Force the terminal environment to local.

setdefault does not enforce "local": an inherited or normalized TERMINAL_ENV=remote remains active. Because environment.env is forwarded to the adapter host, this can bypass the adapter’s local-only terminal boundary. Assign the value unconditionally or reject conflicting environment keys.

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

In `@adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py` at line 278,
Update the environment construction near the "local" terminal setting to
unconditionally assign TERMINAL_ENV as "local" rather than using setdefault,
ensuring inherited or normalized remote values cannot reach the adapter host.

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

Remove the legacy harness.settings.cwd fallback.

The terminal configuration still falls back to self._settings["cwd"] when no normalized environment workspace is present. That preserves an unsupported adapter-specific override and can resolve the same configuration to different working directories across adapters. Use only the resolved config-root-relative workspace or a fixed config-root-relative default, and reject cwd at the settings boundary.

As per path instructions, normalized configuration and resolved runtime context are authoritative; harness settings are reserved for harness-specific behavior.

Based on learnings, harness.settings.cwd is explicitly unsupported and adapter paths must remain config-root-relative.

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

In `@adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py` around lines 120
- 127, Update the terminal configuration construction near the "terminal"
mapping to remove any fallback to self._settings["cwd"]; derive cwd only from
the normalized environment workspace or the fixed config-root-relative default.
Also reject the cwd key at the harness settings boundary so unsupported
adapter-specific overrides cannot influence runtime paths.

Sources: Path instructions, Learnings

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

1067-1156: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Reject malformed environment entries before spawn. environment.env only blocks empty keys; runtime.rs forwards the map straight into Command::envs, so NUL-containing names or values can still fail the adapter host at spawn time. Add InvalidConfig checks for names and values and a regression test.

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

In `@crates/fabric-core/src/config.rs` around lines 1067 - 1156, Extend
environment validation in the config validation function’s environment.env loop
to reject names and values containing NUL bytes before they reach Command::envs.
Return InvalidConfig identifying environment.env and the offending entry, while
preserving the existing empty-name validation; add a regression test covering
malformed names and values.
docs/reference/api/python-library-reference/nemo_fabric.models.md (1)

1507-1512: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use the required NeMo Fabric product name in this generated prose.

Lines 1509-1511 use standalone capitalized Fabric for the product. Update the source docstring to use NVIDIA NeMo Fabric on first use and NeMo Fabric thereafter, then regenerate this page instead of editing generated output directly.

As per path instructions, documentation must use the full product name on first use and generated API pages must be regenerated from their source.

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

In `@docs/reference/api/python-library-reference/nemo_fabric.models.md` around
lines 1507 - 1512, Update the FabricConfig source docstring so the first product
reference uses “NVIDIA NeMo Fabric” and subsequent references use “NeMo Fabric”;
then regenerate the API reference page from its source rather than editing the
generated output directly.

Source: Path instructions

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

Inline comments:
In
`@docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx`:
- Line 4: Update the source Rust documentation comment for AdapterConfigField so
its first product-name usage is “NVIDIA NeMo Fabric,” then regenerate the
corresponding API documentation with `just docs`; do not edit the generated
files under docs/reference/api directly.

---

Outside diff comments:
In `@adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py`:
- Line 278: Update the environment construction near the "local" terminal
setting to unconditionally assign TERMINAL_ENV as "local" rather than using
setdefault, ensuring inherited or normalized remote values cannot reach the
adapter host.
- Around line 120-127: Update the terminal configuration construction near the
"terminal" mapping to remove any fallback to self._settings["cwd"]; derive cwd
only from the normalized environment workspace or the fixed config-root-relative
default. Also reject the cwd key at the harness settings boundary so unsupported
adapter-specific overrides cannot influence runtime paths.

In `@crates/fabric-core/src/config.rs`:
- Around line 1067-1156: Extend environment validation in the config validation
function’s environment.env loop to reject names and values containing NUL bytes
before they reach Command::envs. Return InvalidConfig identifying
environment.env and the offending entry, while preserving the existing
empty-name validation; add a regression test covering malformed names and
values.

In `@docs/reference/api/python-library-reference/nemo_fabric.models.md`:
- Around line 1507-1512: Update the FabricConfig source docstring so the first
product reference uses “NVIDIA NeMo Fabric” and subsequent references use “NeMo
Fabric”; then regenerate the API reference page from its source rather than
editing the generated output directly.
🪄 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: 1183b192-f685-4f86-9c16-2fe191744d5b

📥 Commits

Reviewing files that changed from the base of the PR and between 949ad5a and e5ebf04.

📒 Files selected for processing (25)
  • adapters/README.md
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • crates/fabric-cli/src/examples.rs
  • crates/fabric-core/src/config.rs
  • crates/fabric-core/src/runtime.rs
  • crates/fabric-core/src/schema.rs
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/reference/api/python-library-reference/nemo_fabric.errors.md
  • docs/reference/api/python-library-reference/nemo_fabric.models.md
  • docs/reference/api/python-library-reference/nemo_fabric.runtime.md
  • docs/reference/api/python-library-reference/nemo_fabric.types.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterconfigsupport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-fabricconfig.mdx
  • docs/sdk/python.mdx
  • examples/harbor/README.md
  • python/src/nemo_fabric/models.py
  • schemas/adapter-descriptor.schema.json
  • schemas/agent.schema.json
  • schemas/run-plan.schema.json
  • scripts/generate_api_docs.sh
  • tests/adapters/test_hermes_adapter.py
  • tests/e2e/test_codex.py
  • tests/python/test_sdk_contract.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (45)
**/*.{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:

  • examples/harbor/README.md
  • docs/reference/api/python-library-reference/nemo_fabric.runtime.md
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/reference/api/python-library-reference/nemo_fabric.errors.md
  • docs/reference/api/python-library-reference/nemo_fabric.types.md
  • adapters/README.md
  • docs/reference/api/python-library-reference/nemo_fabric.models.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:

  • examples/harbor/README.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-fabricconfig.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.runtime.md
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterconfigsupport.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.errors.md
  • docs/reference/api/python-library-reference/nemo_fabric.types.md
  • docs/sdk/python.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.models.md
{docs/**/*.{md,mdx,yml},examples/**/*.{md,mdx,yml}}

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

Update relevant getting-started, reference, adapter, and example documentation when the corresponding examples or adapters change.

Files:

  • examples/harbor/README.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-fabricconfig.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.runtime.md
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterconfigsupport.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.errors.md
  • docs/reference/api/python-library-reference/nemo_fabric.types.md
  • docs/sdk/python.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.models.md
**/*

📄 CodeRabbit inference engine (.agents/skills/karpathy-guidelines/SKILL.md)

**/*: Before implementing, explicitly state assumptions, surface ambiguity and tradeoffs, present multiple interpretations when relevant, and ask for clarification rather than silently deciding or proceeding when requirements are unclear.
Prefer the minimum code needed to solve the requested problem: avoid speculative features, unnecessary abstractions, unrequested flexibility, and handling of impossible scenarios; simplify overcomplicated solutions.
When editing existing code, make surgical changes only: do not modify unrelated code, comments, formatting, or pre-existing dead code; match the existing style, and remove only unused imports, variables, or functions introduced by your changes.
Define verifiable success criteria for each task, such as writing regression tests for bugs and invalid-input tests for validation, then verify the implementation against those criteria. For multi-step work, state a brief plan with a verification check for each step.

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

Files:

  • examples/harbor/README.md
  • scripts/generate_api_docs.sh
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-fabricconfig.mdx
  • schemas/adapter-descriptor.schema.json
  • docs/reference/api/python-library-reference/nemo_fabric.runtime.md
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • crates/fabric-cli/src/examples.rs
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterconfigsupport.mdx
  • crates/fabric-core/src/schema.rs
  • docs/reference/api/python-library-reference/nemo_fabric.errors.md
  • tests/e2e/test_codex.py
  • docs/reference/api/python-library-reference/nemo_fabric.types.md
  • docs/sdk/python.mdx
  • tests/python/test_sdk_contract.py
  • schemas/agent.schema.json
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • adapters/README.md
  • python/src/nemo_fabric/models.py
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • tests/adapters/test_hermes_adapter.py
  • schemas/run-plan.schema.json
  • docs/reference/api/python-library-reference/nemo_fabric.models.md
  • crates/fabric-core/src/config.rs
  • 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:

  • examples/harbor/README.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-fabricconfig.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.runtime.md
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterconfigsupport.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.errors.md
  • docs/reference/api/python-library-reference/nemo_fabric.types.md
  • docs/sdk/python.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • adapters/README.md
  • docs/reference/api/python-library-reference/nemo_fabric.models.md
**/*.{md,rst,txt,adoc}

📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-language-mechanics.md)

**/*.{md,rst,txt,adoc}: For technical documentation, use professional, active, conversational, engaging, precise, and plain-English prose. Prefer active voice, present tense, short sentences, and scannable paragraphs. Avoid casual or imprecise language, swearing, threats, insults, jokes, puns, culture-specific idioms, marketing exaggeration, and unsupported third-party comparisons.
Use can for possibility and reserve may for permission; use after for temporal order; use refer to for cross-references; prefer short direct sentences and specific verbs; avoid unnecessary please in technical documentation.
Prefer active voice when the actor matters. Passive voice is acceptable when the actor is unknown or irrelevant, when the action or result is the focus, or in programmer documentation.
Use natural contractions in conversational technical prose, but do not force them in formal legal copy, API references, or generated text.
Prefer simpler English over Latinisms: use for example or such as instead of e.g., and so on instead of etc., that is instead of i.e., compared to instead of vs., and by, through, or using instead of via. Use industry-standard terms such as in silico, in vitro, and in vivo when appropriate, and italicize them in running text.
Use that without commas for essential clauses, and which with commas for nonessential clauses.
Format dates and times clearly: spell out months in body text; use forms such as June 12, 2025; avoid numeric or ordinal dates; capitalize days; use 12-hour time when appropriate; include a space before a.m. or p.m.; use ET and PT for needed time zones; avoid 24/7; and prefer from 12:30 to 1:00 p.m. for prose ranges.
Format numbers consistently: spell out zero through nine in body text, use numerals for 10 or greater and for technical values, use commas in thousands, do not begin a sentence with a numeral, spell out ordinals, and use numerals consistently within a category wh...

Files:

  • examples/harbor/README.md
  • docs/reference/api/python-library-reference/nemo_fabric.runtime.md
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/reference/api/python-library-reference/nemo_fabric.errors.md
  • docs/reference/api/python-library-reference/nemo_fabric.types.md
  • adapters/README.md
  • docs/reference/api/python-library-reference/nemo_fabric.models.md
**/README.md

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

Update relevant package, crate, adapter, and integration README files when public behavior or entry-point documentation changes.

Files:

  • examples/harbor/README.md
  • adapters/README.md
**/*.{md,mdx}

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

**/*.{md,mdx}: Use the full product name NVIDIA NeMo Fabric on 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.

Update corresponding documentation when public behavior, adapters, examples, or workspace structure changes.

Files:

  • examples/harbor/README.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-fabricconfig.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.runtime.md
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterconfigsupport.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.errors.md
  • docs/reference/api/python-library-reference/nemo_fabric.types.md
  • docs/sdk/python.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • adapters/README.md
  • docs/reference/api/python-library-reference/nemo_fabric.models.md
**/*.md

📄 CodeRabbit inference engine (CONTRIBUTING.md)

HTML/Markdown source files must use the specified HTML-comment SPDX header format.

Files:

  • examples/harbor/README.md
  • docs/reference/api/python-library-reference/nemo_fabric.runtime.md
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/reference/api/python-library-reference/nemo_fabric.errors.md
  • docs/reference/api/python-library-reference/nemo_fabric.types.md
  • adapters/README.md
  • docs/reference/api/python-library-reference/nemo_fabric.models.md
**/*.{py,toml,lock,json,md,yml,yaml}

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

Keep package wiring, descriptors, dependencies, installation, catalogs, CI enumerations, documentation, examples, fixtures, and generated artifacts consistent with the adapter implementation.

Files:

  • examples/harbor/README.md
  • schemas/adapter-descriptor.schema.json
  • docs/reference/api/python-library-reference/nemo_fabric.runtime.md
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/reference/api/python-library-reference/nemo_fabric.errors.md
  • tests/e2e/test_codex.py
  • docs/reference/api/python-library-reference/nemo_fabric.types.md
  • tests/python/test_sdk_contract.py
  • schemas/agent.schema.json
  • adapters/README.md
  • python/src/nemo_fabric/models.py
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • tests/adapters/test_hermes_adapter.py
  • schemas/run-plan.schema.json
  • docs/reference/api/python-library-reference/nemo_fabric.models.md
{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:

  • examples/harbor/README.md
  • adapters/README.md
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
{*.md,**/*.md,**/*.mdx,**/*.ipynb}

⚙️ CodeRabbit configuration file

{*.md,**/*.md,**/*.mdx,**/*.ipynb}: Enforce the product name in user-facing prose: use "NVIDIA NeMo Fabric" on first use and "NeMo Fabric" thereafter. Flag standalone capitalized "Fabric" when it refers to the product. Do not flag the lowercase fabric CLI command, package/import/crate names, code identifiers, API symbols, configuration keys, file paths, or unrelated generic uses of the word.

Files:

  • examples/harbor/README.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-fabricconfig.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.runtime.md
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterconfigsupport.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.errors.md
  • docs/reference/api/python-library-reference/nemo_fabric.types.md
  • docs/sdk/python.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • adapters/README.md
  • docs/reference/api/python-library-reference/nemo_fabric.models.md
scripts/generate_api_docs.sh

📄 CodeRabbit inference engine (AGENTS.md)

Keep the stable public wrapper scripts/generate_api_docs.sh at the scripts/ root and reference it in docs and examples; use namespaced paths under scripts/docs/ only for internal maintenance documentation.

For Python API reference changes, update scripts/generate_api_docs.sh when the generator itself requires changes.

Files:

  • scripts/generate_api_docs.sh
**/*.{toml,yaml,yml,sh,bash}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

TOML, YAML, and shell source files must use the specified # SPDX header format.

Files:

  • scripts/generate_api_docs.sh
**/*.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.

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

Files:

  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-fabricconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterconfigsupport.mdx
  • docs/sdk/python.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.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/rust-library-reference/nemo-fabric-core/config/struct-fabricconfig.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.runtime.md
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterconfigsupport.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.errors.md
  • docs/reference/api/python-library-reference/nemo_fabric.types.md
  • docs/sdk/python.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.models.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/rust-library-reference/nemo-fabric-core/config/struct-fabricconfig.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.runtime.md
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterconfigsupport.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.errors.md
  • docs/reference/api/python-library-reference/nemo_fabric.types.md
  • docs/sdk/python.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.models.md
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/rust-library-reference/nemo-fabric-core/config/struct-fabricconfig.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.runtime.md
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterconfigsupport.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.errors.md
  • docs/reference/api/python-library-reference/nemo_fabric.types.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.models.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.

Files:

  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-fabricconfig.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.runtime.md
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterconfigsupport.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.errors.md
  • docs/reference/api/python-library-reference/nemo_fabric.types.md
  • docs/sdk/python.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/python-library-reference/nemo_fabric.models.md
**/*.{rs,py,pyi,json,yaml,yml}

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

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

Files:

  • schemas/adapter-descriptor.schema.json
  • crates/fabric-cli/src/examples.rs
  • crates/fabric-core/src/schema.rs
  • tests/e2e/test_codex.py
  • tests/python/test_sdk_contract.py
  • schemas/agent.schema.json
  • python/src/nemo_fabric/models.py
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • tests/adapters/test_hermes_adapter.py
  • schemas/run-plan.schema.json
  • crates/fabric-core/src/config.rs
  • crates/fabric-core/src/runtime.rs
**/*.{json,jsonschema}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Keep checked-in JSON Schema snapshots synchronized with public contract changes.

Files:

  • schemas/adapter-descriptor.schema.json
  • schemas/agent.schema.json
  • schemas/run-plan.schema.json
schemas/**/*

⚙️ CodeRabbit configuration file

schemas/**/*: Schemas are generated public contract snapshots. Check that schema diffs correspond to intentional Rust type changes and are covered by core tests.

Files:

  • schemas/adapter-descriptor.schema.json
  • schemas/agent.schema.json
  • schemas/run-plan.schema.json
**/*.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 and ensure cargo fmt --all -- --check passes.
Run cargo check --workspace --locked when changing the Rust core, CLI, or native Python extension.
Rust files must use the specified Rust // SPDX header format.

Files:

  • crates/fabric-cli/src/examples.rs
  • crates/fabric-core/src/schema.rs
  • crates/fabric-core/src/config.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-cli/src/examples.rs
  • crates/fabric-core/src/schema.rs
  • crates/fabric-core/src/config.rs
  • 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}: Use snake_case for functions and variables; use PascalCase for Rust types and Python classes.
Run tests for every affected language surface; changes to the Rust core or public schemas require both Rust and Python test suites.
Keep native Python binding declarations synchronized with their Rust implementations when public contracts change.

Files:

  • crates/fabric-cli/src/examples.rs
  • crates/fabric-core/src/schema.rs
  • tests/e2e/test_codex.py
  • tests/python/test_sdk_contract.py
  • python/src/nemo_fabric/models.py
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • tests/adapters/test_hermes_adapter.py
  • crates/fabric-core/src/config.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-cli/src/examples.rs
  • crates/fabric-core/src/schema.rs
  • crates/fabric-core/src/config.rs
  • crates/fabric-core/src/runtime.rs
**/*.{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:

  • crates/fabric-cli/src/examples.rs
  • crates/fabric-core/src/schema.rs
  • tests/e2e/test_codex.py
  • tests/python/test_sdk_contract.py
  • python/src/nemo_fabric/models.py
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • tests/adapters/test_hermes_adapter.py
  • crates/fabric-core/src/config.rs
  • 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:

  • crates/fabric-cli/src/examples.rs
  • crates/fabric-core/src/schema.rs
  • tests/e2e/test_codex.py
  • tests/python/test_sdk_contract.py
  • python/src/nemo_fabric/models.py
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • tests/adapters/test_hermes_adapter.py
  • crates/fabric-core/src/config.rs
  • 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:

  • crates/fabric-cli/src/examples.rs
  • crates/fabric-core/src/schema.rs
  • tests/e2e/test_codex.py
  • tests/python/test_sdk_contract.py
  • python/src/nemo_fabric/models.py
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • tests/adapters/test_hermes_adapter.py
  • crates/fabric-core/src/config.rs
  • 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:

  • crates/fabric-cli/src/examples.rs
  • crates/fabric-core/src/schema.rs
  • tests/e2e/test_codex.py
  • tests/python/test_sdk_contract.py
  • python/src/nemo_fabric/models.py
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • tests/adapters/test_hermes_adapter.py
  • crates/fabric-core/src/config.rs
  • crates/fabric-core/src/runtime.rs
crates/fabric-core/**/*.{rs,py}

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

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

Files:

  • crates/fabric-core/src/schema.rs
  • crates/fabric-core/src/config.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/schema.rs
  • crates/fabric-core/src/config.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/schema.rs
  • crates/fabric-core/src/config.rs
  • 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:

  • tests/e2e/test_codex.py
  • tests/python/test_sdk_contract.py
  • python/src/nemo_fabric/models.py
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • 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/e2e/test_codex.py
  • tests/python/test_sdk_contract.py
  • tests/adapters/test_hermes_adapter.py
**/*.py

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.py: Use type annotations for public Python APIs and keep native binding declarations synchronized with their Rust implementations.
Python files must use the specified Python # SPDX header format.

Files:

  • tests/e2e/test_codex.py
  • tests/python/test_sdk_contract.py
  • python/src/nemo_fabric/models.py
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • tests/adapters/test_hermes_adapter.py
**/tests/**/*.{rs,py}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

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

Files:

  • tests/e2e/test_codex.py
  • tests/python/test_sdk_contract.py
  • 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/e2e/test_codex.py
  • tests/python/test_sdk_contract.py
  • tests/adapters/test_hermes_adapter.py
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
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/models.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/models.py
python/src/**/*.py

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

Use the complete Fabric invocation and normalized public request/result contracts when implementing Python adapter integrations.

Files:

  • python/src/nemo_fabric/models.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/models.py
adapters/*/src/**/*.py

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

adapters/*/src/**/*.py: Implement adapters using the existing Fabric python or process runner and normalized request/result contracts; do not add a runner or one-off abstraction for a single adapter.
Treat config, capability_plan, telemetry_plan, and runtime_context as authoritative; reserve harness.settings for harness-specific behavior and apply precedence as normalized config, resolved plans/context, harness settings, then descriptor/default values.
Reject conflicting duplicate declarations and unsupported behavior with an actionable error naming the field and supported alternatives; never silently drop configuration.
Run dependency and authentication preflight before invocation, and never expose credential values in output, errors, events, logs, or fixtures.
Forward only required system variables, selected credential variables, telemetry variables, and documented harness-specific environment; never forward or log unrelated environment values.
Maintain one local adapter host per Fabric runtime for ordered startinvoke*stop; emit one JSON lifecycle response per request on stdout and diagnostics on stderr.
Represent harness-level invoke failures as successful lifecycle responses with response: null, failed: true, and structured error fields including code, message, and retryable.
Scope workspace, generated configuration, state, sessions, and artifacts to the resolved runtime context; stateful adapters must isolate Fabric runtime IDs.
Map supported model settings and credential-variable names, enforce blocked tools when claiming tools.blocked, support only native MCP transports actually implemented, validate and stage skill paths without cross-runtime collisions, and declare only implemented telemetry and artifact outputs.

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
🧠 Learnings (3)
📚 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/config/struct-fabricconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterconfigsupport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
📚 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/models.py
📚 Learning: 2026-07-09T22:28:51.689Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 43
File: adapters/claude-sdk/src/nemo_fabric_adapters/claude_sdk/adapter.py:164-168
Timestamp: 2026-07-09T22:28:51.689Z
Learning: In the NeMo-Fabric adapters, treat path values used in Fabric adapter configuration (including logic like `_resolve_path` in adapter.py) as config-root-relative. Do not apply `Path.expanduser()` (or otherwise apply `~`/home or shell-style expansion), because it will make the resolved paths normalize inconsistently across adapters. Also, do not rely on or add any resolution behavior that uses `harness.settings.cwd` as an override point for these adapter paths—`harness.settings.cwd` is explicitly unsupported in this adapter context.

Applied to files:

  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
🔇 Additional comments (26)
crates/fabric-core/src/config.rs (1)

19-23: LGTM!

Also applies to: 35-41, 70-94, 359-361, 370-409, 478-480, 501-504, 535-537, 1213-1218, 1234-1315, 1433-1433, 1445-1447, 1461-1461, 1486-1505, 1524-1560, 1583-1584, 1615-1615, 1804-1806, 1850-1855, 1885-1894, 2040-2375

schemas/adapter-descriptor.schema.json (1)

3-62: LGTM!

Also applies to: 63-70

schemas/agent.schema.json (1)

39-45: LGTM!

Also applies to: 208-214, 874-882, 930-973, 994-1002, 1055-1061

schemas/run-plan.schema.json (1)

3-70: LGTM!

Also applies to: 450-456, 523-529, 565-565, 582-590, 643-649, 819-825, 1544-1552, 1663-1678, 1687-1726

docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterconfigsupport.mdx (1)

5-20: LGTM!

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

23-24: LGTM!

Also applies to: 245-247, 481-533, 540-560, 570-579, 648-673, 1358-1386, 2395-2398, 2490-2490, 2525-2533, 2553-2572, 2587-2587


910-919: 🩺 Stability & Availability

No change needed here. Duration::try_from_secs_f64 already returns an error for out-of-range finite values, so large finite runtime.timeout_seconds inputs won’t panic.

			> Likely an incorrect or invalid review comment.
crates/fabric-core/src/schema.rs (1)

215-224: LGTM!

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

26-83: LGTM!

Also applies to: 93-93, 104-108, 144-145, 208-224, 264-268, 304-308, 321-334, 345-348, 388-388, 522-530

adapters/README.md (1)

46-61: LGTM!

Also applies to: 62-102

docs/sdk/python.mdx (1)

141-152: LGTM!

Also applies to: 172-222, 242-264, 517-533

tests/python/test_sdk_contract.py (1)

46-46: LGTM!

Also applies to: 147-160, 210-273, 282-307, 474-474, 1249-1263

docs/reference/api/python-library-reference/nemo_fabric.types.md (1)

18-18: LGTM!

Also applies to: 88-88, 161-161, 232-232, 302-302, 371-371, 442-442, 513-513, 581-581, 652-652, 723-723, 798-798, 867-867

docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx (1)

5-5: LGTM!

Also applies to: 26-26, 52-56

python/src/nemo_fabric/models.py (2)

114-118: LGTM!

Also applies to: 147-176, 187-220, 439-495, 571-584


559-568: 🎯 Functional Correctness

No change needed here. FabricBaseModel sets validate_assignment=True, so assigning self.tools.blocked still runs the ToolsConfig validator; block_tools("") cannot bypass field validation.

			> Likely an incorrect or invalid review comment.
examples/harbor/README.md (1)

78-87: LGTM!

docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-fabricconfig.mdx (1)

4-16: LGTM!

Also applies to: 36-43

crates/fabric-cli/src/examples.rs (1)

122-122: LGTM!

Also applies to: 139-144, 170-183

tests/adapters/test_hermes_adapter.py (1)

12-12: LGTM!

Also applies to: 185-217, 253-295, 297-306, 362-364, 559-562, 643-668

tests/e2e/test_codex.py (1)

20-20: LGTM!

Also applies to: 42-49, 83-89

scripts/generate_api_docs.sh (1)

42-43: LGTM!

docs/reference/api/python-library-reference/nemo_fabric.errors.md (1)

18-18: LGTM!

Also applies to: 65-65, 101-101, 137-137, 173-173, 209-209

docs/reference/api/python-library-reference/nemo_fabric.models.md (1)

4-4: LGTM!

Also applies to: 19-1292, 1385-1445, 1581-1595

docs/reference/api/python-library-reference/nemo_fabric.runtime.md (1)

18-18: LGTM!

Also applies to: 31-31

docs/reference/api/python-library-reference/nemo_fabric.client.md (1)

4-4: LGTM!

Also applies to: 18-18

@AjayThorve AjayThorve self-assigned this Jul 24, 2026
@AjayThorve
AjayThorve marked this pull request as draft July 24, 2026 16:34
@AjayThorve
AjayThorve force-pushed the feat/normalize-adapter-config branch from e5ebf04 to 2d45ae3 Compare July 24, 2026 16:37

@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

Caution

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

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

756-761: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove stale base_instructions from the settings-shape validation loop.

_validate_settings_boundary(settings) (line 748) already rejects harness.settings.base_instructions via NORMALIZED_SETTING_FIELDS (line 95), so by the time this loop runs, settings can never contain base_instructions. service_name was correctly dropped from this loop for the same reason, but base_instructions was left behind — it's dead code that misleadingly implies the key is still a valid optional Codex setting.

♻️ Proposed cleanup
     for name in (
-        "base_instructions",
         "developer_instructions",
         "service_tier",
     ):
         _optional_string(settings, name)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@adapters/codex/src/nemo_fabric_adapters/codex/adapter.py` around lines 756 -
761, Remove "base_instructions" from the settings-shape validation loop that
calls _optional_string, leaving only currently valid optional Codex settings
such as "developer_instructions" and "service_tier". Do not change
_validate_settings_boundary or NORMALIZED_SETTING_FIELDS.
adapters/common/src/nemo_fabric_adapters/common/utils.py (1)

269-272: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use the existing runtime_id() helper instead of raw dict indexing.

runtime_context(payload)["runtime_id"] bypasses the module's own runtime_id(payload) helper, which already validates presence and raises a clear ValueError("runtime_context.runtime_id is required"). Raw indexing here raises an unclear KeyError if runtime_id is missing, and duplicates validation logic that already exists in this same file. base_dir(payload) a few lines above correctly uses its helper — this should match.

♻️ Proposed fix
-    runtime_id = runtime_context(payload)["runtime_id"]
+    runtime_id_value = runtime_id(payload)

(and update the two str(runtime_id) usages below to str(runtime_id_value))

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

In `@adapters/common/src/nemo_fabric_adapters/common/utils.py` around lines 269 -
272, Update normalize_relay_output_dirs to obtain the identifier through the
existing runtime_id(payload) helper instead of indexing runtime_context(payload)
directly, preserving its validation behavior. Rename the local value as needed
and update both downstream str(runtime_id) usages to reference the new
runtime_id_value.
python/src/nemo_fabric/models.py (1)

300-310: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Raise the pydantic minimum to >=2.12. The lockfile is on 2.13.4, but python/pyproject.toml still allows 2.10/2.11, so published installs can miss exclude_if and stop omitting empty headers/header_env.

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

In `@python/src/nemo_fabric/models.py` around lines 300 - 310, Update the Pydantic
dependency constraint in python/pyproject.toml to require version >=2.12,
ensuring RelayAtofStreamSinkConfig’s exclude_if fields for headers and
header_env are supported. Keep the existing lockfile-compatible version range
otherwise unchanged.
tests/adapters/test_adapaters_common_utils.py (1)

472-473: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Replace hard-coded temporary paths.

Ruff S108 fails on both fixture paths. Use tmp_path / "atof" so tests remain isolated and lint passes.

  • tests/adapters/test_adapaters_common_utils.py#L472-L473: derive output_directory from a tmp_path fixture.
  • tests/adapters/test_adapaters_common_utils.py#L577-L578: derive output_directory from the existing tmp_path fixture.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/adapters/test_adapaters_common_utils.py` around lines 472 - 473,
Replace the hard-coded /tmp/atof output_directory in both fixture sites with a
path derived from the existing tmp_path fixture, using the "atof" child
directory. Update tests/adapters/test_adapaters_common_utils.py lines 472-473
and 577-578; ensure both affected tests receive or reuse tmp_path while
preserving the fixture structure.

Source: Linters/SAST tools

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

Inline comments:
In `@adapters/claude/README.md`:
- Around line 37-42: Update the NVIDIA model configuration documentation in the
adapter README to state that models.<role>.base_url is required and must be
explicitly configured; remove wording that implies the public NVIDIA API Catalog
endpoint is used as a fallback, while preserving the credential and endpoint
translation details.

In `@docs/reference/api/python-library-reference/nemo_fabric.client.md`:
- Line 4: Update the source documentation description to use “NVIDIA NeMo
Fabric” on first use, then regenerate the API reference page instead of editing
the generated file directly. Preserve the remaining description text and ensure
the regenerated page reflects the updated product name.

In
`@docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsconfig.mdx`:
- Around line 22-24: Update the Rust source documentation for the
ToolsetConfig/toolsets field to describe toolset selection and blocking policy
as harness-defined rather than adapter-native, preserving the distinction from
adapter-native tools.blocked. Then regenerate the API reference page using just
docs; do not edit the generated MDX directly.

In
`@tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py`:
- Line 90: Update the workspace derivation in environment_payload() to use the
same environment fallback order as the shared environment handling, including
fabric_config(payload)["environment"] before reading workspace. Ensure a missing
workspace is rejected rather than allowing run_swebench_shim() to default to
Path(".").

---

Outside diff comments:
In `@adapters/codex/src/nemo_fabric_adapters/codex/adapter.py`:
- Around line 756-761: Remove "base_instructions" from the settings-shape
validation loop that calls _optional_string, leaving only currently valid
optional Codex settings such as "developer_instructions" and "service_tier". Do
not change _validate_settings_boundary or NORMALIZED_SETTING_FIELDS.

In `@adapters/common/src/nemo_fabric_adapters/common/utils.py`:
- Around line 269-272: Update normalize_relay_output_dirs to obtain the
identifier through the existing runtime_id(payload) helper instead of indexing
runtime_context(payload) directly, preserving its validation behavior. Rename
the local value as needed and update both downstream str(runtime_id) usages to
reference the new runtime_id_value.

In `@python/src/nemo_fabric/models.py`:
- Around line 300-310: Update the Pydantic dependency constraint in
python/pyproject.toml to require version >=2.12, ensuring
RelayAtofStreamSinkConfig’s exclude_if fields for headers and header_env are
supported. Keep the existing lockfile-compatible version range otherwise
unchanged.

In `@tests/adapters/test_adapaters_common_utils.py`:
- Around line 472-473: Replace the hard-coded /tmp/atof output_directory in both
fixture sites with a path derived from the existing tmp_path fixture, using the
"atof" child directory. Update tests/adapters/test_adapaters_common_utils.py
lines 472-473 and 577-578; ensure both affected tests receive or reuse tmp_path
while preserving the fixture structure.
🪄 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: 8ea0ceda-9665-416a-90b0-73885b01b9a9

📥 Commits

Reviewing files that changed from the base of the PR and between e5ebf04 and 2d45ae3.

📒 Files selected for processing (136)
  • README.md
  • adapters/README.md
  • adapters/claude/README.md
  • adapters/claude/fabric-adapter.json
  • adapters/claude/src/nemo_fabric_adapters/claude/adapter.py
  • adapters/codex/README.md
  • adapters/codex/fabric-adapter.json
  • adapters/codex/src/nemo_fabric_adapters/codex/adapter.py
  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • adapters/deepagents/README.md
  • adapters/deepagents/fabric-adapter.json
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
  • adapters/hermes/README.md
  • adapters/hermes/fabric-adapter.json
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • crates/fabric-cli/assets/adapters/claude/fabric-adapter.json
  • crates/fabric-cli/assets/adapters/codex/fabric-adapter.json
  • crates/fabric-cli/assets/adapters/deepagents/fabric-adapter.json
  • crates/fabric-cli/assets/adapters/hermes/fabric-adapter.json
  • crates/fabric-cli/src/examples.rs
  • crates/fabric-cli/src/presets.rs
  • crates/fabric-cli/src/scaffold.rs
  • crates/fabric-cli/templates/python/main.py.tmpl
  • crates/fabric-cli/templates/rust/main.rs.tmpl
  • crates/fabric-core/src/config.rs
  • crates/fabric-core/src/error.rs
  • crates/fabric-core/src/lib.rs
  • crates/fabric-core/src/runtime.rs
  • crates/fabric-core/src/schema.rs
  • docs/getting-started/quickstart.mdx
  • docs/integrations/claude.mdx
  • docs/integrations/codex.mdx
  • docs/reference/api/python-library-reference/index.md
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/reference/api/python-library-reference/nemo_fabric.errors.md
  • docs/reference/api/python-library-reference/nemo_fabric.models.md
  • docs/reference/api/python-library-reference/nemo_fabric.runtime.md
  • docs/reference/api/python-library-reference/nemo_fabric.types.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterdescriptorsource.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterkind.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-capabilitykind.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-capabilitytarget.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-controllocation.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-environmentownership.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-mcpexposure.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatifstorageconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatofmode.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatofsinkconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatofstreamfieldnamepolicy.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatofstreamtransport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayotlptransport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayunsupportedbehavior.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-resolutionstrategy.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-telemetryprovider.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/fn-load-adapter-descriptor.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/fn-resolve-run-plan-from-config.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterconfigsupport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterdescriptor.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterrequirements.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adaptertelemetryprovidersupport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adaptertelemetrysupport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-capabilityplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-environmentconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-environmentplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-fabricconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-harnessconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-mcpconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-mcpserverplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-metadataconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-modelconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-resolvecontext.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-resolvedadapterdescriptor.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-runplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-runtimecapabilities.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-runtimeconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-skillconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-telemetryconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-telemetryplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-telemetryproviderconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsetconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/enum-doctorstatus.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/fn-doctor-plan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/struct-doctorcheck.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/struct-doctorreport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/error/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/error/type-result.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/fn-version.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/runtime/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/runtime/struct-environmenthandle.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/schema/index.mdx
  • docs/sdk/python.mdx
  • examples/code_review_agent/config.py
  • examples/harbor/README.md
  • examples/harbor/calculator/README.md
  • examples/harbor/swebench/README.md
  • examples/harbor/swebench/adapters/claude/fabric-adapter.json
  • examples/harbor/swebench/adapters/hermes/fabric-adapter.json
  • examples/notebooks/01_quickstart.ipynb
  • python/src/nemo_fabric/__init__.py
  • python/src/nemo_fabric/integrations/harbor/fabric_agent.py
  • python/src/nemo_fabric/models.py
  • python/src/nemo_fabric/types.py
  • schemas/adapter-descriptor.schema.json
  • schemas/adapter-invocation.schema.json
  • schemas/agent.schema.json
  • schemas/environment-handle.schema.json
  • schemas/run-plan.schema.json
  • schemas/runtime-context.schema.json
  • schemas/runtime-handle.schema.json
  • scripts/generate_api_docs.sh
  • skills/nemo-fabric-integrate/SKILL.md
  • skills/nemo-fabric-integrate/references/config-mapping.md
  • tests/_utils/configs.py
  • tests/adapters/test_adapaters_common_utils.py
  • tests/adapters/test_claude_adapter.py
  • tests/adapters/test_codex_adapter.py
  • tests/adapters/test_deepagents.py
  • tests/adapters/test_hermes_adapter.py
  • tests/e2e/test_claude.py
  • tests/e2e/test_codex.py
  • tests/e2e/test_deepagents.py
  • tests/e2e/test_hermes_config_mapping.py
  • tests/e2e/test_hermes_e2e.py
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/fabric-adapter.json
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py
  • tests/integrations/test_harbor_runner.py
  • tests/python/test_native_sdk.py
  • tests/python/test_sdk_contract.py
  • tests/python/test_typed_config.py

Comment thread adapters/claude/README.md Outdated
Comment thread docs/reference/api/python-library-reference/nemo_fabric.client.md Outdated
"received": request.get("input"),
"runtime_id": context.get("runtime_id"),
"workspace": environment.get("workspace") or settings.get("workspace"),
"workspace": environment.get("workspace"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '## target file\n'
sed -n '1,180p' tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py

printf '\n## shared helper\n'
sed -n '1,220p' adapters/common/src/nemo_fabric_adapters/common/utils.py

printf '\n## search workspace handling\n'
rg -n "workspace|environment_payload|fabric_config|Path\\(\"\\.\"\\)" tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py adapters/common/src/nemo_fabric_adapters/common/utils.py

Repository: NVIDIA/NeMo-Fabric

Length of output: 15538


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
import re

path = Path('tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py')
text = path.read_text()

# Extract environment_payload-like function region with line numbers for local inspection.
for i, line in enumerate(text.splitlines(), 1):
    if 'def environment_payload' in line or 'workspace' in line or 'Path(".")' in line:
        print(f"{i}: {line}")
PY

Repository: NVIDIA/NeMo-Fabric

Length of output: 591


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Minimal static probe for the relevant control flow.
python3 - <<'PY'
from pathlib import Path

p = Path('tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py')
for n, line in enumerate(p.read_text().splitlines(), 1):
    if 70 <= n <= 120:
        print(f"{n:4d}: {line}")
PY

Repository: NVIDIA/NeMo-Fabric

Length of output: 2422


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '1,180p' tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py

Repository: NVIDIA/NeMo-Fabric

Length of output: 5252


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
p = Path('tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py')
for n, line in enumerate(p.read_text().splitlines(), 1):
    if 1 <= n <= 180:
        print(f"{n:4d}: {line}")
PY

Repository: NVIDIA/NeMo-Fabric

Length of output: 6176


Mirror the shared environment fallback before deriving workspace. environment_payload() only reads runtime_context.environment and payload.environment; when run_swebench_shim() falls back to Path("."), the shim can write against the adapter process root instead of the configured workspace. Include fabric_config(payload)["environment"] here too, or fail when workspace is missing.

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

In
`@tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py`
at line 90, Update the workspace derivation in environment_payload() to use the
same environment fallback order as the shared environment handling, including
fabric_config(payload)["environment"] before reading workspace. Ensure a missing
workspace is rejected rather than allowing run_swebench_shim() to default to
Path(".").

Source: Path instructions

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

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

⚠️ Outside diff range comments (1)
crates/fabric-core/src/config.rs (1)

1304-1327: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Validate every configured model role.

The compatibility check only inspects default (or the sole model). If multiple roles are configured and default exists, unsupported base_url or temperature values on other roles pass planning and can be silently ignored when those aliases are selected. Iterate over every configured role, or explicitly reject unsupported settings on non-selected roles.

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

In `@crates/fabric-core/src/config.rs` around lines 1304 - 1327, Update the model
compatibility validation around selected_model to inspect every configured role,
not only the default or sole model. Apply the existing base_url and temperature
accepts checks to each entry in config.models, reporting the corresponding
models.{role} field; preserve the existing multiple-role/no-default incompatible
error.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@crates/fabric-core/src/config.rs`:
- Around line 1304-1327: Update the model compatibility validation around
selected_model to inspect every configured role, not only the default or sole
model. Apply the existing base_url and temperature accepts checks to each entry
in config.models, reporting the corresponding models.{role} field; preserve the
existing multiple-role/no-default incompatible error.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 41c8d3b4-74dd-4466-a44d-88e0ca9d53f1

📥 Commits

Reviewing files that changed from the base of the PR and between 2d45ae3 and 586b0c8.

📒 Files selected for processing (5)
  • crates/fabric-core/src/config.rs
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • schemas/adapter-descriptor.schema.json
  • schemas/run-plan.schema.json
📜 Review details
🧰 Additional context used
📓 Path-based instructions (26)
{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/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.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/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
**/*.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.

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

Files:

  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.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/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.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/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
  • schemas/adapter-descriptor.schema.json
  • schemas/run-plan.schema.json
  • crates/fabric-core/src/config.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/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
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/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.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/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.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.

Update corresponding documentation when public behavior, adapters, examples, or workspace structure changes.

Files:

  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
{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.

Files:

  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.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/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.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:

  • schemas/adapter-descriptor.schema.json
  • schemas/run-plan.schema.json
  • crates/fabric-core/src/config.rs
**/*.{json,jsonschema}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Keep checked-in JSON Schema snapshots synchronized with public contract changes.

Files:

  • schemas/adapter-descriptor.schema.json
  • schemas/run-plan.schema.json
**/*.{py,toml,lock,json,md,yml,yaml}

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

Keep package wiring, descriptors, dependencies, installation, catalogs, CI enumerations, documentation, examples, fixtures, and generated artifacts consistent with the adapter implementation.

Files:

  • schemas/adapter-descriptor.schema.json
  • schemas/run-plan.schema.json
schemas/**/*

⚙️ CodeRabbit configuration file

schemas/**/*: Schemas are generated public contract snapshots. Check that schema diffs correspond to intentional Rust type changes and are covered by core tests.

Files:

  • schemas/adapter-descriptor.schema.json
  • schemas/run-plan.schema.json
**/*.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 and ensure cargo fmt --all -- --check passes.
Run cargo check --workspace --locked when changing the Rust core, CLI, or native Python extension.
Rust files must use the specified Rust // SPDX header format.

Files:

  • crates/fabric-core/src/config.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-core/src/config.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}: Use snake_case for functions and variables; use PascalCase for Rust types and Python classes.
Run tests for every affected language surface; changes to the Rust core or public schemas require both Rust and Python test suites.
Keep native Python binding declarations synchronized with their Rust implementations when public contracts change.

Files:

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

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

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

Files:

  • crates/fabric-core/src/config.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/config.rs
**/*.{rs,rmeta}

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

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

Files:

  • crates/fabric-core/src/config.rs
**/*.{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:

  • crates/fabric-core/src/config.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:

  • crates/fabric-core/src/config.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:

  • crates/fabric-core/src/config.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:

  • crates/fabric-core/src/config.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/config.rs
🧠 Learnings (1)
📚 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/config/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
🔇 Additional comments (6)
crates/fabric-core/src/config.rs (2)

1270-1328: 🎯 Functional Correctness

Verify provider-aware telemetry compatibility validation.

AdapterConfigField::Telemetry is part of the public contract, but this validator does not check config.telemetry. Ensure native telemetry configuration is routed through an adapter support check and rejected when unsupported; relay-only telemetry should remain independently handled if that is the intended contract.


19-23: LGTM!

Also applies to: 35-41, 70-94, 359-409, 478-480, 501-504, 535-537, 1083-1172, 1229-1234, 1250-1268, 1449-1449, 1461-1477, 1502-1521, 1540-1576, 1599-1600, 1631-1631, 1820-1822, 1866-1871, 1901-1908, 2086-2421

schemas/adapter-descriptor.schema.json (1)

3-70: LGTM!

schemas/run-plan.schema.json (1)

3-70: LGTM!

Also applies to: 450-456, 523-529, 565-565, 582-590, 643-649, 819-825, 1582-1590, 1701-1717, 1725-1741, 1756-1764

docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx (1)

5-5: LGTM!

Also applies to: 26-26, 51-55

docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx (1)

1-27: LGTM!

Also applies to: 28-97, 98-234

@AjayThorve
AjayThorve force-pushed the feat/normalize-adapter-config branch from 586b0c8 to 23bcd05 Compare July 24, 2026 17:12

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

Caution

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

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

139-145: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Honor normalized environment credentials.

Both adapters reject credentials supplied through FabricConfig.environment.env; consult common_utils.environment_env(payload) before falling back to os.environ, in both preflight and runtime model construction.

  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py#L139-L145: use the normalized environment when checking the required credential.
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py#L173-L176: use the same lookup when constructing the chat model.
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py#L268-L272: use the normalized environment when loading the Hermes credential.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py` around
lines 139 - 145, Use common_utils.environment_env(payload) as the normalized
credential source before falling back to os.environ. Update the deepagents
preflight check around selected_model_config and resolve_api_key_env, the
deepagents runtime chat-model construction, and the Hermes credential-loading
logic; apply the same lookup consistently at
adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py lines
139-145, 173-176, and adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
lines 268-272.
♻️ Duplicate comments (2)
adapters/claude/README.md (1)

37-42: 🎯 Functional Correctness | 🟡 Minor

Document base_url as required for NVIDIA models.

This wording still implies a public endpoint fallback. For an NVIDIA model, models.<role>.base_url must be configured explicitly; omission fails configuration. This reintroduces the previously reported issue.

As per path instructions, documentation must be technically accurate against the current API.

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

In `@adapters/claude/README.md` around lines 37 - 42, Update the NVIDIA model
documentation to state that models.<role>.base_url is required and must be
configured explicitly; remove any wording that suggests a public NVIDIA API
Catalog endpoint is used as a fallback. Keep the existing description of
endpoint translation and request-scoped environment behavior accurate.

Source: Path instructions

docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsconfig.mdx (1)

22-24: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Describe toolsets as harness-defined. AdapterConfigField distinguishes adapter-native tools.blocked from harness-defined toolsets. The current wording conflates these policy surfaces.

  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsconfig.mdx#L22-L24: Update the Rust source documentation for toolsets, then regenerate this page.
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsplan.mdx#L22-L24: Update the ToolsPlan source documentation to use the same terminology.
  • docs/reference/api/python-library-reference/nemo_fabric.models.md#L1624-L1633: Update FabricConfig.configure_toolsets() source documentation to match the contract.

As per path instructions, regenerate generated API references from their source documentation. Based on learnings, use just docs for generated reference output.

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

In
`@docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsconfig.mdx`
around lines 22 - 24, Update the source documentation for Rust toolset
configuration, including ToolsConfig and ToolsPlan, to describe toolsets as
harness-defined and distinguish them from adapter-native tools.blocked policy;
update FabricConfig.configure_toolsets() to use the same terminology. Apply
changes in
docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsconfig.mdx
(lines 22-24),
docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsplan.mdx
(lines 22-24), and
docs/reference/api/python-library-reference/nemo_fabric.models.md (lines
1624-1633), then regenerate the API references with just docs.

Sources: Path instructions, Learnings

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

Inline comments:
In `@adapters/claude/src/nemo_fabric_adapters/claude/adapter.py`:
- Around line 223-265: The child_environment flow must not silently replace
explicit normalized keys from common_utils.environment_env(payload) with
_model_environment values. Before applying the model-derived environment, detect
conflicts for ANTHROPIC_BASE_URL, ANTHROPIC_API_KEY, and ANTHROPIC_AUTH_TOKEN,
and raise AdapterConfigError identifying the conflicting field and supported
configuration alternatives; otherwise preserve the existing model-environment
behavior.

In `@adapters/common/src/nemo_fabric_adapters/common/utils.py`:
- Around line 92-95: Update environment_payload to check
fabric_config(payload).get("environment") after runtime_context(payload) and
before the legacy top-level payload.get("environment") fallback, preserving the
empty-dict default. Add a regression case covering a config-only environment and
verify its cwd resolves to the configured workspace path.

In `@adapters/deepagents/README.md`:
- Around line 49-52: Update the earlier Model and Authentication section to
document configuration through the selected models role rather than
models.default. Align its terminology and configuration paths with the mapping
that identifies model, provider, api_key_env, base_url, and temperature as
values supplied by the selected role.

In `@adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py`:
- Around line 243-246: Update the environment setup in the Hermes adapter to
assign TERMINAL_ENV to "local" unconditionally instead of using setdefault,
ensuring inherited values such as "docker" are overridden.

In `@crates/fabric-core/src/config.rs`:
- Around line 532-534: Update the documentation for the `env` field in
`FabricConfig` to warn that values are serialized into `RunPlan` and may appear
in schema dumps or logs. Recommend using `api_key_env`-style
environment-variable-name indirection for credentials instead of placing secrets
directly in `environment.env`.

In `@docs/reference/api/python-library-reference/nemo_fabric.models.md`:
- Line 4: Update the source description for the documented models to use the
full product name “NVIDIA NeMo Fabric” on first use, then regenerate the Python
library API reference so the generated documentation reflects the updated
description.
- Around line 1549-1550: Update the documentation sentence to replace “see” with
“refer to” and link descriptive anchor text to the normalized configuration
compatibility table in the rendered Python SDK documentation, rather than
referencing the repository path directly.
- Around line 1424-1484: Update the generated documentation for ToolsetConfig to
include field semantics for enabled and blocked: state that enabled=None
preserves the adapter default, an empty enabled sequence exposes no toolsets,
and describe how blocked affects toolsets. Regenerate the ToolsetConfig
reference page so these descriptions appear in the published API documentation.

In `@docs/sdk/python.mdx`:
- Around line 537-539: Separate request context from normalized FabricConfig
fields: in docs/sdk/python.mdx at lines 537-539, remove it from the portable
configuration list and describe it as request-scoped invocation data; make the
same update in skills/nemo-fabric-integrate/references/config-mapping.md at
lines 86-88. Preserve all other listed fields and guidance.

In `@skills/nemo-fabric-integrate/SKILL.md`:
- Around line 97-103: Update the job configuration mapping around ToolsConfig so
it no longer populates both tools.blocked and tools.toolsets indiscriminately.
Add adapter-specific mappings or conditionally populate only the policy
supported by the selected adapter, ensuring Claude and Deep Agents receive
toolsets without per-tool blocking while Hermes receives per-tool blocking
without toolsets.

---

Outside diff comments:
In `@adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py`:
- Around line 139-145: Use common_utils.environment_env(payload) as the
normalized credential source before falling back to os.environ. Update the
deepagents preflight check around selected_model_config and resolve_api_key_env,
the deepagents runtime chat-model construction, and the Hermes
credential-loading logic; apply the same lookup consistently at
adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py lines
139-145, 173-176, and adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
lines 268-272.

---

Duplicate comments:
In `@adapters/claude/README.md`:
- Around line 37-42: Update the NVIDIA model documentation to state that
models.<role>.base_url is required and must be configured explicitly; remove any
wording that suggests a public NVIDIA API Catalog endpoint is used as a
fallback. Keep the existing description of endpoint translation and
request-scoped environment behavior accurate.

In
`@docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsconfig.mdx`:
- Around line 22-24: Update the source documentation for Rust toolset
configuration, including ToolsConfig and ToolsPlan, to describe toolsets as
harness-defined and distinguish them from adapter-native tools.blocked policy;
update FabricConfig.configure_toolsets() to use the same terminology. Apply
changes in
docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsconfig.mdx
(lines 22-24),
docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsplan.mdx
(lines 22-24), and
docs/reference/api/python-library-reference/nemo_fabric.models.md (lines
1624-1633), then regenerate the API references with just docs.
🪄 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: 3c4b4d63-617a-4916-9357-2bd0e593f0dd

📥 Commits

Reviewing files that changed from the base of the PR and between 586b0c8 and 23bcd05.

📒 Files selected for processing (133)
  • README.md
  • adapters/README.md
  • adapters/claude/README.md
  • adapters/claude/fabric-adapter.json
  • adapters/claude/src/nemo_fabric_adapters/claude/adapter.py
  • adapters/codex/README.md
  • adapters/codex/fabric-adapter.json
  • adapters/codex/src/nemo_fabric_adapters/codex/adapter.py
  • adapters/common/src/nemo_fabric_adapters/common/utils.py
  • adapters/deepagents/README.md
  • adapters/deepagents/fabric-adapter.json
  • adapters/deepagents/src/nemo_fabric_adapters/deepagents/adapter.py
  • adapters/hermes/README.md
  • adapters/hermes/fabric-adapter.json
  • adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py
  • crates/fabric-cli/assets/adapters/claude/fabric-adapter.json
  • crates/fabric-cli/assets/adapters/codex/fabric-adapter.json
  • crates/fabric-cli/assets/adapters/deepagents/fabric-adapter.json
  • crates/fabric-cli/assets/adapters/hermes/fabric-adapter.json
  • crates/fabric-cli/src/examples.rs
  • crates/fabric-cli/src/presets.rs
  • crates/fabric-cli/src/scaffold.rs
  • crates/fabric-cli/templates/python/main.py.tmpl
  • crates/fabric-cli/templates/rust/main.rs.tmpl
  • crates/fabric-core/src/config.rs
  • crates/fabric-core/src/error.rs
  • crates/fabric-core/src/lib.rs
  • crates/fabric-core/src/runtime.rs
  • crates/fabric-core/src/schema.rs
  • docs/getting-started/quickstart.mdx
  • docs/integrations/claude.mdx
  • docs/integrations/codex.mdx
  • docs/reference/api/python-library-reference/index.md
  • docs/reference/api/python-library-reference/nemo_fabric.client.md
  • docs/reference/api/python-library-reference/nemo_fabric.models.md
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterconfigfield.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterdescriptorsource.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-adapterkind.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-capabilitykind.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-capabilitytarget.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-controllocation.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-environmentownership.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-mcpexposure.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatifstorageconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatofmode.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatofsinkconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatofstreamfieldnamepolicy.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayatofstreamtransport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayotlptransport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-relayunsupportedbehavior.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-resolutionstrategy.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/enum-telemetryprovider.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/fn-load-adapter-descriptor.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/fn-resolve-run-plan-from-config.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterconfigsupport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterdescriptor.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adapterrequirements.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adaptertelemetryprovidersupport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-adaptertelemetrysupport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-capabilityplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-environmentconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-environmentplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-fabricconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-harnessconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-mcpconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-mcpserverplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-metadataconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-modelconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-resolvecontext.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-resolvedadapterdescriptor.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-runplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-runtimecapabilities.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-runtimeconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-skillconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-telemetryconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-telemetryplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-telemetryproviderconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsetconfig.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/config/struct-toolsplan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/enum-doctorstatus.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/fn-doctor-plan.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/struct-doctorcheck.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/doctor/struct-doctorreport.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/error/enum-fabricerror.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/error/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/error/type-result.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/fn-version.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/runtime/index.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/runtime/struct-environmenthandle.mdx
  • docs/reference/api/rust-library-reference/nemo-fabric-core/schema/index.mdx
  • docs/sdk/python.mdx
  • examples/code_review_agent/config.py
  • examples/harbor/README.md
  • examples/harbor/calculator/README.md
  • examples/harbor/swebench/README.md
  • examples/harbor/swebench/adapters/claude/fabric-adapter.json
  • examples/harbor/swebench/adapters/hermes/fabric-adapter.json
  • examples/notebooks/01_quickstart.ipynb
  • python/src/nemo_fabric/__init__.py
  • python/src/nemo_fabric/integrations/harbor/fabric_agent.py
  • python/src/nemo_fabric/models.py
  • python/src/nemo_fabric/types.py
  • schemas/adapter-descriptor.schema.json
  • schemas/adapter-invocation.schema.json
  • schemas/agent.schema.json
  • schemas/environment-handle.schema.json
  • schemas/run-plan.schema.json
  • schemas/runtime-context.schema.json
  • schemas/runtime-handle.schema.json
  • scripts/generate_api_docs.sh
  • skills/nemo-fabric-integrate/SKILL.md
  • skills/nemo-fabric-integrate/references/config-mapping.md
  • tests/_utils/configs.py
  • tests/adapters/test_adapaters_common_utils.py
  • tests/adapters/test_claude_adapter.py
  • tests/adapters/test_codex_adapter.py
  • tests/adapters/test_deepagents.py
  • tests/adapters/test_hermes_adapter.py
  • tests/e2e/test_claude.py
  • tests/e2e/test_codex.py
  • tests/e2e/test_deepagents.py
  • tests/e2e/test_hermes_config_mapping.py
  • tests/e2e/test_hermes_e2e.py
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/fabric-adapter.json
  • tests/fixtures/hermes-shim-agent/adapters/hermes-shim/src/nemo_fabric_test_adapters/hermes_shim/adapter.py
  • tests/integrations/test_harbor_runner.py
  • tests/python/test_native_sdk.py
  • tests/python/test_sdk_contract.py
  • tests/python/test_typed_config.py
💤 Files with no reviewable changes (1)
  • tests/python/test_typed_config.py

Comment thread adapters/claude/src/nemo_fabric_adapters/claude/adapter.py
Comment on lines 92 to +95
def environment_payload(payload: dict[str, Any]) -> dict[str, Any]:
return runtime_context(payload).get("environment") or payload.get("environment") or {}
return (
runtime_context(payload).get("environment") or payload.get("environment") or {}
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Read normalized config.environment as the fallback.

This ignores config.environment, so the changed Hermes fixture resolves cwd to "." instead of <tmpdir>/workspace. Check fabric_config(payload).get("environment") before the legacy top-level fallback, and add a config-only regression case.

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

In `@adapters/common/src/nemo_fabric_adapters/common/utils.py` around lines 92 -
95, Update environment_payload to check
fabric_config(payload).get("environment") after runtime_context(payload) and
before the legacy top-level payload.get("environment") fallback, preserving the
empty-dict default. Add a regression case covering a config-only environment and
verify its cwd resolves to the configured workspace path.

Comment thread adapters/deepagents/README.md
Comment thread adapters/hermes/src/nemo_fabric_adapters/hermes/adapter.py Outdated
Comment thread crates/fabric-core/src/config.rs
Comment thread docs/reference/api/python-library-reference/nemo_fabric.models.md Outdated
Comment thread docs/reference/api/python-library-reference/nemo_fabric.models.md
Comment thread docs/reference/api/python-library-reference/nemo_fabric.models.md Outdated
Comment thread docs/sdk/python.mdx Outdated
Comment thread skills/nemo-fabric-integrate/SKILL.md Outdated
@AjayThorve
AjayThorve marked this pull request as ready for review July 24, 2026 19:02

@zhongxuanwang-nv zhongxuanwang-nv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Used powerful AIs to help review, and I think it looks good to me!

Comment on lines +245 to +247
/// Environment variables visible to the harness and its tools.
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
pub env: BTreeMap<String, String>,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A nitty thing, here the code seems to add the raw env values (that might contain some sensitive credentials) to serializable EnvironmentHandle, so every local invocation later clones that handle at line 1728 (not in this diff) and then writes to adapter-invocation.json at lines 962-964 and 2078-2084 (not in this diff).

So if we want to retain the real in-memory lifecycle payload, should we also give the user an option to whether also export the env variables, or maybe currently just document this limitation?

@AjayThorve AjayThorve Jul 24, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch. I kept the real values in the in-memory EnvironmentHandle because the adapter process needs them, but changed the automatically persisted adapter-invocation.json to redact every runtime_context.environment.env value as [REDACTED]. I also added a regression test proving the adapter receives the real value while the persisted artifact does not. I avoided adding an export option because generated diagnostic artifacts should be safe by default. Fixed in bf794c4

/// Normalized NVIDIA NeMo Fabric config fields accepted by this adapter.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub accepts: Vec<String>,
pub accepts: Vec<AdapterConfigField>,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also a nitty thing, since now we are changing this, should we also update the ADAPTER_CONTRACT_VERSION at line 17, or I guess it's probably fine?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

it is tempting to add it, but lets keep the ADAPTER_CONTRACT_VERSION frozen until 0.1 release, we can increment it post that. @AnuradhaKaruppiah thoughts?

Signed-off-by: Ajay Thorve <athorve@nvidia.com>
Signed-off-by: Ajay Thorve <athorve@nvidia.com>
Signed-off-by: Ajay Thorve <athorve@nvidia.com>
Signed-off-by: Ajay Thorve <athorve@nvidia.com>
Signed-off-by: Ajay Thorve <athorve@nvidia.com>
Signed-off-by: Ajay Thorve <athorve@nvidia.com>
Signed-off-by: Ajay Thorve <athorve@nvidia.com>
Signed-off-by: Ajay Thorve <athorve@nvidia.com>
Signed-off-by: Ajay Thorve <athorve@nvidia.com>
@AjayThorve
AjayThorve force-pushed the feat/normalize-adapter-config branch from bf794c4 to cbf3372 Compare July 24, 2026 21:53
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.

2 participants