Repository navigation
feat(harbor): harden FabricAgent integration and add SWE-Bench workflow - #60
Conversation
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughHarbor integration support now covers portable configuration bundles, isolated package installation, runtime identity, telemetry validation, MCP examples, Claude and Hermes SWE-Bench workflows, expanded documentation and tests, and Harbor 0.18 dependency metadata. ChangesHarbor execution and telemetry
Harbor examples and validation
Generated metadata
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant Harbor
participant FabricAgent
participant FabricRunner
participant Fabric
participant Telemetry
Harbor->>FabricAgent: provide config bundle and run parameters
FabricAgent->>FabricRunner: upload bundle and install Fabric package
FabricRunner->>Fabric: execute composed Fabric configuration
Fabric-->>FabricRunner: return RunResult and artifacts
FabricRunner->>Telemetry: validate and publish ATOF/ATIF evidence
Telemetry-->>Harbor: write validation summary and promoted trajectory
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 12
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
adapters/common/src/nemo_fabric_adapters/common/hermes.py (1)
126-134: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winInconsistent quoting between args-present and args-empty branches.
When
argsis non-empty,targetand each arg get shell-safe quoting viashlex.join. Whenargsis empty,config["command"]falls back to the raw, unquotedtarget. Iftargetitself contains spaces or shell metacharacters (a real possibility since it comes fromos.path.expandvars), the emitted command is unquoted in that branch while it would have been quoted had any args been present. Always routing throughshlex.joinremoves the inconsistency at no cost.🔧 Proposed fix
- args = common_utils.normalize_list(server.get("args")) - config["command"] = shlex.join([target, *args]) if args else target + args = common_utils.normalize_list(server.get("args")) + config["command"] = shlex.join([target, *args])🤖 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/hermes.py` around lines 126 - 134, Update the command construction in the transport handling block to always pass target and args through shlex.join, including when args is empty. Preserve the existing command value for ordinary targets while ensuring targets containing spaces or shell metacharacters are safely quoted.tests/adapters/test_adapaters_common_hermes.py (1)
119-192: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winAdd coverage for the args-empty, spaced-target branch.
This test validates quoting when
argsis present. Once the args-empty branch also routes throughshlex.join(per the hermes.py comment), add a case with a spacedurl/commandand noargsto lock in the fix and catch regressions. As per path instructions, tests should cover the behavior promised by the changed API surface, including edge/error paths.🤖 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_hermes.py` around lines 119 - 192, The test test_build_hermes_config_maps_fabric_config_to_hermes_config covers quoting only when MCP args are present. Add an MCP server case with a spaced url/command and no args, then assert the generated mcp_servers entry is correctly shell-quoted after build_hermes_config runs, preserving the existing args-present coverage.Source: Path instructions
examples/harbor/demo/README.md (1)
28-30: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winStage the archive before deleting the existing vendor tree.
rm -rfruns beforegit archivesucceeds, so an archive failure can erase the current vendor content without producing a replacement. Extract into a temporary directory withset -euo pipefail, then replace"$VENDOR_DIR"only after extraction succeeds.🤖 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 `@examples/harbor/demo/README.md` around lines 28 - 30, Update the README’s vendor refresh commands to enable set -euo pipefail, archive and extract into a temporary directory first, and replace "$VENDOR_DIR" only after extraction completes successfully. Preserve the existing archive source and ensure the temporary directory is cleaned up appropriately.
🤖 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 `@examples/harbor/demo/README.md`:
- Line 6: Update the README heading from “Local Harbor smoke task” to title case
“Local Harbor Smoke Task,” and apply consistent title case capitalization to the
table headers in the affected section.
In `@examples/harbor/README.md`:
- Line 148: Update the NIM image reference in the evaluation example from the
mutable latest tag to an immutable version tag or image digest, preserving the
existing nvcr.io/nim/nvidia/nemotron-3-nano image.
- Around line 18-23: Add a blank line between the closing diagram code fence and
the following prose in the README, preserving the diagram and text unchanged.
- Line 6: Update the changed Markdown headings and table headers in the Harbor
README to title case, including headings such as “Fast Local Smoke” and
“Integration Contract” and headers such as “Source Config.” Apply the same
normalization to all referenced changed locations while preserving their wording
and formatting.
In `@examples/harbor/swebench/mcp/repo_inspector.py`:
- Around line 55-71: Update main to parse each input line and capture its
request ID before calling reply, then reuse that ID in the JSON-RPC error
envelope when dispatch raises. Preserve the null ID only when the request cannot
be parsed or has no usable ID, and avoid parsing the same line twice.
- Around line 35-45: Update the tools/call branch in the request handler to
validate params.name and arguments before producing the repository listing. Only
execute the existing summary logic when name is repo_summary; otherwise return a
JSON-RPC error response with code -32602 for missing, malformed, or unknown tool
arguments.
- Around line 19-24: Update the initialize handler to inspect
params.protocolVersion and negotiate against the server’s supported MCP protocol
versions instead of always returning 2025-03-26. Return the mutually supported
version in result.protocolVersion; when the requested version is unsupported,
fail with UNSUPPORTED_PROTOCOL_VERSION and include both the requested and
supported versions in the error details.
In `@examples/harbor/swebench/skills/swebench-debugging/SKILL.md`:
- Line 6: Update the heading in SKILL.md from “SWE-Bench debugging” to
“SWE-Bench Debugging,” preserving the existing SWE-Bench capitalization.
In `@python/src/nemo_fabric/integrations/harbor/fabric_agent.py`:
- Around line 349-359: Update populate_context_from_telemetry_summary to catch
file read and JSON parse failures from telemetry-validation.json, including
OSError and json.JSONDecodeError, so malformed or unavailable telemetry never
propagates through populate_context_post_run. Preserve the existing early return
for missing files and attach the parsed summary to
fabric["telemetry_validation"] when loading succeeds.
In `@python/src/nemo_fabric/integrations/harbor/README.md`:
- Line 6: Update the README heading from “Harbor integration internals” to title
case: “Harbor Integration Internals”.
In `@python/src/nemo_fabric/integrations/harbor/telemetry.py`:
- Around line 90-99: The _resolve_artifact_path function must validate traversal
before checking whether logs_dir differs from /logs/agent. Always reject paths
whose relative parts contain "..", then remap validated paths only when logs_dir
is not task_logs; otherwise return the original validated path.
In `@tests/python/test_harbor_integration.py`:
- Around line 436-451: The fallback Harbor stub AgentContext constructor must
accept the metadata argument used by
test_harbor_attaches_telemetry_summary_to_metadata. Update the stub’s
AgentContext.__init__ to accept metadata and initialize the instance metadata
accordingly, while preserving its existing behavior when metadata is omitted.
---
Outside diff comments:
In `@adapters/common/src/nemo_fabric_adapters/common/hermes.py`:
- Around line 126-134: Update the command construction in the transport handling
block to always pass target and args through shlex.join, including when args is
empty. Preserve the existing command value for ordinary targets while ensuring
targets containing spaces or shell metacharacters are safely quoted.
In `@examples/harbor/demo/README.md`:
- Around line 28-30: Update the README’s vendor refresh commands to enable set
-euo pipefail, archive and extract into a temporary directory first, and replace
"$VENDOR_DIR" only after extraction completes successfully. Preserve the
existing archive source and ensure the temporary directory is cleaned up
appropriately.
In `@tests/adapters/test_adapaters_common_hermes.py`:
- Around line 119-192: The test
test_build_hermes_config_maps_fabric_config_to_hermes_config covers quoting only
when MCP args are present. Add an MCP server case with a spaced url/command and
no args, then assert the generated mcp_servers entry is correctly shell-quoted
after build_hermes_config runs, preserving the existing args-present coverage.
🪄 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: e71eba72-af76-45ac-b2e5-418263fc8fd0
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (25)
ATTRIBUTIONS-Python.mdadapters/common/src/nemo_fabric_adapters/common/hermes.pydocs/integrations/harbor.mdxexamples/harbor/README.mdexamples/harbor/demo/README.mdexamples/harbor/swebench/configs/adapters/codex-cli/fabric-adapter.jsonexamples/harbor/swebench/configs/adapters/hermes-cli/fabric-adapter.jsonexamples/harbor/swebench/configs/codex.yamlexamples/harbor/swebench/configs/hermes-relay.yamlexamples/harbor/swebench/configs/hermes-tools.yamlexamples/harbor/swebench/configs/hermes.yamlexamples/harbor/swebench/mcp.jsonexamples/harbor/swebench/mcp/repo_inspector.pyexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdpyproject.tomlpython/src/nemo_fabric/integrations/harbor/README.mdpython/src/nemo_fabric/integrations/harbor/fabric_agent.pypython/src/nemo_fabric/integrations/harbor/models.pypython/src/nemo_fabric/integrations/harbor/runner.pypython/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/verify_telemetry.pytests/adapters/test_adapaters_common_hermes.pytests/integrations/test_harbor_runner.pytests/integrations/test_harbor_telemetry.pytests/python/test_harbor_integration.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (36)
**/*.{rs,toml}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.{rs,toml}: Rust code must be formatted withcargo fmt --all; formatting can be checked withcargo fmt --all -- --check, and Rust workspaces must compile withcargo check --workspace --locked.
Rust files must begin with the specified//SPDX copyright and Apache-2.0 license header.When Rust code or Rust project configuration changes, run
cargo fmt --all -- --checkandjust test-rust.
Files:
pyproject.toml
**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*: All source files must include the specified SPDX copyright and Apache-2.0 license header using the comment syntax appropriate to the file type.
Release tags must use raw Rust-compatible SemVer without a leadingv, such as0.1.0or0.1.0-rc.1.
**/*: 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.
**/*: Keep pull request branch scope coherent and reviewable.
Run relevant tests undervalidate-changebefore opening or updating a pull request.
Format changed files with the language-native formatter.
Update documentation and examples for public behavior changes.
Update dependent maintainer or consumer guidance when code changes affect APIs, bindings, commands, paths, packaging guidance, or best practices.
Use Conventional Commit style for pull request titles:<type>: <concise imperative summary>, choosing the type from the actual change surface. Usefixonly for user-facing or runtime product-code bug fixes.
A pull request body must include#### Overview,#### Details,#### Validation,#### Where should the reviewer start?, and `#### Related ...
Files:
pyproject.tomlexamples/harbor/swebench/configs/adapters/codex-cli/fabric-adapter.jsonexamples/harbor/swebench/configs/codex.yamlexamples/harbor/swebench/configs/hermes.yamlexamples/harbor/swebench/configs/adapters/hermes-cli/fabric-adapter.jsonpython/src/nemo_fabric/integrations/harbor/README.mdexamples/harbor/swebench/mcp.jsonexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdexamples/harbor/swebench/configs/hermes-relay.yamlpython/src/nemo_fabric/integrations/harbor/verify_telemetry.pyexamples/harbor/swebench/configs/hermes-tools.yamlexamples/harbor/swebench/mcp/repo_inspector.pyadapters/common/src/nemo_fabric_adapters/common/hermes.pydocs/integrations/harbor.mdxpython/src/nemo_fabric/integrations/harbor/models.pyexamples/harbor/README.mdtests/adapters/test_adapaters_common_hermes.pypython/src/nemo_fabric/integrations/harbor/runner.pypython/src/nemo_fabric/integrations/harbor/telemetry.pytests/integrations/test_harbor_telemetry.pyexamples/harbor/demo/README.mdtests/integrations/test_harbor_runner.pyATTRIBUTIONS-Python.mdpython/src/nemo_fabric/integrations/harbor/fabric_agent.pytests/python/test_harbor_integration.py
**/*.{toml,yaml,yml,sh,bash}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
TOML, YAML, and shell files must use the specified SPDX header with
#comments.
Files:
pyproject.tomlexamples/harbor/swebench/configs/codex.yamlexamples/harbor/swebench/configs/hermes.yamlexamples/harbor/swebench/configs/hermes-relay.yamlexamples/harbor/swebench/configs/hermes-tools.yaml
{Cargo.toml,pyproject.toml,python/pyproject.toml,python/src/nemo_fabric/**}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
{Cargo.toml,pyproject.toml,python/pyproject.toml,python/src/nemo_fabric/**}: Keep Rust package names, Python package/import paths, and native module names internally consistent across Cargo and Python packaging metadata and source paths.
Ensure generated native and Python artifacts are placed where downstream consumers expect them.
Files:
pyproject.tomlpython/src/nemo_fabric/integrations/harbor/README.mdpython/src/nemo_fabric/integrations/harbor/verify_telemetry.pypython/src/nemo_fabric/integrations/harbor/models.pypython/src/nemo_fabric/integrations/harbor/runner.pypython/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.py
{Cargo.toml,pyproject.toml,python/pyproject.toml,Cargo.lock,uv.lock}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Keep workspace, Rust, Python, and lockfile versions aligned where required.
Files:
pyproject.toml
{pyproject.toml,python/pyproject.toml,Cargo.toml,python/src/nemo_fabric/**}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
The editable maturin build must continue to produce the
nemo_fabric._nativeextension.
Files:
pyproject.tomlpython/src/nemo_fabric/integrations/harbor/README.mdpython/src/nemo_fabric/integrations/harbor/verify_telemetry.pypython/src/nemo_fabric/integrations/harbor/models.pypython/src/nemo_fabric/integrations/harbor/runner.pypython/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.py
{.github/workflows/ci_python.yml,.github/workflows/ci_rust.yml,justfile,pyproject.toml,python/pyproject.toml,Cargo.toml}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
CI workflows must reference the same package names and commands used by local build and installation workflows.
Files:
pyproject.toml
{Cargo.toml,Cargo.lock,pyproject.toml,python/pyproject.toml,uv.lock,docs/package.json,docs/package-lock.json}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Maintain package metadata and dependency resolution consistently across Rust, Python, documentation tooling, and their lockfiles.
Files:
pyproject.toml
**/pyproject.toml
📄 CodeRabbit inference engine (.agents/skills/update-project-version/SKILL.md)
Run
just build-pythonto verify that all Python package metadata resolves.
Files:
pyproject.toml
**/*.{rs,py,pyi,toml}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
When the PyO3 bridge or package metadata changes, run
just build-pythonandcargo check -p fabric-python --locked.
Files:
pyproject.tomlpython/src/nemo_fabric/integrations/harbor/verify_telemetry.pyexamples/harbor/swebench/mcp/repo_inspector.pyadapters/common/src/nemo_fabric_adapters/common/hermes.pypython/src/nemo_fabric/integrations/harbor/models.pytests/adapters/test_adapaters_common_hermes.pypython/src/nemo_fabric/integrations/harbor/runner.pypython/src/nemo_fabric/integrations/harbor/telemetry.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_runner.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.pytests/python/test_harbor_integration.py
**/*.{json,jsonc}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Public contract changes must keep checked-in JSON Schema snapshots synchronized.
Files:
examples/harbor/swebench/configs/adapters/codex-cli/fabric-adapter.jsonexamples/harbor/swebench/configs/adapters/hermes-cli/fabric-adapter.jsonexamples/harbor/swebench/mcp.json
**/*.{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:
examples/harbor/swebench/configs/adapters/codex-cli/fabric-adapter.jsonexamples/harbor/swebench/configs/codex.yamlexamples/harbor/swebench/configs/hermes.yamlexamples/harbor/swebench/configs/adapters/hermes-cli/fabric-adapter.jsonexamples/harbor/swebench/mcp.jsonexamples/harbor/swebench/configs/hermes-relay.yamlpython/src/nemo_fabric/integrations/harbor/verify_telemetry.pyexamples/harbor/swebench/configs/hermes-tools.yamlexamples/harbor/swebench/mcp/repo_inspector.pyadapters/common/src/nemo_fabric_adapters/common/hermes.pypython/src/nemo_fabric/integrations/harbor/models.pytests/adapters/test_adapaters_common_hermes.pypython/src/nemo_fabric/integrations/harbor/runner.pypython/src/nemo_fabric/integrations/harbor/telemetry.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_runner.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.pytests/python/test_harbor_integration.py
{adapters/**,examples/**}
⚙️ CodeRabbit configuration file
{adapters/**,examples/**}: Review adapter and example changes for command correctness, config/schema consistency, artifact handling, and compatibility with the public Fabric contracts.
Files:
examples/harbor/swebench/configs/adapters/codex-cli/fabric-adapter.jsonexamples/harbor/swebench/configs/codex.yamlexamples/harbor/swebench/configs/hermes.yamlexamples/harbor/swebench/configs/adapters/hermes-cli/fabric-adapter.jsonexamples/harbor/swebench/mcp.jsonexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdexamples/harbor/swebench/configs/hermes-relay.yamlexamples/harbor/swebench/configs/hermes-tools.yamlexamples/harbor/swebench/mcp/repo_inspector.pyadapters/common/src/nemo_fabric_adapters/common/hermes.pyexamples/harbor/README.mdexamples/harbor/demo/README.md
**/*.{md,mdx,html}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Changes affecting public behavior, adapters, examples, or workspace structure must update the corresponding documentation; public API changes require updated SDK or API reference documentation.
Files:
python/src/nemo_fabric/integrations/harbor/README.mdexamples/harbor/swebench/skills/swebench-debugging/SKILL.mddocs/integrations/harbor.mdxexamples/harbor/README.mdexamples/harbor/demo/README.mdATTRIBUTIONS-Python.md
**/README.md
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Update an adapter or example
README.mdwhen that adapter or example surface changes.
Files:
python/src/nemo_fabric/integrations/harbor/README.mdexamples/harbor/README.mdexamples/harbor/demo/README.md
**/*.{md,mdx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
For docs site changes, run
just docsto regenerate Python and Rust API references and validate Fern configuration.
**/*.{md,mdx}: Prioritize factual accuracy in NeMo Fabric documentation and keep commands, package names, APIs, file paths, repository layout, entry points, support claims, examples, and procedures aligned with current repository behavior.
Update relevant entry-point documentation when public behavior changes, includingREADME.md,docs/index.yml, package or crate READMEs, and adapter or integration READMEs.
Use{/* ... */}delimiters for top-of-file SPDX comments in MDX files, not HTML comment delimiters.
CapitalizeNVIDIAcorrectly and use consistent current repository terminology, product names, APIs, and feature names.
Format commands, code, expressions, file names, paths, and filenames as inline code where appropriate.
Use title case for technical-documentation headings.
Introduce code blocks, tables, and lists with complete lead-in sentences.
Use descriptive link text instead of raw URLs or generic labels such ashere.
Write procedures as short, imperative, parallel, easy-to-scan steps; prefer active voice, present tense, plain English, and concise sentences.
Useafterinstead ofoncewhen expressing temporal sequence, and usecaninstead ofmaywhen describing possibility rather than permission.
Use unambiguous date formats and avoid ordinal dates in body text.
When reviewing documentation, report findings in severity order underMust fix,Should fix, andNice to have, with file paths, line references, explanations, and concrete rewrites or directions.
Files:
python/src/nemo_fabric/integrations/harbor/README.mdexamples/harbor/swebench/skills/swebench-debugging/SKILL.mddocs/integrations/harbor.mdxexamples/harbor/README.mdexamples/harbor/demo/README.mdATTRIBUTIONS-Python.md
**/*.{html,md}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
HTML and Markdown files must use the specified SPDX header in an HTML comment.
Files:
python/src/nemo_fabric/integrations/harbor/README.mdexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdexamples/harbor/README.mdexamples/harbor/demo/README.mdATTRIBUTIONS-Python.md
**/*.{md,rst}
📄 CodeRabbit inference engine (.agents/skills/contribute-api/SKILL.md)
Update documentation and examples in the same branch as the public API change.
Verify README and documentation entry points, package names, paths, examples, and public commands remain current after changes.
Files:
python/src/nemo_fabric/integrations/harbor/README.mdexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdexamples/harbor/README.mdexamples/harbor/demo/README.mdATTRIBUTIONS-Python.md
**/*.{md,mdx,rst}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-guide.md)
**/*.{md,mdx,rst}: For NeMo Fabric documentation, verify technical claims against the current repository, public API, or documented command before reviewing style.
Always spellNVIDIAin all caps; do not useNvidia,nvidia, orNV.
Format commands, code elements, expressions, package names, file names, and paths as inline code.
Use descriptive link text; avoid raw URLs and weak anchors such ashereorread more.
Use title case consistently for technical documentation headings.
Introduce code blocks, lists, tables, and images with complete sentences.
Write procedures as imperative, parallel steps; split long procedures into smaller tasks.
Prefer active voice, present tense, short sentences, contractions, and plain English while preserving necessary technical precision.
Usecanfor possibility and reservemayfor permission.
Useafterfor temporal relationships instead ofonce, and preferrefer tooverseewhen directing readers to another resource.
Avoid culture-specific idioms, unnecessary Latinisms, jokes, and marketing exaggeration in technical documentation.
Spell out months in body text, avoid ordinal dates, and use clear time zones.
Spell out whole numbers from zero through nine unless they are technical values, parameters, versions, or UI values; use numerals for 10 or greater and commas in thousands.
Do not add trademark symbols to learning-oriented documentation unless the source, platform, or legal guidance explicitly requires them.
Do not replace precise technical terms with simpler words when doing so would lose precision.
Do not flag passive voice when the actor is unknown or the action is the important part.
Do not rewrite API names, package names, command flags, or code literals for style.
**/*.{md,mdx,rst}: Use consistent title case for technical-document headings and table headers; avoid quotation marks, ampersands, and exclamation marks in headings, while preserving official product, event, research, and whitepaper title ...
Files:
python/src/nemo_fabric/integrations/harbor/README.mdexamples/harbor/swebench/skills/swebench-debugging/SKILL.mddocs/integrations/harbor.mdxexamples/harbor/README.mdexamples/harbor/demo/README.mdATTRIBUTIONS-Python.md
**/*.{md,rst,txt,adoc}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-language-mechanics.md)
**/*.{md,rst,txt,adoc}: For technical documentation, use professional, active, conversational, engaging, precise, and plain-English prose. Prefer active voice, present tense, short sentences, and scannable paragraphs. Avoid casual or imprecise language, swearing, threats, insults, jokes, puns, culture-specific idioms, marketing exaggeration, and unsupported third-party comparisons.
Usecanfor possibility and reservemayfor permission; useafterfor temporal order; userefer tofor cross-references; prefer short direct sentences and specific verbs; avoid unnecessarypleasein technical documentation.
Prefer active voice when the actor matters. Passive voice is acceptable when the actor is unknown or irrelevant, when the action or result is the focus, or in programmer documentation.
Use natural contractions in conversational technical prose, but do not force them in formal legal copy, API references, or generated text.
Prefer simpler English over Latinisms: usefor exampleorsuch asinstead ofe.g.,and so oninstead ofetc.,that isinstead ofi.e.,compared toinstead ofvs., andby,through, orusinginstead ofvia. Use industry-standard terms such as in silico, in vitro, and in vivo when appropriate, and italicize them in running text.
Usethatwithout commas for essential clauses, andwhichwith commas for nonessential clauses.
Format dates and times clearly: spell out months in body text; use forms such asJune 12, 2025; avoid numeric or ordinal dates; capitalize days; use 12-hour time when appropriate; include a space beforea.m.orp.m.; useETandPTfor needed time zones; avoid24/7; and preferfrom 12:30 to 1:00 p.m.for prose ranges.
Format numbers consistently: spell out zero through nine in body text, use numerals for 10 or greater and for technical values, use commas in thousands, do not begin a sentence with a numeral, spell out ordinals, and use numerals consistently within a category wh...
Files:
python/src/nemo_fabric/integrations/harbor/README.mdexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdexamples/harbor/README.mdexamples/harbor/demo/README.mdATTRIBUTIONS-Python.md
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/integrations/harbor/README.mdpython/src/nemo_fabric/integrations/harbor/verify_telemetry.pypython/src/nemo_fabric/integrations/harbor/models.pypython/src/nemo_fabric/integrations/harbor/runner.pypython/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.py
{README.md,docs/**/*.{md,mdx,yml},examples/**/*.{md,mdx,yml}}
📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
Keep package names, repository references, and build commands current in documentation and examples.
Files:
examples/harbor/swebench/skills/swebench-debugging/SKILL.mddocs/integrations/harbor.mdxexamples/harbor/README.mdexamples/harbor/demo/README.md
{docs/**/*.{md,mdx,yml},examples/**/*.{md,mdx,yml}}
📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
Update relevant getting-started, reference, adapter, and example documentation when the corresponding examples or adapters change.
Files:
examples/harbor/swebench/skills/swebench-debugging/SKILL.mddocs/integrations/harbor.mdxexamples/harbor/README.mdexamples/harbor/demo/README.md
**/SKILL.md
⚙️ CodeRabbit configuration file
**/SKILL.md: Do not flag SKILL.md files for missing SPDX headers. Skill entrypoints intentionally start with YAML frontmatter instead.
Verify that every SKILL.md keeps valid YAML frontmatter with at least name and description fields before the Markdown body.
Files:
examples/harbor/swebench/skills/swebench-debugging/SKILL.md
**/*.py
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.py: Python public APIs must use type annotations, and native Python binding declarations must remain synchronized with their Rust implementations.
Python files must begin with the specified#SPDX copyright and Apache-2.0 license header.
Files:
python/src/nemo_fabric/integrations/harbor/verify_telemetry.pyexamples/harbor/swebench/mcp/repo_inspector.pyadapters/common/src/nemo_fabric_adapters/common/hermes.pypython/src/nemo_fabric/integrations/harbor/models.pytests/adapters/test_adapaters_common_hermes.pypython/src/nemo_fabric/integrations/harbor/runner.pypython/src/nemo_fabric/integrations/harbor/telemetry.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_runner.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.pytests/python/test_harbor_integration.py
**/*.{rs,py}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.{rs,py}: Usesnake_casefor Rust and Python functions and variables; usePascalCasefor Rust types and Python classes.
Run tests for every language surface affected by a change. Changes touching the Rust core or public schemas require both Rust and Python test suites.
Public contract changes must keep native Python binding declarations synchronized with their Rust implementations.
Files:
python/src/nemo_fabric/integrations/harbor/verify_telemetry.pyexamples/harbor/swebench/mcp/repo_inspector.pyadapters/common/src/nemo_fabric_adapters/common/hermes.pypython/src/nemo_fabric/integrations/harbor/models.pytests/adapters/test_adapaters_common_hermes.pypython/src/nemo_fabric/integrations/harbor/runner.pypython/src/nemo_fabric/integrations/harbor/telemetry.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_runner.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.pytests/python/test_harbor_integration.py
**/*.{py,pyi}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
When Python code or a Python-facing adapter changes, run
just test-python.
Files:
python/src/nemo_fabric/integrations/harbor/verify_telemetry.pyexamples/harbor/swebench/mcp/repo_inspector.pyadapters/common/src/nemo_fabric_adapters/common/hermes.pypython/src/nemo_fabric/integrations/harbor/models.pytests/adapters/test_adapaters_common_hermes.pypython/src/nemo_fabric/integrations/harbor/runner.pypython/src/nemo_fabric/integrations/harbor/telemetry.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_runner.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.pytests/python/test_harbor_integration.py
**/*.mdx
📄 CodeRabbit inference engine (CONTRIBUTING.md)
MDX files must use the specified SPDX header in a JSX comment.
In MDX files, use JSX comment delimiters (
{/*and*/}) for top-of-file comments, including SPDX headers; do not use HTML comments.
Files:
docs/integrations/harbor.mdx
docs/**/*.{md,mdx,yml}
📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
Run
just docswhen the documentation site changes.
Files:
docs/integrations/harbor.mdx
{docs/**/*,.github/workflows/ci_python.yml,.github/workflows/ci_rust.yml,justfile}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Use the current install, import, build, test, clean, and documentation commands consistently in documentation, examples, CI workflows, and just recipes.
Files:
docs/integrations/harbor.mdx
{docs/**/*,.github/workflows/ci_python.yml,.github/workflows/ci_rust.yml}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Reflect public packaging changes in release-facing documentation and examples.
Files:
docs/integrations/harbor.mdx
docs/**/*
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
For documentation or examples changes, run
just docswhen practical and verify documented commands against the current repository.
Files:
docs/integrations/harbor.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/integrations/harbor.mdx
tests/**/*.py
📄 CodeRabbit inference engine (.agents/skills/python-tests/SKILL.md)
tests/**/*.py: Use Pytest to run Python tests.
Do not add@pytest.mark.asyncioto tests; async tests are automatically detected by the async runner.
Do not add-> Nonereturn annotations to test functions.
When mocking a class, useunittest.mock.MagicMockorAsyncMock, supplyingspecwhen necessary; do not define a new mock class.
Prefix mocked class names withmock, notfake.
Prefer pytest fixtures over helper methods.
Define shared fixtures inconftest.pyrather than repeating them across test files.
Define fixtures using@pytest.fixture(name="<fixture_name>"[, scope="<scope>"])and a<fixture_name>_fixturefunction; specifyscopeonly when it is notfunction.
Preferpytest.mark.parametrizeover separate tests for different input types.
Use@pytest.mark.usefixtureswhen a fixture is needed but its return value is unused.
Useos.environto modify environment variables in tests; do not usemonkeypatch.setenv, because the autouserestore_environ_fixtureintests/conftest.pyrestores the environment after each test.
Avoid defensive programming in tests; access expected data directly so missing data raises a clear error instead of being silently tolerated.
Run focused tests withuv run pytest -k "<pattern>"and all tests withuv run pytest.
Files:
tests/adapters/test_adapaters_common_hermes.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_runner.pytests/python/test_harbor_integration.py
tests/adapters/**/*
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
When an adapter or integration changes, run its focused tests under
tests/adapters, followed byjust test-python.
Files:
tests/adapters/test_adapaters_common_hermes.py
{tests/**,python/tests/**}
⚙️ CodeRabbit configuration file
{tests/**,python/tests/**}: Tests should cover the behavior promised by the changed API surface, including error paths, lifecycle cleanup, and SDK/native parity where relevant.
Files:
tests/adapters/test_adapaters_common_hermes.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_runner.pytests/python/test_harbor_integration.py
🧠 Learnings (2)
📚 Learning: 2026-06-29T22:34:52.407Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 27
File: adapters/codex-cli/fabric-adapter.json:13-15
Timestamp: 2026-06-29T22:34:52.407Z
Learning: In NeMo-Fabric adapter manifest files (e.g., `*/fabric-adapter.json`), keep `config.accepts` limited to the top-level Fabric capability sections that `resolve_capability_plan` consumes (such as `models`, `tools`, `mcp`, `skills`, `telemetry`). Do not add adapter-owned `harness.settings` keys to `config.accepts`; `harness.settings` should remain adapter-owned and be passed through unchanged.
Applied to files:
examples/harbor/swebench/configs/adapters/codex-cli/fabric-adapter.jsonexamples/harbor/swebench/configs/adapters/hermes-cli/fabric-adapter.json
📚 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/integrations/harbor/verify_telemetry.pypython/src/nemo_fabric/integrations/harbor/models.pypython/src/nemo_fabric/integrations/harbor/runner.pypython/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.py
🧬 Code graph analysis (6)
adapters/common/src/nemo_fabric_adapters/common/hermes.py (1)
adapters/common/src/nemo_fabric_adapters/common/utils.py (1)
normalize_list(137-144)
python/src/nemo_fabric/integrations/harbor/models.py (2)
tests/integrations/test_harbor_runner.py (2)
HarborRunSpec(76-94)HarborRunSpec(371-371)python/src/nemo_fabric/integrations/harbor/runner.py (1)
HarborRunSpec(32-32)
python/src/nemo_fabric/integrations/harbor/runner.py (1)
tests/integrations/test_harbor_runner.py (1)
to_mapping(230-231)
tests/integrations/test_harbor_runner.py (1)
python/src/nemo_fabric/integrations/harbor/fabric_agent.py (1)
name(45-46)
python/src/nemo_fabric/integrations/harbor/fabric_agent.py (1)
tests/python/test_harbor_integration.py (2)
FabricAgent(175-188)AgentContext(38-40)
tests/python/test_harbor_integration.py (1)
python/src/nemo_fabric/integrations/harbor/fabric_agent.py (2)
FabricAgent(35-46)populate_context_from_result(296-314)
🪛 ast-grep (0.44.1)
python/src/nemo_fabric/integrations/harbor/verify_telemetry.py
[info] 33-33: use jsonify instead of json.dumps for JSON output
Context: json.dumps(summary, indent=2)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
examples/harbor/swebench/mcp/repo_inspector.py
[info] 41-41: use jsonify instead of json.dumps for JSON output
Context: json.dumps({"root": str(root), "entries": names})
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 59-59: use jsonify instead of json.dumps for JSON output
Context: json.dumps(response)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 62-68: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"jsonrpc": "2.0",
"id": None,
"error": {"code": -32603, "message": str(error)},
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
python/src/nemo_fabric/integrations/harbor/telemetry.py
[info] 48-48: use jsonify instead of json.dumps for JSON output
Context: json.dumps(summary, indent=2)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 53-53: use jsonify instead of json.dumps for JSON output
Context: json.dumps(summary, indent=2)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
tests/integrations/test_harbor_telemetry.py
[info] 48-56: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"atof_version": "1.0",
"kind": "event",
"name": "agent.end",
"timestamp": "2026-07-13T00:00:00Z",
"uuid": "event-1",
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 63-75: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"schema_version": "ATIF-v1.7",
"session_id": "runtime-1",
"agent": {"name": "fabric", "version": "0.1.0"},
"steps": [{"step_id": 1, "source": "agent", "message": "done"}],
"final_metrics": {
"total_prompt_tokens": 12,
"total_completion_tokens": 4,
"total_steps": 1,
},
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 97-104: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"schema_version": "ATIF-v1.7",
"session_id": "019f616c-5eb1-7c92-928f-b4130bd4a519",
"agent": {"name": "fabric", "version": "0.1.0"},
"steps": [{"step_id": 1, "source": "agent", "message": "done"}],
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 124-131: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"schema_version": "ATIF-v1.7",
"session_id": "relay-session-1",
"agent": {"name": "fabric", "version": "0.1.0"},
"steps": [{"step_id": 1, "source": "agent", "message": "done"}],
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 192-199: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"schema_version": "ATIF-v1.7",
"session_id": "runtime-1",
"agent": {"name": "fabric", "version": "0.1.0"},
"steps": [],
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 214-223: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"atof_version": "1.0",
"kind": "event",
"name": "agent.end",
"timestamp": "2026-07-13T00:00:00Z",
"uuid": "event-1",
"data": {"api_key": "sk-thismustneverbeleak123456"},
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
tests/integrations/test_harbor_runner.py
[info] 514-514: Do not hardcode temporary file or directory names
Context: "/tmp/nemo-fabric-config/mcp/repo_inspector.py"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
python/src/nemo_fabric/integrations/harbor/fabric_agent.py
[info] 62-62: Do not hardcode temporary file or directory names
Context: "/tmp/nemo-fabric-config"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
[info] 65-65: Do not hardcode temporary file or directory names
Context: "/tmp/nemo-fabric-venv"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
tests/python/test_harbor_integration.py
[info] 405-418: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"schema_version": "ATIF-v1.7",
"session_id": "runtime-1",
"agent": {"name": "fabric", "version": "0.1.0"},
"steps": [{"step_id": 1, "source": "agent", "message": "done"}],
"final_metrics": {
"total_prompt_tokens": 12,
"total_cached_tokens": 3,
"total_completion_tokens": 4,
"total_cost_usd": 0.25,
}
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 440-440: use jsonify instead of json.dumps for JSON output
Context: json.dumps({"status": "succeeded", "atof": {"records": 7}})
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 278-278: Do not hardcode temporary file or directory names
Context: "/tmp/nemo-fabric-config"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
[info] 279-279: Do not hardcode temporary file or directory names
Context: "/tmp/nemo-fabric-config/agent.yaml"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
[info] 290-290: Do not hardcode temporary file or directory names
Context: "/tmp/nemo-fabric-config/wheelhouse/nemo_fabric.whl"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
[info] 296-296: Do not hardcode temporary file or directory names
Context: "/tmp/nemo-fabric-config"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
[info] 362-362: Do not hardcode temporary file or directory names
Context: "/tmp/nemo-fabric-venv/bin/python -m pip install "
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
[info] 371-371: Do not hardcode temporary file or directory names
Context: "/tmp/nemo-fabric-venv/bin/python"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
[info] 380-380: Do not hardcode temporary file or directory names
Context: "/tmp/custom-fabric/bin/python"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
[info] 396-396: Do not hardcode temporary file or directory names
Context: "/tmp/custom-fabric/bin/python"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
🪛 LanguageTool
examples/harbor/README.md
[style] ~179-~179: Consider replacing this word to strengthen your wording.
Context: ...ic telemetry is a separate quality gate and never changes the SWE-Bench reward. Re...
(AND_THAT)
[style] ~222-~222: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...he credential-free calculator smoke. 3. Run django__django-13741 once with one ha...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
🪛 markdownlint-cli2 (0.23.0)
examples/harbor/README.md
[warning] 22-22: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
🪛 Ruff (0.15.21)
python/src/nemo_fabric/integrations/harbor/telemetry.py
[warning] 97-97: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 108-108: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 116-116: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 119-119: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 134-134: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 140-140: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 161-161: Dynamically typed expressions (typing.Any) are disallowed in value
(ANN401)
[warning] 165-165: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 169-169: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 172-172: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 175-175: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 177-177: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 180-180: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 183-183: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 185-185: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 187-187: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 189-189: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 192-192: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 216-216: Avoid specifying long messages outside the exception class
(TRY003)
tests/integrations/test_harbor_runner.py
[warning] 104-104: Assertion should be broken down into multiple parts
Break down assertion into multiple parts
(PT018)
[warning] 105-105: Assertion should be broken down into multiple parts
Break down assertion into multiple parts
(PT018)
[warning] 247-247: Unused lambda argument: result
(ARG005)
[warning] 247-247: Unused lambda argument: path
(ARG005)
[warning] 247-247: Unused lambda argument: kwargs
(ARG005)
[error] 515-515: Probable insecure usage of temporary file or directory: "/tmp/nemo-fabric-config/mcp/repo_inspector.py"
(S108)
python/src/nemo_fabric/integrations/harbor/fabric_agent.py
[error] 63-63: Probable insecure usage of temporary file or directory: "/tmp/nemo-fabric-config"
(S108)
[error] 66-66: Probable insecure usage of temporary file or directory: "/tmp/nemo-fabric-venv"
(S108)
[warning] 71-71: Dynamically typed expressions (typing.Any) are disallowed in *args
(ANN401)
[warning] 72-72: Dynamically typed expressions (typing.Any) are disallowed in **kwargs
(ANN401)
[warning] 74-74: Star-arg unpacking after a keyword argument is strongly discouraged
(B026)
[warning] 89-89: Avoid specifying long messages outside the exception class
(TRY003)
[error] 109-109: Probable insecure usage of temporary file or directory: "/tmp"
(S108)
[warning] 202-202: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 206-206: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 208-208: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 211-211: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 213-213: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 273-273: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 276-276: Avoid specifying long messages outside the exception class
(TRY003)
tests/python/test_harbor_integration.py
[error] 196-196: Probable insecure usage of temporary file or directory: "/tmp/fabric-run-"
(S108)
[error] 249-249: Probable insecure usage of temporary file or directory: "/tmp/fabric-result-"
(S108)
[warning] 252-252: Async functions should not use pathlib.Path methods, use trio.Path or anyio.path
(ASYNC240)
[error] 279-279: Probable insecure usage of temporary file or directory: "/tmp/nemo-fabric-config"
(S108)
[error] 280-280: Probable insecure usage of temporary file or directory: "/tmp/nemo-fabric-config/agent.yaml"
(S108)
[error] 291-291: Probable insecure usage of temporary file or directory: "/tmp/nemo-fabric-config/wheelhouse/nemo_fabric.whl"
(S108)
[error] 297-297: Probable insecure usage of temporary file or directory: "/tmp/nemo-fabric-config"
(S108)
[error] 372-372: Probable insecure usage of temporary file or directory: "/tmp/nemo-fabric-venv/bin/python"
(S108)
[error] 381-381: Probable insecure usage of temporary file or directory: "/tmp/custom-fabric/bin/python"
(S108)
[error] 397-397: Probable insecure usage of temporary file or directory: "/tmp/custom-fabric/bin/python"
(S108)
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 8
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@adapters/claude/src/nemo_fabric_adapters/claude/adapter.py`:
- Around line 746-849: Reduce run_claude’s complexity by extracting relay
gateway startup, shutdown/plugin cleanup, and cleanup-error merging into focused
helper functions. Keep run_claude responsible for query execution, result
normalization, and orchestration, while preserving existing AdapterRelayError
codes, metadata, output failure handling, and cleanup behavior.
In `@examples/harbor/demo/README.md`:
- Around line 13-20: Update the Requirements section in the README to list both
ANTHROPIC_API_KEY and NVIDIA_API_KEY for the Claude, Hermes, and Relay runs,
while explicitly preserving the credential-free smoke run exemption; keep the
documented prerequisites and commands consistent.
In `@examples/harbor/swebench/mcp/repo_inspector.py`:
- Around line 16-22: Update the request_id annotation in error_response to use
the shared JSON-RPC ID type alias, or define it as str | int | float | None if
no alias exists, instead of Any. Keep the helper’s return type and behavior
unchanged.
- Around line 29-33: Update reply() to validate the JSON-RPC envelope before
dispatch: require an object request with "jsonrpc" equal to "2.0" and a string
method, returning an -32600 invalid-request response for malformed or missing
fields. Preserve -32601 exclusively for valid requests whose method is unknown,
while retaining notification handling for valid requests without an id.
- Around line 63-80: Update the tools/call handling around the arguments
variable in the repo_summary validation flow to default an omitted arguments
value to an empty object before checking it. Preserve rejection of non-object or
non-empty arguments while allowing valid calls where arguments is absent.
In `@examples/harbor/swebench/sample-artifacts/README.md`:
- Around line 6-21: Update the README heading `Qualified harness samples` to
title case as `Qualified Harness Samples`, and change the table header `Model
used for this run` to `Model Used for This Run`; leave the surrounding
documentation unchanged.
In `@python/src/nemo_fabric/integrations/harbor/fabric_agent.py`:
- Around line 354-360: Update the telemetry summary loading try/except around
json.loads and path.read_text in fabric_agent.py to also catch
UnicodeDecodeError, preserving the existing failed-status fallback for malformed
UTF-8 files alongside OSError and json.JSONDecodeError.
In `@python/src/nemo_fabric/integrations/harbor/telemetry.py`:
- Around line 94-99: Update the artifact-path validation surrounding the path
normalization logic to reject any path not contained under the approved
/logs/agent root, including absolute paths such as /etc/passwd. Ensure paths
outside that root raise TelemetryValidationError before reaching is_file() or
read_text(); preserve the existing task_logs-to-logs_dir remapping for approved
paths.
🪄 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: 5148125c-2388-4c6a-a476-f949469a0781
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (34)
adapters/claude/src/nemo_fabric_adapters/claude/adapter.pydocs/integrations/harbor.mdxexamples/harbor/README.mdexamples/harbor/demo/README.mdexamples/harbor/demo/task/environment/Dockerfileexamples/harbor/demo/task/environment/fabric/configs/claude.yamlexamples/harbor/demo/task/environment/fabric/configs/codex.yamlexamples/harbor/demo/task/environment/fabric/configs/hermes.yamlexamples/harbor/swebench/configs/adapters/claude/fabric-adapter.jsonexamples/harbor/swebench/configs/adapters/hermes/fabric-adapter.jsonexamples/harbor/swebench/configs/claude.yamlexamples/harbor/swebench/configs/hermes-relay.yamlexamples/harbor/swebench/configs/hermes-tools.yamlexamples/harbor/swebench/configs/hermes.yamlexamples/harbor/swebench/mcp/repo_inspector.pyexamples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/swebench/sample-artifacts/claude/result-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/telemetry-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/verifier-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/workspace.patchexamples/harbor/swebench/sample-artifacts/hermes/result-summary.jsonexamples/harbor/swebench/sample-artifacts/hermes/telemetry-summary.jsonexamples/harbor/swebench/sample-artifacts/hermes/verifier-summary.jsonexamples/harbor/swebench/sample-artifacts/hermes/workspace.patchexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdpyproject.tomlpython/src/nemo_fabric/integrations/harbor/README.mdpython/src/nemo_fabric/integrations/harbor/fabric_agent.pypython/src/nemo_fabric/integrations/harbor/telemetry.pytests/adapters/test_claude_adapter.pytests/integrations/test_harbor_mcp.pytests/integrations/test_harbor_runner.pytests/integrations/test_harbor_telemetry.pytests/python/test_harbor_integration.py
💤 Files with no reviewable changes (1)
- examples/harbor/demo/task/environment/fabric/configs/codex.yaml
📜 Review details
⏰ Context from checks skipped due to timeout. (7)
- GitHub Check: Test (Python 3.12, x86_64)
- GitHub Check: Test (Python 3.14, x86_64)
- GitHub Check: Test (Python 3.11, arm64)
- GitHub Check: Test (Python 3.12, arm64)
- GitHub Check: Test (Python 3.11, x86_64)
- GitHub Check: Test (Python 3.13, arm64)
- GitHub Check: Build wheels (arm64)
🧰 Additional context used
📓 Path-based instructions (36)
**/*.{rs,toml}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.{rs,toml}: Rust code must be formatted withcargo fmt --all; formatting can be checked withcargo fmt --all -- --check, and Rust workspaces must compile withcargo check --workspace --locked.
Rust files must begin with the specified//SPDX copyright and Apache-2.0 license header.When Rust code or Rust project configuration changes, run
cargo fmt --all -- --checkandjust test-rust.
Files:
pyproject.toml
**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*: All source files must include the specified SPDX copyright and Apache-2.0 license header using the comment syntax appropriate to the file type.
Release tags must use raw Rust-compatible SemVer without a leadingv, such as0.1.0or0.1.0-rc.1.
**/*: 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.
**/*: Keep pull request branch scope coherent and reviewable.
Run relevant tests undervalidate-changebefore opening or updating a pull request.
Format changed files with the language-native formatter.
Update documentation and examples for public behavior changes.
Update dependent maintainer or consumer guidance when code changes affect APIs, bindings, commands, paths, packaging guidance, or best practices.
Use Conventional Commit style for pull request titles:<type>: <concise imperative summary>, choosing the type from the actual change surface. Usefixonly for user-facing or runtime product-code bug fixes.
A pull request body must include#### Overview,#### Details,#### Validation,#### Where should the reviewer start?, and `#### Related ...
Files:
pyproject.tomlexamples/harbor/swebench/sample-artifacts/hermes/verifier-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/verifier-summary.jsonexamples/harbor/swebench/configs/adapters/claude/fabric-adapter.jsonexamples/harbor/swebench/configs/hermes.yamlexamples/harbor/swebench/sample-artifacts/hermes/result-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/telemetry-summary.jsonexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdexamples/harbor/swebench/sample-artifacts/hermes/workspace.patchexamples/harbor/demo/task/environment/fabric/configs/hermes.yamlexamples/harbor/swebench/sample-artifacts/hermes/telemetry-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/result-summary.jsonexamples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/demo/task/environment/fabric/configs/claude.yamlexamples/harbor/swebench/configs/hermes-relay.yamlpython/src/nemo_fabric/integrations/harbor/README.mdexamples/harbor/swebench/configs/adapters/hermes/fabric-adapter.jsondocs/integrations/harbor.mdxexamples/harbor/swebench/configs/claude.yamlexamples/harbor/swebench/sample-artifacts/claude/workspace.patchadapters/claude/src/nemo_fabric_adapters/claude/adapter.pyexamples/harbor/demo/task/environment/Dockerfileexamples/harbor/swebench/configs/hermes-tools.yamlexamples/harbor/README.mdtests/adapters/test_claude_adapter.pytests/integrations/test_harbor_mcp.pyexamples/harbor/swebench/mcp/repo_inspector.pypython/src/nemo_fabric/integrations/harbor/telemetry.pyexamples/harbor/demo/README.mdtests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_runner.pytests/python/test_harbor_integration.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.py
**/*.{toml,yaml,yml,sh,bash}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
TOML, YAML, and shell files must use the specified SPDX header with
#comments.
Files:
pyproject.tomlexamples/harbor/swebench/configs/hermes.yamlexamples/harbor/demo/task/environment/fabric/configs/hermes.yamlexamples/harbor/demo/task/environment/fabric/configs/claude.yamlexamples/harbor/swebench/configs/hermes-relay.yamlexamples/harbor/swebench/configs/claude.yamlexamples/harbor/swebench/configs/hermes-tools.yaml
{Cargo.toml,pyproject.toml,python/pyproject.toml,python/src/nemo_fabric/**}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
{Cargo.toml,pyproject.toml,python/pyproject.toml,python/src/nemo_fabric/**}: Keep Rust package names, Python package/import paths, and native module names internally consistent across Cargo and Python packaging metadata and source paths.
Ensure generated native and Python artifacts are placed where downstream consumers expect them.
Files:
pyproject.tomlpython/src/nemo_fabric/integrations/harbor/README.mdpython/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.py
{Cargo.toml,pyproject.toml,python/pyproject.toml,Cargo.lock,uv.lock}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Keep workspace, Rust, Python, and lockfile versions aligned where required.
Files:
pyproject.toml
{pyproject.toml,python/pyproject.toml,Cargo.toml,python/src/nemo_fabric/**}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
The editable maturin build must continue to produce the
nemo_fabric._nativeextension.
Files:
pyproject.tomlpython/src/nemo_fabric/integrations/harbor/README.mdpython/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.py
{.github/workflows/ci_python.yml,.github/workflows/ci_rust.yml,justfile,pyproject.toml,python/pyproject.toml,Cargo.toml}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
CI workflows must reference the same package names and commands used by local build and installation workflows.
Files:
pyproject.toml
{Cargo.toml,Cargo.lock,pyproject.toml,python/pyproject.toml,uv.lock,docs/package.json,docs/package-lock.json}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Maintain package metadata and dependency resolution consistently across Rust, Python, documentation tooling, and their lockfiles.
Files:
pyproject.toml
**/pyproject.toml
📄 CodeRabbit inference engine (.agents/skills/update-project-version/SKILL.md)
Run
just build-pythonto verify that all Python package metadata resolves.
Files:
pyproject.toml
**/*.{rs,py,pyi,toml}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
When the PyO3 bridge or package metadata changes, run
just build-pythonandcargo check -p fabric-python --locked.
Files:
pyproject.tomladapters/claude/src/nemo_fabric_adapters/claude/adapter.pytests/adapters/test_claude_adapter.pytests/integrations/test_harbor_mcp.pyexamples/harbor/swebench/mcp/repo_inspector.pypython/src/nemo_fabric/integrations/harbor/telemetry.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_runner.pytests/python/test_harbor_integration.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.py
**/*.{json,jsonc}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Public contract changes must keep checked-in JSON Schema snapshots synchronized.
Files:
examples/harbor/swebench/sample-artifacts/hermes/verifier-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/verifier-summary.jsonexamples/harbor/swebench/configs/adapters/claude/fabric-adapter.jsonexamples/harbor/swebench/sample-artifacts/hermes/result-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/telemetry-summary.jsonexamples/harbor/swebench/sample-artifacts/hermes/telemetry-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/result-summary.jsonexamples/harbor/swebench/configs/adapters/hermes/fabric-adapter.json
**/*.{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:
examples/harbor/swebench/sample-artifacts/hermes/verifier-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/verifier-summary.jsonexamples/harbor/swebench/configs/adapters/claude/fabric-adapter.jsonexamples/harbor/swebench/configs/hermes.yamlexamples/harbor/swebench/sample-artifacts/hermes/result-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/telemetry-summary.jsonexamples/harbor/demo/task/environment/fabric/configs/hermes.yamlexamples/harbor/swebench/sample-artifacts/hermes/telemetry-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/result-summary.jsonexamples/harbor/demo/task/environment/fabric/configs/claude.yamlexamples/harbor/swebench/configs/hermes-relay.yamlexamples/harbor/swebench/configs/adapters/hermes/fabric-adapter.jsonexamples/harbor/swebench/configs/claude.yamladapters/claude/src/nemo_fabric_adapters/claude/adapter.pyexamples/harbor/swebench/configs/hermes-tools.yamltests/adapters/test_claude_adapter.pytests/integrations/test_harbor_mcp.pyexamples/harbor/swebench/mcp/repo_inspector.pypython/src/nemo_fabric/integrations/harbor/telemetry.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_runner.pytests/python/test_harbor_integration.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.py
{adapters/**,examples/**}
⚙️ CodeRabbit configuration file
{adapters/**,examples/**}: Review adapter and example changes for command correctness, config/schema consistency, artifact handling, and compatibility with the public Fabric contracts.
Files:
examples/harbor/swebench/sample-artifacts/hermes/verifier-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/verifier-summary.jsonexamples/harbor/swebench/configs/adapters/claude/fabric-adapter.jsonexamples/harbor/swebench/configs/hermes.yamlexamples/harbor/swebench/sample-artifacts/hermes/result-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/telemetry-summary.jsonexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdexamples/harbor/swebench/sample-artifacts/hermes/workspace.patchexamples/harbor/demo/task/environment/fabric/configs/hermes.yamlexamples/harbor/swebench/sample-artifacts/hermes/telemetry-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/result-summary.jsonexamples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/demo/task/environment/fabric/configs/claude.yamlexamples/harbor/swebench/configs/hermes-relay.yamlexamples/harbor/swebench/configs/adapters/hermes/fabric-adapter.jsonexamples/harbor/swebench/configs/claude.yamlexamples/harbor/swebench/sample-artifacts/claude/workspace.patchadapters/claude/src/nemo_fabric_adapters/claude/adapter.pyexamples/harbor/demo/task/environment/Dockerfileexamples/harbor/swebench/configs/hermes-tools.yamlexamples/harbor/README.mdexamples/harbor/swebench/mcp/repo_inspector.pyexamples/harbor/demo/README.md
**/*.{md,mdx,html}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Changes affecting public behavior, adapters, examples, or workspace structure must update the corresponding documentation; public API changes require updated SDK or API reference documentation.
Files:
examples/harbor/swebench/skills/swebench-debugging/SKILL.mdexamples/harbor/swebench/sample-artifacts/README.mdpython/src/nemo_fabric/integrations/harbor/README.mddocs/integrations/harbor.mdxexamples/harbor/README.mdexamples/harbor/demo/README.md
**/*.{md,mdx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
For docs site changes, run
just docsto regenerate Python and Rust API references and validate Fern configuration.
**/*.{md,mdx}: Prioritize factual accuracy in NeMo Fabric documentation and keep commands, package names, APIs, file paths, repository layout, entry points, support claims, examples, and procedures aligned with current repository behavior.
Update relevant entry-point documentation when public behavior changes, includingREADME.md,docs/index.yml, package or crate READMEs, and adapter or integration READMEs.
Use{/* ... */}delimiters for top-of-file SPDX comments in MDX files, not HTML comment delimiters.
CapitalizeNVIDIAcorrectly and use consistent current repository terminology, product names, APIs, and feature names.
Format commands, code, expressions, file names, paths, and filenames as inline code where appropriate.
Use title case for technical-documentation headings.
Introduce code blocks, tables, and lists with complete lead-in sentences.
Use descriptive link text instead of raw URLs or generic labels such ashere.
Write procedures as short, imperative, parallel, easy-to-scan steps; prefer active voice, present tense, plain English, and concise sentences.
Useafterinstead ofoncewhen expressing temporal sequence, and usecaninstead ofmaywhen describing possibility rather than permission.
Use unambiguous date formats and avoid ordinal dates in body text.
When reviewing documentation, report findings in severity order underMust fix,Should fix, andNice to have, with file paths, line references, explanations, and concrete rewrites or directions.
Files:
examples/harbor/swebench/skills/swebench-debugging/SKILL.mdexamples/harbor/swebench/sample-artifacts/README.mdpython/src/nemo_fabric/integrations/harbor/README.mddocs/integrations/harbor.mdxexamples/harbor/README.mdexamples/harbor/demo/README.md
**/*.{html,md}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
HTML and Markdown files must use the specified SPDX header in an HTML comment.
Files:
examples/harbor/swebench/skills/swebench-debugging/SKILL.mdexamples/harbor/swebench/sample-artifacts/README.mdpython/src/nemo_fabric/integrations/harbor/README.mdexamples/harbor/README.mdexamples/harbor/demo/README.md
**/*.{md,rst}
📄 CodeRabbit inference engine (.agents/skills/contribute-api/SKILL.md)
Update documentation and examples in the same branch as the public API change.
Verify README and documentation entry points, package names, paths, examples, and public commands remain current after changes.
Files:
examples/harbor/swebench/skills/swebench-debugging/SKILL.mdexamples/harbor/swebench/sample-artifacts/README.mdpython/src/nemo_fabric/integrations/harbor/README.mdexamples/harbor/README.mdexamples/harbor/demo/README.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/swebench/skills/swebench-debugging/SKILL.mdexamples/harbor/swebench/sample-artifacts/README.mddocs/integrations/harbor.mdxexamples/harbor/README.mdexamples/harbor/demo/README.md
{docs/**/*.{md,mdx,yml},examples/**/*.{md,mdx,yml}}
📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
Update relevant getting-started, reference, adapter, and example documentation when the corresponding examples or adapters change.
Files:
examples/harbor/swebench/skills/swebench-debugging/SKILL.mdexamples/harbor/swebench/sample-artifacts/README.mddocs/integrations/harbor.mdxexamples/harbor/README.mdexamples/harbor/demo/README.md
**/*.{md,mdx,rst}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-guide.md)
**/*.{md,mdx,rst}: For NeMo Fabric documentation, verify technical claims against the current repository, public API, or documented command before reviewing style.
Always spellNVIDIAin all caps; do not useNvidia,nvidia, orNV.
Format commands, code elements, expressions, package names, file names, and paths as inline code.
Use descriptive link text; avoid raw URLs and weak anchors such ashereorread more.
Use title case consistently for technical documentation headings.
Introduce code blocks, lists, tables, and images with complete sentences.
Write procedures as imperative, parallel steps; split long procedures into smaller tasks.
Prefer active voice, present tense, short sentences, contractions, and plain English while preserving necessary technical precision.
Usecanfor possibility and reservemayfor permission.
Useafterfor temporal relationships instead ofonce, and preferrefer tooverseewhen directing readers to another resource.
Avoid culture-specific idioms, unnecessary Latinisms, jokes, and marketing exaggeration in technical documentation.
Spell out months in body text, avoid ordinal dates, and use clear time zones.
Spell out whole numbers from zero through nine unless they are technical values, parameters, versions, or UI values; use numerals for 10 or greater and commas in thousands.
Do not add trademark symbols to learning-oriented documentation unless the source, platform, or legal guidance explicitly requires them.
Do not replace precise technical terms with simpler words when doing so would lose precision.
Do not flag passive voice when the actor is unknown or the action is the important part.
Do not rewrite API names, package names, command flags, or code literals for style.
**/*.{md,mdx,rst}: Use consistent title case for technical-document headings and table headers; avoid quotation marks, ampersands, and exclamation marks in headings, while preserving official product, event, research, and whitepaper title ...
Files:
examples/harbor/swebench/skills/swebench-debugging/SKILL.mdexamples/harbor/swebench/sample-artifacts/README.mdpython/src/nemo_fabric/integrations/harbor/README.mddocs/integrations/harbor.mdxexamples/harbor/README.mdexamples/harbor/demo/README.md
**/*.{md,rst,txt,adoc}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-language-mechanics.md)
**/*.{md,rst,txt,adoc}: For technical documentation, use professional, active, conversational, engaging, precise, and plain-English prose. Prefer active voice, present tense, short sentences, and scannable paragraphs. Avoid casual or imprecise language, swearing, threats, insults, jokes, puns, culture-specific idioms, marketing exaggeration, and unsupported third-party comparisons.
Usecanfor possibility and reservemayfor permission; useafterfor temporal order; userefer tofor cross-references; prefer short direct sentences and specific verbs; avoid unnecessarypleasein technical documentation.
Prefer active voice when the actor matters. Passive voice is acceptable when the actor is unknown or irrelevant, when the action or result is the focus, or in programmer documentation.
Use natural contractions in conversational technical prose, but do not force them in formal legal copy, API references, or generated text.
Prefer simpler English over Latinisms: usefor exampleorsuch asinstead ofe.g.,and so oninstead ofetc.,that isinstead ofi.e.,compared toinstead ofvs., andby,through, orusinginstead ofvia. Use industry-standard terms such as in silico, in vitro, and in vivo when appropriate, and italicize them in running text.
Usethatwithout commas for essential clauses, andwhichwith commas for nonessential clauses.
Format dates and times clearly: spell out months in body text; use forms such asJune 12, 2025; avoid numeric or ordinal dates; capitalize days; use 12-hour time when appropriate; include a space beforea.m.orp.m.; useETandPTfor needed time zones; avoid24/7; and preferfrom 12:30 to 1:00 p.m.for prose ranges.
Format numbers consistently: spell out zero through nine in body text, use numerals for 10 or greater and for technical values, use commas in thousands, do not begin a sentence with a numeral, spell out ordinals, and use numerals consistently within a category wh...
Files:
examples/harbor/swebench/skills/swebench-debugging/SKILL.mdexamples/harbor/swebench/sample-artifacts/README.mdpython/src/nemo_fabric/integrations/harbor/README.mdexamples/harbor/README.mdexamples/harbor/demo/README.md
**/SKILL.md
⚙️ CodeRabbit configuration file
**/SKILL.md: Do not flag SKILL.md files for missing SPDX headers. Skill entrypoints intentionally start with YAML frontmatter instead.
Verify that every SKILL.md keeps valid YAML frontmatter with at least name and description fields before the Markdown body.
Files:
examples/harbor/swebench/skills/swebench-debugging/SKILL.md
**/README.md
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Update an adapter or example
README.mdwhen that adapter or example surface changes.
Files:
examples/harbor/swebench/sample-artifacts/README.mdpython/src/nemo_fabric/integrations/harbor/README.mdexamples/harbor/README.mdexamples/harbor/demo/README.md
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/integrations/harbor/README.mdpython/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.py
**/*.mdx
📄 CodeRabbit inference engine (CONTRIBUTING.md)
MDX files must use the specified SPDX header in a JSX comment.
In MDX files, use JSX comment delimiters (
{/*and*/}) for top-of-file comments, including SPDX headers; do not use HTML comments.
Files:
docs/integrations/harbor.mdx
docs/**/*.{md,mdx,yml}
📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
Run
just docswhen the documentation site changes.
Files:
docs/integrations/harbor.mdx
{docs/**/*,.github/workflows/ci_python.yml,.github/workflows/ci_rust.yml,justfile}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Use the current install, import, build, test, clean, and documentation commands consistently in documentation, examples, CI workflows, and just recipes.
Files:
docs/integrations/harbor.mdx
{docs/**/*,.github/workflows/ci_python.yml,.github/workflows/ci_rust.yml}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Reflect public packaging changes in release-facing documentation and examples.
Files:
docs/integrations/harbor.mdx
docs/**/*
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
For documentation or examples changes, run
just docswhen practical and verify documented commands against the current repository.
Files:
docs/integrations/harbor.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/integrations/harbor.mdx
**/*.py
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.py: Python public APIs must use type annotations, and native Python binding declarations must remain synchronized with their Rust implementations.
Python files must begin with the specified#SPDX copyright and Apache-2.0 license header.
Files:
adapters/claude/src/nemo_fabric_adapters/claude/adapter.pytests/adapters/test_claude_adapter.pytests/integrations/test_harbor_mcp.pyexamples/harbor/swebench/mcp/repo_inspector.pypython/src/nemo_fabric/integrations/harbor/telemetry.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_runner.pytests/python/test_harbor_integration.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.py
**/*.{rs,py}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.{rs,py}: Usesnake_casefor Rust and Python functions and variables; usePascalCasefor Rust types and Python classes.
Run tests for every language surface affected by a change. Changes touching the Rust core or public schemas require both Rust and Python test suites.
Public contract changes must keep native Python binding declarations synchronized with their Rust implementations.
Files:
adapters/claude/src/nemo_fabric_adapters/claude/adapter.pytests/adapters/test_claude_adapter.pytests/integrations/test_harbor_mcp.pyexamples/harbor/swebench/mcp/repo_inspector.pypython/src/nemo_fabric/integrations/harbor/telemetry.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_runner.pytests/python/test_harbor_integration.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.py
**/*.{py,pyi}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
When Python code or a Python-facing adapter changes, run
just test-python.
Files:
adapters/claude/src/nemo_fabric_adapters/claude/adapter.pytests/adapters/test_claude_adapter.pytests/integrations/test_harbor_mcp.pyexamples/harbor/swebench/mcp/repo_inspector.pypython/src/nemo_fabric/integrations/harbor/telemetry.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_runner.pytests/python/test_harbor_integration.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.py
tests/**/*.py
📄 CodeRabbit inference engine (.agents/skills/python-tests/SKILL.md)
tests/**/*.py: Use Pytest to run Python tests.
Do not add@pytest.mark.asyncioto tests; async tests are automatically detected by the async runner.
Do not add-> Nonereturn annotations to test functions.
When mocking a class, useunittest.mock.MagicMockorAsyncMock, supplyingspecwhen necessary; do not define a new mock class.
Prefix mocked class names withmock, notfake.
Prefer pytest fixtures over helper methods.
Define shared fixtures inconftest.pyrather than repeating them across test files.
Define fixtures using@pytest.fixture(name="<fixture_name>"[, scope="<scope>"])and a<fixture_name>_fixturefunction; specifyscopeonly when it is notfunction.
Preferpytest.mark.parametrizeover separate tests for different input types.
Use@pytest.mark.usefixtureswhen a fixture is needed but its return value is unused.
Useos.environto modify environment variables in tests; do not usemonkeypatch.setenv, because the autouserestore_environ_fixtureintests/conftest.pyrestores the environment after each test.
Avoid defensive programming in tests; access expected data directly so missing data raises a clear error instead of being silently tolerated.
Run focused tests withuv run pytest -k "<pattern>"and all tests withuv run pytest.
Files:
tests/adapters/test_claude_adapter.pytests/integrations/test_harbor_mcp.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_runner.pytests/python/test_harbor_integration.py
tests/adapters/**/*
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
When an adapter or integration changes, run its focused tests under
tests/adapters, followed byjust test-python.
Files:
tests/adapters/test_claude_adapter.py
{tests/**,python/tests/**}
⚙️ CodeRabbit configuration file
{tests/**,python/tests/**}: Tests should cover the behavior promised by the changed API surface, including error paths, lifecycle cleanup, and SDK/native parity where relevant.
Files:
tests/adapters/test_claude_adapter.pytests/integrations/test_harbor_mcp.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_runner.pytests/python/test_harbor_integration.py
🧠 Learnings (3)
📚 Learning: 2026-06-29T22:34:52.407Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 27
File: adapters/codex-cli/fabric-adapter.json:13-15
Timestamp: 2026-06-29T22:34:52.407Z
Learning: In NeMo-Fabric adapter manifest files (e.g., `*/fabric-adapter.json`), keep `config.accepts` limited to the top-level Fabric capability sections that `resolve_capability_plan` consumes (such as `models`, `tools`, `mcp`, `skills`, `telemetry`). Do not add adapter-owned `harness.settings` keys to `config.accepts`; `harness.settings` should remain adapter-owned and be passed through unchanged.
Applied to files:
examples/harbor/swebench/configs/adapters/claude/fabric-adapter.jsonexamples/harbor/swebench/configs/adapters/hermes/fabric-adapter.json
📚 Learning: 2026-07-09T22:28:51.689Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 43
File: adapters/claude-sdk/src/nemo_fabric_adapters/claude_sdk/adapter.py:164-168
Timestamp: 2026-07-09T22:28:51.689Z
Learning: In the NeMo-Fabric adapters, treat path values used in Fabric adapter configuration (including logic like `_resolve_path` in adapter.py) as config-root-relative. Do not apply `Path.expanduser()` (or otherwise apply `~`/home or shell-style expansion), because it will make the resolved paths normalize inconsistently across adapters. Also, do not rely on or add any resolution behavior that uses `harness.settings.cwd` as an override point for these adapter paths—`harness.settings.cwd` is explicitly unsupported in this adapter context.
Applied to files:
adapters/claude/src/nemo_fabric_adapters/claude/adapter.py
📚 Learning: 2026-06-28T04:03:32.877Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 26
File: python/tests/smoke_typed_config.py:163-177
Timestamp: 2026-06-28T04:03:32.877Z
Learning: In NVIDIA NeMo Fabric Python SDK serialization of `RuntimeCapabilities` (to satisfy the “parity contract” with Rust core and the CLI), do not emit metadata keys when the corresponding metadata is absent. Instead, omit those fields entirely so the produced JSON matches the Rust/CLI output (e.g., avoid `null`, empty objects, or placeholder metadata). During review, verify the serializer/builders follow this omission rule and that Python outputs/parity tests reflect the same shape.
Applied to files:
python/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.py
🧬 Code graph analysis (4)
adapters/claude/src/nemo_fabric_adapters/claude/adapter.py (3)
adapters/common/src/nemo_fabric_adapters/common/utils.py (6)
load_relay_plugin_config(193-217)write_relay_configs(484-521)collect_relay_artifacts(405-423)config_root(68-69)relay_enabled(157-158)runtime_context(85-86)adapters/common/src/nemo_fabric_adapters/common/relay_gateway.py (7)
RelayGatewayLaunch(31-38)RelayGatewayError(26-27)start_relay_gateway(132-178)relay_cli_observability_version(63-83)stop_relay_gateway(111-129)resolve_relay_command(41-52)find_available_tcp_port(55-60)adapters/common/src/nemo_fabric_adapters/common/relay_hooks.py (1)
render_relay_hooks(45-69)
tests/adapters/test_claude_adapter.py (3)
adapters/claude/src/nemo_fabric_adapters/claude/adapter.py (2)
AdapterConfigError(115-116)run(853-863)adapters/common/src/nemo_fabric_adapters/common/relay_gateway.py (2)
RelayGatewayLaunch(31-38)RelayGatewayError(26-27)adapters/common/src/nemo_fabric_adapters/common/utils.py (1)
runtime_id(89-95)
tests/python/test_harbor_integration.py (1)
python/src/nemo_fabric/integrations/harbor/fabric_agent.py (1)
FabricAgent(35-46)
python/src/nemo_fabric/integrations/harbor/fabric_agent.py (1)
tests/python/test_harbor_integration.py (1)
populate_context_from_telemetry_summary(374-374)
🪛 ast-grep (0.44.1)
adapters/claude/src/nemo_fabric_adapters/claude/adapter.py
[info] 367-375: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"name": "nemo-fabric-relay",
"description": "NeMo Relay hooks managed by NeMo Fabric",
"version": "1.0.0",
},
indent=2,
sort_keys=True,
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 380-384: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
relay_hooks.render_relay_hooks("claude", executable),
indent=2,
sort_keys=True,
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[warning] 445-445: Do not make http calls without encryption
Context: f"http://{gateway_bind}"
Note: [CWE-319] Cleartext Transmission of Sensitive Information.
(requests-http)
tests/adapters/test_claude_adapter.py
[info] 159-168: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"relay": {
"config": {
"atof": {"enabled": True},
"atif": {"enabled": True},
}
}
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 601-601: use jsonify instead of json.dumps for JSON output
Context: json.dumps(output)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 658-658: use jsonify instead of json.dumps for JSON output
Context: json.dumps(output)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 728-728: use jsonify instead of json.dumps for JSON output
Context: json.dumps(output)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 767-767: use jsonify instead of json.dumps for JSON output
Context: json.dumps(output)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
tests/integrations/test_harbor_mcp.py
[info] 105-105: use jsonify instead of json.dumps for JSON output
Context: json.dumps(request)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
examples/harbor/swebench/mcp/repo_inspector.py
[info] 105-105: use jsonify instead of json.dumps for JSON output
Context: json.dumps(response)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 107-107: use jsonify instead of json.dumps for JSON output
Context: json.dumps(error_response(None, -32700, str(error)))
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 109-109: use jsonify instead of json.dumps for JSON output
Context: json.dumps(error_response(request_id, -32603, str(error)))
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
🪛 Ruff (0.15.21)
adapters/claude/src/nemo_fabric_adapters/claude/adapter.py
[warning] 32-32: Use from nemo_fabric_adapters.common import relay_gateway in lieu of alias
Replace with from nemo_fabric_adapters.common import relay_gateway
(PLR0402)
[warning] 33-33: Use from nemo_fabric_adapters.common import relay_hooks in lieu of alias
Replace with from nemo_fabric_adapters.common import relay_hooks
(PLR0402)
[warning] 126-126: Dynamically typed expressions (typing.Any) are disallowed in value
(ANN401)
[warning] 136-136: Dynamically typed expressions (typing.Any) are disallowed in value
(ANN401)
[warning] 149-149: Dynamically typed expressions (typing.Any) are disallowed in value
(ANN401)
[warning] 705-705: Unnecessary dict comprehension for iterable; use dict.fromkeys instead
Replace with dict.fromkeys(iterable))
(C420)
[warning] 746-746: Too many branches (24 > 12)
(PLR0912)
[warning] 746-746: Too many statements (61 > 50)
(PLR0915)
[warning] 869-869: Do not catch blind exception: Exception
(BLE001)
tests/adapters/test_claude_adapter.py
[error] 462-462: Possible hardcoded password assigned to: "FABRIC_UNRELATED_SECRET"
(S105)
[error] 464-464: Possible hardcoded password assigned to: "FABRIC_UNRELATED_SECRET"
(S105)
[warning] 510-510: Missing return type annotation for private function query_result
(ANN202)
[warning] 510-510: Unused function argument: prompt
(ARG001)
[warning] 575-575: Missing return type annotation for private function query_result
(ANN202)
[warning] 575-575: Unused function argument: prompt
(ARG001)
[warning] 575-575: Unused function argument: options
(ARG001)
[warning] 633-633: Missing return type annotation for private function query_result
(ANN202)
[warning] 633-633: Missing type annotation for **_
(ANN003)
[warning] 693-693: Missing return type annotation for private function query_failure
(ANN202)
[warning] 693-693: Unused function argument: prompt
(ARG001)
[warning] 693-693: Unused function argument: options
(ARG001)
[warning] 714-714: Missing return type annotation for private function query_failure
(ANN202)
[warning] 714-714: Missing type annotation for **_
(ANN003)
[warning] 715-717: Create your own exception
(TRY002)
[warning] 715-717: Avoid specifying long messages outside the exception class
(TRY003)
tests/integrations/test_harbor_mcp.py
[warning] 102-102: Missing return type annotation for private function fail_to_list
Add return type annotation: Never
(ANN202)
[warning] 103-103: Avoid specifying long messages outside the exception class
(TRY003)
examples/harbor/swebench/mcp/repo_inspector.py
[warning] 17-17: Dynamically typed expressions (typing.Any) are disallowed in request_id
(ANN401)
[warning] 29-29: Too many return statements (7 > 6)
(PLR0911)
[warning] 102-102: Abstract raise to an inner function
(TRY301)
[warning] 102-102: Avoid specifying long messages outside the exception class
(TRY003)
python/src/nemo_fabric/integrations/harbor/telemetry.py
[warning] 95-95: Avoid specifying long messages outside the exception class
(TRY003)
🔇 Additional comments (38)
pyproject.toml (2)
69-70: 🗄️ Data Integrity & IntegrationRegenerate the checked-in lockfile for this dependency change.
If
uv.lockis tracked, update it so reproducible installs resolve the newharbor>=0.18,<0.19constraint instead of the previous version.Source: Coding guidelines
53-54: LGTM!Also applies to: 75-76, 94-94, 129-129
tests/python/test_harbor_integration.py (1)
17-24: LGTM!Note: the prior review concern about the fallback
AgentContextstub not acceptingmetadata=is now moot — the local stub-injection path was removed in favor ofpytestmark = pytest.mark.usefixtures("requires_harbor"), which skips these tests when Harbor isn't installed rather than simulating it.Also applies to: 34-104, 107-168, 372-403
adapters/claude/src/nemo_fabric_adapters/claude/adapter.py (2)
14-14: LGTM!Also applies to: 32-44, 85-107, 122-167, 234-360, 362-462, 469-538, 554-619, 661-728, 850-877
779-788: 🩺 Stability & AvailabilityNo change needed for this SDK error fallback. The current SDK error string is the expected boundary, and the normalization path is already covered by a regression test.
> Likely an incorrect or invalid review comment.tests/adapters/test_claude_adapter.py (1)
6-9: LGTM!Also applies to: 27-27, 121-305, 318-326, 363-369, 385-419, 422-464, 467-543, 546-663, 665-729, 732-781
tests/integrations/test_harbor_mcp.py (1)
1-113: LGTM!tests/integrations/test_harbor_runner.py (1)
17-30: LGTM!Also applies to: 332-343, 346-360, 380-404, 460-491
tests/integrations/test_harbor_telemetry.py (1)
15-34: LGTM!Also applies to: 162-170
docs/integrations/harbor.mdx (3)
1-23: 📐 Maintainability & Code QualityRun the required MDX validation.
This page changes an MDX entry point. Run
just docsandgit diff --checkbefore merge to validate generated references and Fern configuration.Source: Coding guidelines
16-17: 🎯 Functional CorrectnessClarify the Harbor qualification scope.
The PR objectives report a successful Codex qualification, while these lines state that only Hermes and Claude are currently qualified. If Codex is intentionally excluded because no checked-in example is presented, say that explicitly; otherwise list Codex to avoid contradictory documentation.
9-15: LGTM!Also applies to: 19-23
examples/harbor/demo/task/environment/fabric/configs/claude.yaml (2)
1-13: LGTM!Also applies to: 21-22, 26-37
14-19: 🔒 Security & PrivacyThis Harbor demo profile is intentional and already scoped to an isolated evaluation container.
bypassPermissionsandIS_SANDBOX=1are expected here, so the warning is not actionable for this config.> Likely an incorrect or invalid review comment.examples/harbor/demo/task/environment/fabric/configs/hermes.yaml (1)
17-17: 🩺 Stability & AvailabilityBound the expanded Hermes iteration budget.
Increasing the budget from 4 to 20 can multiply worst-case execution time. Confirm that Harbor enforces a bounded timeout for this config, or add an explicit timeout so stalled runs cannot consume task capacity indefinitely.
examples/harbor/demo/task/environment/Dockerfile (1)
8-8: 🩺 Stability & AvailabilityVerify the removed Node.js and Codex dependencies.
The image still installs the Claude and Hermes integrations, while the PR adds Claude and MCP/tool workflows. Confirm those paths are entirely Python/HTTP-based and do not invoke
node,npm, ornpx; also verify that no remaining demo command requires the removed Codex extra.Also applies to: 17-17
examples/harbor/swebench/sample-artifacts/hermes/result-summary.json (1)
13-16: 🗄️ Data Integrity & IntegrationAlign this sample with the canonical telemetry contract.
The PR objectives state that successful runs publish
agent/trajectory.json, but this successful sample lists no trajectory artifact and its paired telemetry summary isnot_emitted. Confirm that this is intentional; otherwise regenerate the sample, or document why this run is exempt.examples/harbor/swebench/sample-artifacts/hermes/telemetry-summary.json (1)
1-15: LGTM!examples/harbor/swebench/sample-artifacts/hermes/verifier-summary.json (1)
1-12: LGTM!examples/harbor/swebench/sample-artifacts/hermes/workspace.patch (1)
1-6: LGTM!examples/harbor/swebench/configs/adapters/claude/fabric-adapter.json (1)
3-12: LGTM!examples/harbor/swebench/configs/adapters/hermes/fabric-adapter.json (2)
1-15: LGTM!Also applies to: 23-34
16-21: 🗄️ Data Integrity & IntegrationDrop the
modelssuggestion here. The Hermes configs in this directory do not definemodels.default, soconfig.acceptsshould remain limited to the sections this adapter actually consumes:tools,mcp,skills,telemetry.> Likely an incorrect or invalid review comment.examples/harbor/swebench/configs/claude.yaml (1)
1-37: LGTM!examples/harbor/swebench/configs/hermes-relay.yaml (1)
9-16: LGTM!examples/harbor/swebench/configs/hermes-tools.yaml (1)
9-20: LGTM!examples/harbor/swebench/configs/hermes.yaml (1)
7-16: LGTM!examples/harbor/swebench/mcp/repo_inspector.py (1)
13-13: LGTM!Also applies to: 34-51
examples/harbor/swebench/skills/swebench-debugging/SKILL.md (1)
6-14: LGTM!examples/harbor/demo/README.md (2)
106-115: Pin the Phoenix image for reproducible runs.
arizephoenix/phoenix:latestcan change between demo runs. Use an immutable version or digest, matching the reproducibility guidance applied to the other evaluation images.
6-12: LGTM!Also applies to: 21-65, 66-105, 117-205
examples/harbor/README.md (1)
6-6: LGTM!Also applies to: 23-28, 51-61, 80-86, 96-96, 117-179, 181-181, 201-202, 241-248, 250-250, 282-294
python/src/nemo_fabric/integrations/harbor/README.md (1)
6-15: LGTM!examples/harbor/swebench/sample-artifacts/README.md (1)
23-25: LGTM!examples/harbor/swebench/sample-artifacts/claude/result-summary.json (1)
1-18: LGTM!examples/harbor/swebench/sample-artifacts/claude/telemetry-summary.json (1)
1-15: LGTM!examples/harbor/swebench/sample-artifacts/claude/verifier-summary.json (1)
1-12: LGTM!examples/harbor/swebench/sample-artifacts/claude/workspace.patch (1)
1-23: LGTM!
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 8
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@adapters/claude/src/nemo_fabric_adapters/claude/adapter.py`:
- Around line 746-849: Reduce run_claude’s complexity by extracting relay
gateway startup, shutdown/plugin cleanup, and cleanup-error merging into focused
helper functions. Keep run_claude responsible for query execution, result
normalization, and orchestration, while preserving existing AdapterRelayError
codes, metadata, output failure handling, and cleanup behavior.
In `@examples/harbor/demo/README.md`:
- Around line 13-20: Update the Requirements section in the README to list both
ANTHROPIC_API_KEY and NVIDIA_API_KEY for the Claude, Hermes, and Relay runs,
while explicitly preserving the credential-free smoke run exemption; keep the
documented prerequisites and commands consistent.
In `@examples/harbor/swebench/mcp/repo_inspector.py`:
- Around line 16-22: Update the request_id annotation in error_response to use
the shared JSON-RPC ID type alias, or define it as str | int | float | None if
no alias exists, instead of Any. Keep the helper’s return type and behavior
unchanged.
- Around line 29-33: Update reply() to validate the JSON-RPC envelope before
dispatch: require an object request with "jsonrpc" equal to "2.0" and a string
method, returning an -32600 invalid-request response for malformed or missing
fields. Preserve -32601 exclusively for valid requests whose method is unknown,
while retaining notification handling for valid requests without an id.
- Around line 63-80: Update the tools/call handling around the arguments
variable in the repo_summary validation flow to default an omitted arguments
value to an empty object before checking it. Preserve rejection of non-object or
non-empty arguments while allowing valid calls where arguments is absent.
In `@examples/harbor/swebench/sample-artifacts/README.md`:
- Around line 6-21: Update the README heading `Qualified harness samples` to
title case as `Qualified Harness Samples`, and change the table header `Model
used for this run` to `Model Used for This Run`; leave the surrounding
documentation unchanged.
In `@python/src/nemo_fabric/integrations/harbor/fabric_agent.py`:
- Around line 354-360: Update the telemetry summary loading try/except around
json.loads and path.read_text in fabric_agent.py to also catch
UnicodeDecodeError, preserving the existing failed-status fallback for malformed
UTF-8 files alongside OSError and json.JSONDecodeError.
In `@python/src/nemo_fabric/integrations/harbor/telemetry.py`:
- Around line 94-99: Update the artifact-path validation surrounding the path
normalization logic to reject any path not contained under the approved
/logs/agent root, including absolute paths such as /etc/passwd. Ensure paths
outside that root raise TelemetryValidationError before reaching is_file() or
read_text(); preserve the existing task_logs-to-logs_dir remapping for approved
paths.
🪄 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: 5148125c-2388-4c6a-a476-f949469a0781
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (34)
adapters/claude/src/nemo_fabric_adapters/claude/adapter.pydocs/integrations/harbor.mdxexamples/harbor/README.mdexamples/harbor/demo/README.mdexamples/harbor/demo/task/environment/Dockerfileexamples/harbor/demo/task/environment/fabric/configs/claude.yamlexamples/harbor/demo/task/environment/fabric/configs/codex.yamlexamples/harbor/demo/task/environment/fabric/configs/hermes.yamlexamples/harbor/swebench/configs/adapters/claude/fabric-adapter.jsonexamples/harbor/swebench/configs/adapters/hermes/fabric-adapter.jsonexamples/harbor/swebench/configs/claude.yamlexamples/harbor/swebench/configs/hermes-relay.yamlexamples/harbor/swebench/configs/hermes-tools.yamlexamples/harbor/swebench/configs/hermes.yamlexamples/harbor/swebench/mcp/repo_inspector.pyexamples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/swebench/sample-artifacts/claude/result-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/telemetry-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/verifier-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/workspace.patchexamples/harbor/swebench/sample-artifacts/hermes/result-summary.jsonexamples/harbor/swebench/sample-artifacts/hermes/telemetry-summary.jsonexamples/harbor/swebench/sample-artifacts/hermes/verifier-summary.jsonexamples/harbor/swebench/sample-artifacts/hermes/workspace.patchexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdpyproject.tomlpython/src/nemo_fabric/integrations/harbor/README.mdpython/src/nemo_fabric/integrations/harbor/fabric_agent.pypython/src/nemo_fabric/integrations/harbor/telemetry.pytests/adapters/test_claude_adapter.pytests/integrations/test_harbor_mcp.pytests/integrations/test_harbor_runner.pytests/integrations/test_harbor_telemetry.pytests/python/test_harbor_integration.py
💤 Files with no reviewable changes (1)
- examples/harbor/demo/task/environment/fabric/configs/codex.yaml
📜 Review details
🔇 Additional comments (38)
pyproject.toml (2)
69-70: 🗄️ Data Integrity & IntegrationRegenerate the checked-in lockfile for this dependency change.
If
uv.lockis tracked, update it so reproducible installs resolve the newharbor>=0.18,<0.19constraint instead of the previous version.Source: Coding guidelines
53-54: LGTM!Also applies to: 75-76, 94-94, 129-129
tests/python/test_harbor_integration.py (1)
17-24: LGTM!Note: the prior review concern about the fallback
AgentContextstub not acceptingmetadata=is now moot — the local stub-injection path was removed in favor ofpytestmark = pytest.mark.usefixtures("requires_harbor"), which skips these tests when Harbor isn't installed rather than simulating it.Also applies to: 34-104, 107-168, 372-403
adapters/claude/src/nemo_fabric_adapters/claude/adapter.py (2)
14-14: LGTM!Also applies to: 32-44, 85-107, 122-167, 234-360, 362-462, 469-538, 554-619, 661-728, 850-877
779-788: 🩺 Stability & AvailabilityNo change needed for this SDK error fallback. The current SDK error string is the expected boundary, and the normalization path is already covered by a regression test.
> Likely an incorrect or invalid review comment.tests/adapters/test_claude_adapter.py (1)
6-9: LGTM!Also applies to: 27-27, 121-305, 318-326, 363-369, 385-419, 422-464, 467-543, 546-663, 665-729, 732-781
tests/integrations/test_harbor_mcp.py (1)
1-113: LGTM!tests/integrations/test_harbor_runner.py (1)
17-30: LGTM!Also applies to: 332-343, 346-360, 380-404, 460-491
tests/integrations/test_harbor_telemetry.py (1)
15-34: LGTM!Also applies to: 162-170
docs/integrations/harbor.mdx (3)
1-23: 📐 Maintainability & Code QualityRun the required MDX validation.
This page changes an MDX entry point. Run
just docsandgit diff --checkbefore merge to validate generated references and Fern configuration.Source: Coding guidelines
16-17: 🎯 Functional CorrectnessClarify the Harbor qualification scope.
The PR objectives report a successful Codex qualification, while these lines state that only Hermes and Claude are currently qualified. If Codex is intentionally excluded because no checked-in example is presented, say that explicitly; otherwise list Codex to avoid contradictory documentation.
9-15: LGTM!Also applies to: 19-23
examples/harbor/demo/task/environment/fabric/configs/claude.yaml (2)
1-13: LGTM!Also applies to: 21-22, 26-37
14-19: 🔒 Security & PrivacyThis Harbor demo profile is intentional and already scoped to an isolated evaluation container.
bypassPermissionsandIS_SANDBOX=1are expected here, so the warning is not actionable for this config.> Likely an incorrect or invalid review comment.examples/harbor/demo/task/environment/fabric/configs/hermes.yaml (1)
17-17: 🩺 Stability & AvailabilityBound the expanded Hermes iteration budget.
Increasing the budget from 4 to 20 can multiply worst-case execution time. Confirm that Harbor enforces a bounded timeout for this config, or add an explicit timeout so stalled runs cannot consume task capacity indefinitely.
examples/harbor/demo/task/environment/Dockerfile (1)
8-8: 🩺 Stability & AvailabilityVerify the removed Node.js and Codex dependencies.
The image still installs the Claude and Hermes integrations, while the PR adds Claude and MCP/tool workflows. Confirm those paths are entirely Python/HTTP-based and do not invoke
node,npm, ornpx; also verify that no remaining demo command requires the removed Codex extra.Also applies to: 17-17
examples/harbor/swebench/sample-artifacts/hermes/result-summary.json (1)
13-16: 🗄️ Data Integrity & IntegrationAlign this sample with the canonical telemetry contract.
The PR objectives state that successful runs publish
agent/trajectory.json, but this successful sample lists no trajectory artifact and its paired telemetry summary isnot_emitted. Confirm that this is intentional; otherwise regenerate the sample, or document why this run is exempt.examples/harbor/swebench/sample-artifacts/hermes/telemetry-summary.json (1)
1-15: LGTM!examples/harbor/swebench/sample-artifacts/hermes/verifier-summary.json (1)
1-12: LGTM!examples/harbor/swebench/sample-artifacts/hermes/workspace.patch (1)
1-6: LGTM!examples/harbor/swebench/configs/adapters/claude/fabric-adapter.json (1)
3-12: LGTM!examples/harbor/swebench/configs/adapters/hermes/fabric-adapter.json (2)
1-15: LGTM!Also applies to: 23-34
16-21: 🗄️ Data Integrity & IntegrationDrop the
modelssuggestion here. The Hermes configs in this directory do not definemodels.default, soconfig.acceptsshould remain limited to the sections this adapter actually consumes:tools,mcp,skills,telemetry.> Likely an incorrect or invalid review comment.examples/harbor/swebench/configs/claude.yaml (1)
1-37: LGTM!examples/harbor/swebench/configs/hermes-relay.yaml (1)
9-16: LGTM!examples/harbor/swebench/configs/hermes-tools.yaml (1)
9-20: LGTM!examples/harbor/swebench/configs/hermes.yaml (1)
7-16: LGTM!examples/harbor/swebench/mcp/repo_inspector.py (1)
13-13: LGTM!Also applies to: 34-51
examples/harbor/swebench/skills/swebench-debugging/SKILL.md (1)
6-14: LGTM!examples/harbor/demo/README.md (2)
106-115: Pin the Phoenix image for reproducible runs.
arizephoenix/phoenix:latestcan change between demo runs. Use an immutable version or digest, matching the reproducibility guidance applied to the other evaluation images.
6-12: LGTM!Also applies to: 21-65, 66-105, 117-205
examples/harbor/README.md (1)
6-6: LGTM!Also applies to: 23-28, 51-61, 80-86, 96-96, 117-179, 181-181, 201-202, 241-248, 250-250, 282-294
python/src/nemo_fabric/integrations/harbor/README.md (1)
6-15: LGTM!examples/harbor/swebench/sample-artifacts/README.md (1)
23-25: LGTM!examples/harbor/swebench/sample-artifacts/claude/result-summary.json (1)
1-18: LGTM!examples/harbor/swebench/sample-artifacts/claude/telemetry-summary.json (1)
1-15: LGTM!examples/harbor/swebench/sample-artifacts/claude/verifier-summary.json (1)
1-12: LGTM!examples/harbor/swebench/sample-artifacts/claude/workspace.patch (1)
1-23: LGTM!
🛑 Comments failed to post (8)
adapters/claude/src/nemo_fabric_adapters/claude/adapter.py (1)
746-849: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoff
run_claudecomplexity flagged by static analysis (24 branches / 61 statements).The function now orchestrates gateway start/stop, query timeout, two layers of exception normalization, session persistence, and cleanup-error merging in one body. Extracting the relay start/stop and cleanup-merge logic into small helpers would reduce branching and ease future changes, though this is a stability/readability improvement rather than a fix for an active defect.
🧰 Tools
🪛 Ruff (0.15.21)
[warning] 746-746: Too many branches (24 > 12)
(PLR0912)
[warning] 746-746: Too many statements (61 > 50)
(PLR0915)
🤖 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/src/nemo_fabric_adapters/claude/adapter.py` around lines 746 - 849, Reduce run_claude’s complexity by extracting relay gateway startup, shutdown/plugin cleanup, and cleanup-error merging into focused helper functions. Keep run_claude responsible for query execution, result normalization, and orchestration, while preserving existing AdapterRelayError codes, metadata, output failure handling, and cleanup behavior.Source: Linters/SAST tools
examples/harbor/demo/README.md (1)
13-20: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Document the NVIDIA credential required by Hermes.
The requirements list only
ANTHROPIC_API_KEY, but the Hermes and Relay commands requireNVIDIA_API_KEY. Add both credentials while keeping the credential-free smoke explicitly exempt.As per path instructions, example prerequisites and commands should remain consistent.
🤖 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 `@examples/harbor/demo/README.md` around lines 13 - 20, Update the Requirements section in the README to list both ANTHROPIC_API_KEY and NVIDIA_API_KEY for the Claude, Hermes, and Relay runs, while explicitly preserving the credential-free smoke run exemption; keep the documented prerequisites and commands consistent.Source: Path instructions
examples/harbor/swebench/mcp/repo_inspector.py (3)
16-22: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Avoid
Anyfor JSON-RPC request IDs.Ruff reports
ANN401onrequest_id: Any. Use a shared JSON-RPC ID alias such asstr | int | float | Noneso the helper remains typed without accepting arbitrary values.🧰 Tools
🪛 Ruff (0.15.21)
[warning] 17-17: Dynamically typed expressions (typing.Any) are disallowed in
request_id(ANN401)
🤖 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 `@examples/harbor/swebench/mcp/repo_inspector.py` around lines 16 - 22, Update the request_id annotation in error_response to use the shared JSON-RPC ID type alias, or define it as str | int | float | None if no alias exists, instead of Any. Keep the helper’s return type and behavior unchanged.Source: Linters/SAST tools
29-33: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash set -euo pipefail file="examples/harbor/swebench/mcp/repo_inspector.py" echo '--- file length ---' wc -l "$file" echo '--- lines 1-180 ---' sed -n '1,180p' "$file" | cat -n echo '--- search for error handling / jsonrpc ---' rg -n '"jsonrpc"|TypeError|JSONRPC|method|get\("id"\)|get\("method"\)|-32600|-32601|-32603' "$file"Repository: NVIDIA/NeMo-Fabric
Length of output: 5651
Treat malformed JSON-RPC envelopes as
-32600. Non-object inputs currently fall into the generic-32603path, andreply()maps missing or non-stringmethodvalues to-32601without checking"jsonrpc": "2.0". Reject invalid request objects up front and reserve-32601for unknown methods.🧰 Tools
🪛 Ruff (0.15.21)
[warning] 29-29: Too many return statements (7 > 6)
(PLR0911)
🤖 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 `@examples/harbor/swebench/mcp/repo_inspector.py` around lines 29 - 33, Update reply() to validate the JSON-RPC envelope before dispatch: require an object request with "jsonrpc" equal to "2.0" and a string method, returning an -32600 invalid-request response for malformed or missing fields. Preserve -32601 exclusively for valid requests whose method is unknown, while retaining notification handling for valid requests without an id.
63-80: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash set -euo pipefail # Inspect the target file and nearby context sed -n '1,140p' examples/harbor/swebench/mcp/repo_inspector.py # Locate any other tools/call handling or repo_summary references rg -n "repo_summary|tools/call|arguments" examples/harbor/swebench/mcp -SRepository: NVIDIA/NeMo-Fabric
Length of output: 4948
🌐 Web query:
MCP tools/call arguments optional schema 2025-06-18 repo_summary no-argument tools/call arguments optional💡 Result:
In the Model Context Protocol (MCP), the inputSchema field must be a valid JSON Schema object [1][2]. For tools that require no arguments, the recommended approach is to define the inputSchema as an object that explicitly accepts no properties [1][2]: { "type": "object", "additionalProperties": false } While a simpler definition of { "type": "object" } is also valid (accepting any object), the recommended { "type": "object", "additionalProperties": false } approach provides stricter validation by explicitly rejecting unexpected arguments [1][2]. Regarding repo_summary, this is a common utility tool name used in various MCP implementations (such as Repo Therapist [3][4] or code-graph-mcp [5]) to provide high-level summaries of repositories. It is not a standard protocol-level tool but rather a convention adopted by developers building repository analysis servers [3][6]. Summary of Key Points: 1. Argument Schemas: All MCP tools must define an inputSchema, even when no arguments are required [1][2]. 2. Best Practice: Use { "type": "object", "additionalProperties": false } to strictly enforce that no arguments are provided [1][2]. 3. Tool Usage: repo_summary is a community-developed tool found in multiple repository-centric MCP servers [5][3][6], used for generating high-level overviews of codebases [5][4].
Citations:
- 1: https://modelcontextprotocol.io/specification/2025-11-25/server/tools.md
- 2: https://github.com/modelcontextprotocol/modelcontextprotocol/blob/ff960c9e/docs/specification/draft/server/tools.mdx
- 3: https://github.com/salman-arefin74/repo-therapist
- 4: https://glama.ai/mcp/servers/salman-arefin74/repo-therapist
- 5: https://glama.ai/mcp/servers/dorkian/code-graph-mcp/tools/repo_summary
- 6: https://github.com/mcp-tool-shop-org/repo-knowledge
🏁 Script executed:
#!/bin/bash set -euo pipefail python3 - <<'PY' from pathlib import Path p = Path('examples/harbor/swebench/mcp/repo_inspector.py') text = p.read_text() for i, line in enumerate(text.splitlines(), 1): if 1 <= i <= 140: print(f"{i:4}: {line}") PYRepository: NVIDIA/NeMo-Fabric
Length of output: 4787
🌐 Web query:
MCP 2025-03-26 tools/call arguments optional specification💡 Result:
In the Model Context Protocol (MCP) specification dated March 26, 2025, the
tools/callrequest parameters include anargumentsfield that is defined as optional [1][2]. Specifically, theCallToolRequestinterface in the 2025-03-26 schema is defined as: { "method": "tools/call", "params": { "name": "string", "arguments"?: { [key: string]: unknown } } } When a client invokes a tool, theargumentsare validated against the tool'sinputSchema[3]. While theargumentsfield itself is optional in the protocol request, individual parameters within theinputSchemadefine whether they are required or optional for the specific tool being called [3]. If a tool definition expects specific parameters, those must be provided according to the JSON Schema defined in the tool'sinputSchema[3]. If required parameters are missing from theargumentsobject, the server should reject the call with a validation error [3].Citations:
- 1: https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/schema/2025-06-18/schema.ts
- 2: https://github.com/modelcontextprotocol/specification/blob/main/schema/2025-03-26/schema.ts
- 3: https://docs.getmcp.com/api-reference/mcp-protocol/tools-call
Accept omitted
argumentsforrepo_summary.
tools/callallowsargumentsto be omitted; default it to{}before the empty-object check so valid no-arg calls torepo_summaryaren’t rejected.🤖 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 `@examples/harbor/swebench/mcp/repo_inspector.py` around lines 63 - 80, Update the tools/call handling around the arguments variable in the repo_summary validation flow to default an omitted arguments value to an empty object before checking it. Preserve rejection of non-object or non-empty arguments while allowing valid calls where arguments is absent.examples/harbor/swebench/sample-artifacts/README.md (1)
6-21: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use title case for the heading and table header.
Change
Qualified harness samplestoQualified Harness SamplesandModel used for this runtoModel Used for This Run.As per coding guidelines, technical-documentation headings and table headers must use title 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 `@examples/harbor/swebench/sample-artifacts/README.md` around lines 6 - 21, Update the README heading `Qualified harness samples` to title case as `Qualified Harness Samples`, and change the table header `Model used for this run` to `Model Used for This Run`; leave the surrounding documentation unchanged.Source: Coding guidelines
python/src/nemo_fabric/integrations/harbor/fabric_agent.py (1)
354-360: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
python - <<'PY' from pathlib import Path from tempfile import TemporaryDirectory with TemporaryDirectory() as directory: path = Path(directory) / "telemetry-validation.json" path.write_bytes(b"\xff") try: path.read_text(encoding="utf-8") except Exception as error: print(type(error).__name__) PYRepository: NVIDIA/NeMo-Fabric
Length of output: 175
Catch invalid UTF-8 telemetry files.
Path.read_text(encoding="utf-8")can raiseUnicodeDecodeError, so a malformed summary file still escapes this fallback and aborts post-run handling. Add it to the existing handler.- except (OSError, json.JSONDecodeError): + except (OSError, UnicodeDecodeError, json.JSONDecodeError):📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.try: summary = json.loads(path.read_text(encoding="utf-8")) except (OSError, UnicodeDecodeError, json.JSONDecodeError): summary = { "status": "failed", "error": "telemetry summary could not be loaded", }🤖 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/integrations/harbor/fabric_agent.py` around lines 354 - 360, Update the telemetry summary loading try/except around json.loads and path.read_text in fabric_agent.py to also catch UnicodeDecodeError, preserving the existing failed-status fallback for malformed UTF-8 files alongside OSError and json.JSONDecodeError.python/src/nemo_fabric/integrations/harbor/telemetry.py (1)
94-99: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
rg -n -C 4 '_resolve_artifact_path|artifact.*path|ATOF|ATIF' \ python/src/nemo_fabric/integrations/harbor tests/integrationsRepository: NVIDIA/NeMo-Fabric
Length of output: 26466
🏁 Script executed:
#!/bin/bash set -euo pipefail printf '\n## telemetry.py excerpt\n' sed -n '90,105p' python/src/nemo_fabric/integrations/harbor/telemetry.py printf '\n## relevant test cases\n' sed -n '120,175p' tests/integrations/test_harbor_telemetry.py printf '\n## search for artifact path creation / rewrite logic\n' rg -n -C 3 'artifact\.path|path\.is_relative_to\(|relative_to\(task_logs\)|logs_dir / relative|/logs/agent|trajectory\.json|fabric-artifacts' \ python/src/nemo_fabric/integrations/harbor tests/integrationsRepository: NVIDIA/NeMo-Fabric
Length of output: 15330
Restrict artifact paths to
/logs/agent.
Reject paths outside the approved root, not just..segments. As written, an absolute artifact path like/etc/passwdstill returns unchanged and can be read viais_file()/read_text()on the host. If external locations are intentional, allowlist them explicitly.🧰 Tools
🪛 Ruff (0.15.21)
[warning] 95-95: Avoid specifying long messages outside the exception class
(TRY003)
🤖 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/integrations/harbor/telemetry.py` around lines 94 - 99, Update the artifact-path validation surrounding the path normalization logic to reject any path not contained under the approved /logs/agent root, including absolute paths such as /etc/passwd. Ensure paths outside that root raise TelemetryValidationError before reaching is_file() or read_text(); preserve the existing task_logs-to-logs_dir remapping for approved paths.
d14d769 to
b1dbfaf
Compare
There was a problem hiding this comment.
Actionable comments posted: 12
🤖 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 779-788: Make the known Claude SDK error detection in the
exception handler less brittle by matching the stable phrase “returned an error
result” rather than the full exact prefix, while preserving the existing
re-raise fallback for unrelated exceptions and the _failure normalization for
recognized errors.
In `@examples/harbor/README.md`:
- Around line 250-264: Split the eight-step procedure under “Progress from a
Spot Check to a Full Run” into two subsections: a spot-check section containing
steps 1–5 and a scale-up section containing steps 6–8. Preserve the existing
instructions and ordering while resetting or clearly continuing the numbering
within the new sections.
- Around line 176-179: Update the Harbor README instruction to replace “See
NVIDIA's tool-calling guidance” with “Refer to NVIDIA's tool-calling guidance,”
preserving the existing link and surrounding wording.
- Around line 284-292: Update the table entry referencing the demo Dockerfile to
replace “via” with “by,” “through,” or “using,” while preserving the existing
path and COPY relationship.
In `@examples/harbor/swebench/configs/adapters/hermes/fabric-adapter.json`:
- Around line 15-21: Add "models" to the config.accepts capability list in the
Hermes fabric-adapter manifest so resolve_capability_plan forwards the top-level
model configuration. Keep adapter-owned harness.settings capabilities out of
this list and preserve the existing accepted capabilities.
In `@examples/harbor/swebench/mcp/repo_inspector.py`:
- Around line 67-81: Update the argument handling in the repo_summary request
path to default a missing arguments value from params.get("arguments") to an
empty object before validation. Keep rejecting non-dict or non-empty arguments
through the existing error_response call, while allowing omitted arguments to
proceed.
In `@examples/harbor/swebench/sample-artifacts/README.md`:
- Line 16: Update the README wording in the affected documentation: replace “may
have produced” with “can have produced,” and rename the table header to “Model
Used for This Run.”
In `@python/src/nemo_fabric/integrations/harbor/fabric_agent.py`:
- Around line 123-138: Update the installation execution paths in the agent’s
package-installation flow to stop passing the complete _extra_env. Build and
pass a separate explicitly allowlisted environment containing only variables
required for installation, and use it for both fabric_install_command(...) and
self.fabric_install_command branches while preserving the existing execution
settings.
- Around line 323-327: Update the trajectory loading block in the post-run
validation flow to catch OSError from path.read_text alongside ValueError,
record the failure through _record_host_atif_validation with the error details,
and return without allowing the I/O exception to escape.
In `@python/src/nemo_fabric/integrations/harbor/telemetry.py`:
- Around line 37-54: Separate evidence filesystem failures from telemetry
validation in the surrounding telemetry runner flow. Wrap logs_dir.mkdir and
both summary_path.write_text calls so OSError does not fail a successful run; in
strict=False mode, retain the summary result and continue when evidence output
fails, while strict=True should propagate the evidence I/O failure. Keep
validation errors and their existing strict behavior unchanged.
- Around line 102-121: The _validate_atof function currently checks only
required keys; add validation that atof_version, kind, name, timestamp, and uuid
are non-null and have their expected types and formats before incrementing
records or counts. Reject invalid values with TelemetryValidationError that
identifies the artifact and line number, while preserving the existing
required-field and secret checks.
In `@tests/integrations/test_harbor_mcp.py`:
- Around line 58-87: Add a regression test alongside
test_mcp_tools_call_rejects_unknown_tool and
test_mcp_tools_call_rejects_nonempty_arguments that calls the parameterless
repo_summary tool without an arguments key. Assert the response is successful
and preserves the expected request id and tool result, covering acceptance of
omitted arguments.
🪄 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: e7812bf3-f97d-48be-80ee-bd06c90708fc
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (39)
ATTRIBUTIONS-Python.mdadapters/claude/src/nemo_fabric_adapters/claude/adapter.pydocs/integrations/harbor.mdxexamples/harbor/README.mdexamples/harbor/demo/README.mdexamples/harbor/demo/task/environment/Dockerfileexamples/harbor/demo/task/environment/fabric/configs/claude.yamlexamples/harbor/demo/task/environment/fabric/configs/codex.yamlexamples/harbor/demo/task/environment/fabric/configs/hermes.yamlexamples/harbor/swebench/configs/adapters/claude/fabric-adapter.jsonexamples/harbor/swebench/configs/adapters/hermes/fabric-adapter.jsonexamples/harbor/swebench/configs/claude.yamlexamples/harbor/swebench/configs/hermes-relay.yamlexamples/harbor/swebench/configs/hermes-tools.yamlexamples/harbor/swebench/configs/hermes.yamlexamples/harbor/swebench/mcp.jsonexamples/harbor/swebench/mcp/repo_inspector.pyexamples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/swebench/sample-artifacts/claude/result-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/telemetry-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/verifier-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/workspace.patchexamples/harbor/swebench/sample-artifacts/hermes/result-summary.jsonexamples/harbor/swebench/sample-artifacts/hermes/telemetry-summary.jsonexamples/harbor/swebench/sample-artifacts/hermes/verifier-summary.jsonexamples/harbor/swebench/sample-artifacts/hermes/workspace.patchexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdpyproject.tomlpython/src/nemo_fabric/integrations/harbor/README.mdpython/src/nemo_fabric/integrations/harbor/fabric_agent.pypython/src/nemo_fabric/integrations/harbor/models.pypython/src/nemo_fabric/integrations/harbor/runner.pypython/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/verify_telemetry.pytests/adapters/test_claude_adapter.pytests/integrations/test_harbor_mcp.pytests/integrations/test_harbor_runner.pytests/integrations/test_harbor_telemetry.pytests/python/test_harbor_integration.py
💤 Files with no reviewable changes (1)
- examples/harbor/demo/task/environment/fabric/configs/codex.yaml
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
- GitHub Check: Test (Python 3.11, x86_64)
🧰 Additional context used
📓 Path-based instructions (36)
**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*: All source files must include the specified SPDX copyright and Apache-2.0 license header using the comment syntax appropriate to the file type.
Release tags must use raw Rust-compatible SemVer without a leadingv, such as0.1.0or0.1.0-rc.1.
**/*: 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.
**/*: Keep pull request branch scope coherent and reviewable.
Run relevant tests undervalidate-changebefore opening or updating a pull request.
Format changed files with the language-native formatter.
Update documentation and examples for public behavior changes.
Update dependent maintainer or consumer guidance when code changes affect APIs, bindings, commands, paths, packaging guidance, or best practices.
Use Conventional Commit style for pull request titles:<type>: <concise imperative summary>, choosing the type from the actual change surface. Usefixonly for user-facing or runtime product-code bug fixes.
A pull request body must include#### Overview,#### Details,#### Validation,#### Where should the reviewer start?, and `#### Related ...
Files:
examples/harbor/demo/task/environment/fabric/configs/hermes.yamlexamples/harbor/swebench/mcp.jsonexamples/harbor/swebench/sample-artifacts/claude/telemetry-summary.jsonexamples/harbor/swebench/configs/hermes.yamlexamples/harbor/swebench/sample-artifacts/claude/result-summary.jsonpyproject.tomlexamples/harbor/swebench/sample-artifacts/hermes/verifier-summary.jsonexamples/harbor/swebench/sample-artifacts/hermes/result-summary.jsonexamples/harbor/swebench/configs/adapters/hermes/fabric-adapter.jsonexamples/harbor/swebench/sample-artifacts/hermes/telemetry-summary.jsonexamples/harbor/demo/task/environment/fabric/configs/claude.yamlexamples/harbor/swebench/sample-artifacts/claude/verifier-summary.jsonexamples/harbor/swebench/configs/adapters/claude/fabric-adapter.jsonexamples/harbor/swebench/configs/hermes-relay.yamlexamples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdexamples/harbor/swebench/sample-artifacts/hermes/workspace.patchexamples/harbor/swebench/configs/hermes-tools.yamlpython/src/nemo_fabric/integrations/harbor/verify_telemetry.pytests/adapters/test_claude_adapter.pypython/src/nemo_fabric/integrations/harbor/README.mdexamples/harbor/swebench/configs/claude.yamldocs/integrations/harbor.mdxpython/src/nemo_fabric/integrations/harbor/models.pyexamples/harbor/swebench/sample-artifacts/claude/workspace.patchexamples/harbor/demo/task/environment/Dockerfiletests/integrations/test_harbor_mcp.pytests/integrations/test_harbor_telemetry.pypython/src/nemo_fabric/integrations/harbor/runner.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.pyexamples/harbor/swebench/mcp/repo_inspector.pyexamples/harbor/README.mdATTRIBUTIONS-Python.mdpython/src/nemo_fabric/integrations/harbor/telemetry.pyexamples/harbor/demo/README.mdpython/src/nemo_fabric/integrations/harbor/fabric_agent.pytests/python/test_harbor_integration.pytests/integrations/test_harbor_runner.py
**/*.{toml,yaml,yml,sh,bash}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
TOML, YAML, and shell files must use the specified SPDX header with
#comments.
Files:
examples/harbor/demo/task/environment/fabric/configs/hermes.yamlexamples/harbor/swebench/configs/hermes.yamlpyproject.tomlexamples/harbor/demo/task/environment/fabric/configs/claude.yamlexamples/harbor/swebench/configs/hermes-relay.yamlexamples/harbor/swebench/configs/hermes-tools.yamlexamples/harbor/swebench/configs/claude.yaml
**/*.{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:
examples/harbor/demo/task/environment/fabric/configs/hermes.yamlexamples/harbor/swebench/mcp.jsonexamples/harbor/swebench/sample-artifacts/claude/telemetry-summary.jsonexamples/harbor/swebench/configs/hermes.yamlexamples/harbor/swebench/sample-artifacts/claude/result-summary.jsonexamples/harbor/swebench/sample-artifacts/hermes/verifier-summary.jsonexamples/harbor/swebench/sample-artifacts/hermes/result-summary.jsonexamples/harbor/swebench/configs/adapters/hermes/fabric-adapter.jsonexamples/harbor/swebench/sample-artifacts/hermes/telemetry-summary.jsonexamples/harbor/demo/task/environment/fabric/configs/claude.yamlexamples/harbor/swebench/sample-artifacts/claude/verifier-summary.jsonexamples/harbor/swebench/configs/adapters/claude/fabric-adapter.jsonexamples/harbor/swebench/configs/hermes-relay.yamlexamples/harbor/swebench/configs/hermes-tools.yamlpython/src/nemo_fabric/integrations/harbor/verify_telemetry.pytests/adapters/test_claude_adapter.pyexamples/harbor/swebench/configs/claude.yamlpython/src/nemo_fabric/integrations/harbor/models.pytests/integrations/test_harbor_mcp.pytests/integrations/test_harbor_telemetry.pypython/src/nemo_fabric/integrations/harbor/runner.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.pyexamples/harbor/swebench/mcp/repo_inspector.pypython/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.pytests/python/test_harbor_integration.pytests/integrations/test_harbor_runner.py
{adapters/**,examples/**}
⚙️ CodeRabbit configuration file
{adapters/**,examples/**}: Review adapter and example changes for command correctness, config/schema consistency, artifact handling, and compatibility with the public Fabric contracts.
Files:
examples/harbor/demo/task/environment/fabric/configs/hermes.yamlexamples/harbor/swebench/mcp.jsonexamples/harbor/swebench/sample-artifacts/claude/telemetry-summary.jsonexamples/harbor/swebench/configs/hermes.yamlexamples/harbor/swebench/sample-artifacts/claude/result-summary.jsonexamples/harbor/swebench/sample-artifacts/hermes/verifier-summary.jsonexamples/harbor/swebench/sample-artifacts/hermes/result-summary.jsonexamples/harbor/swebench/configs/adapters/hermes/fabric-adapter.jsonexamples/harbor/swebench/sample-artifacts/hermes/telemetry-summary.jsonexamples/harbor/demo/task/environment/fabric/configs/claude.yamlexamples/harbor/swebench/sample-artifacts/claude/verifier-summary.jsonexamples/harbor/swebench/configs/adapters/claude/fabric-adapter.jsonexamples/harbor/swebench/configs/hermes-relay.yamlexamples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdexamples/harbor/swebench/sample-artifacts/hermes/workspace.patchexamples/harbor/swebench/configs/hermes-tools.yamlexamples/harbor/swebench/configs/claude.yamlexamples/harbor/swebench/sample-artifacts/claude/workspace.patchexamples/harbor/demo/task/environment/Dockerfileadapters/claude/src/nemo_fabric_adapters/claude/adapter.pyexamples/harbor/swebench/mcp/repo_inspector.pyexamples/harbor/README.mdexamples/harbor/demo/README.md
**/*.{json,jsonc}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Public contract changes must keep checked-in JSON Schema snapshots synchronized.
Files:
examples/harbor/swebench/mcp.jsonexamples/harbor/swebench/sample-artifacts/claude/telemetry-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/result-summary.jsonexamples/harbor/swebench/sample-artifacts/hermes/verifier-summary.jsonexamples/harbor/swebench/sample-artifacts/hermes/result-summary.jsonexamples/harbor/swebench/configs/adapters/hermes/fabric-adapter.jsonexamples/harbor/swebench/sample-artifacts/hermes/telemetry-summary.jsonexamples/harbor/swebench/sample-artifacts/claude/verifier-summary.jsonexamples/harbor/swebench/configs/adapters/claude/fabric-adapter.json
**/*.{rs,toml}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.{rs,toml}: Rust code must be formatted withcargo fmt --all; formatting can be checked withcargo fmt --all -- --check, and Rust workspaces must compile withcargo check --workspace --locked.
Rust files must begin with the specified//SPDX copyright and Apache-2.0 license header.When Rust code or Rust project configuration changes, run
cargo fmt --all -- --checkandjust test-rust.
Files:
pyproject.toml
{Cargo.toml,pyproject.toml,python/pyproject.toml,python/src/nemo_fabric/**}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
{Cargo.toml,pyproject.toml,python/pyproject.toml,python/src/nemo_fabric/**}: Keep Rust package names, Python package/import paths, and native module names internally consistent across Cargo and Python packaging metadata and source paths.
Ensure generated native and Python artifacts are placed where downstream consumers expect them.
Files:
pyproject.tomlpython/src/nemo_fabric/integrations/harbor/verify_telemetry.pypython/src/nemo_fabric/integrations/harbor/README.mdpython/src/nemo_fabric/integrations/harbor/models.pypython/src/nemo_fabric/integrations/harbor/runner.pypython/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.py
{Cargo.toml,pyproject.toml,python/pyproject.toml,Cargo.lock,uv.lock}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Keep workspace, Rust, Python, and lockfile versions aligned where required.
Files:
pyproject.toml
{pyproject.toml,python/pyproject.toml,Cargo.toml,python/src/nemo_fabric/**}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
The editable maturin build must continue to produce the
nemo_fabric._nativeextension.
Files:
pyproject.tomlpython/src/nemo_fabric/integrations/harbor/verify_telemetry.pypython/src/nemo_fabric/integrations/harbor/README.mdpython/src/nemo_fabric/integrations/harbor/models.pypython/src/nemo_fabric/integrations/harbor/runner.pypython/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.py
{.github/workflows/ci_python.yml,.github/workflows/ci_rust.yml,justfile,pyproject.toml,python/pyproject.toml,Cargo.toml}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
CI workflows must reference the same package names and commands used by local build and installation workflows.
Files:
pyproject.toml
{Cargo.toml,Cargo.lock,pyproject.toml,python/pyproject.toml,uv.lock,docs/package.json,docs/package-lock.json}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Maintain package metadata and dependency resolution consistently across Rust, Python, documentation tooling, and their lockfiles.
Files:
pyproject.toml
**/pyproject.toml
📄 CodeRabbit inference engine (.agents/skills/update-project-version/SKILL.md)
Run
just build-pythonto verify that all Python package metadata resolves.
Files:
pyproject.toml
**/*.{rs,py,pyi,toml}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
When the PyO3 bridge or package metadata changes, run
just build-pythonandcargo check -p fabric-python --locked.
Files:
pyproject.tomlpython/src/nemo_fabric/integrations/harbor/verify_telemetry.pytests/adapters/test_claude_adapter.pypython/src/nemo_fabric/integrations/harbor/models.pytests/integrations/test_harbor_mcp.pytests/integrations/test_harbor_telemetry.pypython/src/nemo_fabric/integrations/harbor/runner.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.pyexamples/harbor/swebench/mcp/repo_inspector.pypython/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.pytests/python/test_harbor_integration.pytests/integrations/test_harbor_runner.py
**/*.{md,mdx,html}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Changes affecting public behavior, adapters, examples, or workspace structure must update the corresponding documentation; public API changes require updated SDK or API reference documentation.
Files:
examples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdpython/src/nemo_fabric/integrations/harbor/README.mddocs/integrations/harbor.mdxexamples/harbor/README.mdATTRIBUTIONS-Python.mdexamples/harbor/demo/README.md
**/README.md
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Update an adapter or example
README.mdwhen that adapter or example surface changes.
Files:
examples/harbor/swebench/sample-artifacts/README.mdpython/src/nemo_fabric/integrations/harbor/README.mdexamples/harbor/README.mdexamples/harbor/demo/README.md
**/*.{md,mdx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
For docs site changes, run
just docsto regenerate Python and Rust API references and validate Fern configuration.
**/*.{md,mdx}: Prioritize factual accuracy in NeMo Fabric documentation and keep commands, package names, APIs, file paths, repository layout, entry points, support claims, examples, and procedures aligned with current repository behavior.
Update relevant entry-point documentation when public behavior changes, includingREADME.md,docs/index.yml, package or crate READMEs, and adapter or integration READMEs.
Use{/* ... */}delimiters for top-of-file SPDX comments in MDX files, not HTML comment delimiters.
CapitalizeNVIDIAcorrectly and use consistent current repository terminology, product names, APIs, and feature names.
Format commands, code, expressions, file names, paths, and filenames as inline code where appropriate.
Use title case for technical-documentation headings.
Introduce code blocks, tables, and lists with complete lead-in sentences.
Use descriptive link text instead of raw URLs or generic labels such ashere.
Write procedures as short, imperative, parallel, easy-to-scan steps; prefer active voice, present tense, plain English, and concise sentences.
Useafterinstead ofoncewhen expressing temporal sequence, and usecaninstead ofmaywhen describing possibility rather than permission.
Use unambiguous date formats and avoid ordinal dates in body text.
When reviewing documentation, report findings in severity order underMust fix,Should fix, andNice to have, with file paths, line references, explanations, and concrete rewrites or directions.
Files:
examples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdpython/src/nemo_fabric/integrations/harbor/README.mddocs/integrations/harbor.mdxexamples/harbor/README.mdATTRIBUTIONS-Python.mdexamples/harbor/demo/README.md
**/*.{html,md}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
HTML and Markdown files must use the specified SPDX header in an HTML comment.
Files:
examples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdpython/src/nemo_fabric/integrations/harbor/README.mdexamples/harbor/README.mdATTRIBUTIONS-Python.mdexamples/harbor/demo/README.md
**/*.{md,rst}
📄 CodeRabbit inference engine (.agents/skills/contribute-api/SKILL.md)
Update documentation and examples in the same branch as the public API change.
Verify README and documentation entry points, package names, paths, examples, and public commands remain current after changes.
Files:
examples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdpython/src/nemo_fabric/integrations/harbor/README.mdexamples/harbor/README.mdATTRIBUTIONS-Python.mdexamples/harbor/demo/README.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/swebench/sample-artifacts/README.mdexamples/harbor/swebench/skills/swebench-debugging/SKILL.mddocs/integrations/harbor.mdxexamples/harbor/README.mdexamples/harbor/demo/README.md
{docs/**/*.{md,mdx,yml},examples/**/*.{md,mdx,yml}}
📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
Update relevant getting-started, reference, adapter, and example documentation when the corresponding examples or adapters change.
Files:
examples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/swebench/skills/swebench-debugging/SKILL.mddocs/integrations/harbor.mdxexamples/harbor/README.mdexamples/harbor/demo/README.md
**/*.{md,mdx,rst}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-guide.md)
**/*.{md,mdx,rst}: For NeMo Fabric documentation, verify technical claims against the current repository, public API, or documented command before reviewing style.
Always spellNVIDIAin all caps; do not useNvidia,nvidia, orNV.
Format commands, code elements, expressions, package names, file names, and paths as inline code.
Use descriptive link text; avoid raw URLs and weak anchors such ashereorread more.
Use title case consistently for technical documentation headings.
Introduce code blocks, lists, tables, and images with complete sentences.
Write procedures as imperative, parallel steps; split long procedures into smaller tasks.
Prefer active voice, present tense, short sentences, contractions, and plain English while preserving necessary technical precision.
Usecanfor possibility and reservemayfor permission.
Useafterfor temporal relationships instead ofonce, and preferrefer tooverseewhen directing readers to another resource.
Avoid culture-specific idioms, unnecessary Latinisms, jokes, and marketing exaggeration in technical documentation.
Spell out months in body text, avoid ordinal dates, and use clear time zones.
Spell out whole numbers from zero through nine unless they are technical values, parameters, versions, or UI values; use numerals for 10 or greater and commas in thousands.
Do not add trademark symbols to learning-oriented documentation unless the source, platform, or legal guidance explicitly requires them.
Do not replace precise technical terms with simpler words when doing so would lose precision.
Do not flag passive voice when the actor is unknown or the action is the important part.
Do not rewrite API names, package names, command flags, or code literals for style.
**/*.{md,mdx,rst}: Use consistent title case for technical-document headings and table headers; avoid quotation marks, ampersands, and exclamation marks in headings, while preserving official product, event, research, and whitepaper title ...
Files:
examples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdpython/src/nemo_fabric/integrations/harbor/README.mddocs/integrations/harbor.mdxexamples/harbor/README.mdATTRIBUTIONS-Python.mdexamples/harbor/demo/README.md
**/*.{md,rst,txt,adoc}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-language-mechanics.md)
**/*.{md,rst,txt,adoc}: For technical documentation, use professional, active, conversational, engaging, precise, and plain-English prose. Prefer active voice, present tense, short sentences, and scannable paragraphs. Avoid casual or imprecise language, swearing, threats, insults, jokes, puns, culture-specific idioms, marketing exaggeration, and unsupported third-party comparisons.
Usecanfor possibility and reservemayfor permission; useafterfor temporal order; userefer tofor cross-references; prefer short direct sentences and specific verbs; avoid unnecessarypleasein technical documentation.
Prefer active voice when the actor matters. Passive voice is acceptable when the actor is unknown or irrelevant, when the action or result is the focus, or in programmer documentation.
Use natural contractions in conversational technical prose, but do not force them in formal legal copy, API references, or generated text.
Prefer simpler English over Latinisms: usefor exampleorsuch asinstead ofe.g.,and so oninstead ofetc.,that isinstead ofi.e.,compared toinstead ofvs., andby,through, orusinginstead ofvia. Use industry-standard terms such as in silico, in vitro, and in vivo when appropriate, and italicize them in running text.
Usethatwithout commas for essential clauses, andwhichwith commas for nonessential clauses.
Format dates and times clearly: spell out months in body text; use forms such asJune 12, 2025; avoid numeric or ordinal dates; capitalize days; use 12-hour time when appropriate; include a space beforea.m.orp.m.; useETandPTfor needed time zones; avoid24/7; and preferfrom 12:30 to 1:00 p.m.for prose ranges.
Format numbers consistently: spell out zero through nine in body text, use numerals for 10 or greater and for technical values, use commas in thousands, do not begin a sentence with a numeral, spell out ordinals, and use numerals consistently within a category wh...
Files:
examples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/swebench/skills/swebench-debugging/SKILL.mdpython/src/nemo_fabric/integrations/harbor/README.mdexamples/harbor/README.mdATTRIBUTIONS-Python.mdexamples/harbor/demo/README.md
**/SKILL.md
⚙️ CodeRabbit configuration file
**/SKILL.md: Do not flag SKILL.md files for missing SPDX headers. Skill entrypoints intentionally start with YAML frontmatter instead.
Verify that every SKILL.md keeps valid YAML frontmatter with at least name and description fields before the Markdown body.
Files:
examples/harbor/swebench/skills/swebench-debugging/SKILL.md
**/*.py
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.py: Python public APIs must use type annotations, and native Python binding declarations must remain synchronized with their Rust implementations.
Python files must begin with the specified#SPDX copyright and Apache-2.0 license header.
Files:
python/src/nemo_fabric/integrations/harbor/verify_telemetry.pytests/adapters/test_claude_adapter.pypython/src/nemo_fabric/integrations/harbor/models.pytests/integrations/test_harbor_mcp.pytests/integrations/test_harbor_telemetry.pypython/src/nemo_fabric/integrations/harbor/runner.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.pyexamples/harbor/swebench/mcp/repo_inspector.pypython/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.pytests/python/test_harbor_integration.pytests/integrations/test_harbor_runner.py
**/*.{rs,py}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.{rs,py}: Usesnake_casefor Rust and Python functions and variables; usePascalCasefor Rust types and Python classes.
Run tests for every language surface affected by a change. Changes touching the Rust core or public schemas require both Rust and Python test suites.
Public contract changes must keep native Python binding declarations synchronized with their Rust implementations.
Files:
python/src/nemo_fabric/integrations/harbor/verify_telemetry.pytests/adapters/test_claude_adapter.pypython/src/nemo_fabric/integrations/harbor/models.pytests/integrations/test_harbor_mcp.pytests/integrations/test_harbor_telemetry.pypython/src/nemo_fabric/integrations/harbor/runner.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.pyexamples/harbor/swebench/mcp/repo_inspector.pypython/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.pytests/python/test_harbor_integration.pytests/integrations/test_harbor_runner.py
**/*.{py,pyi}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
When Python code or a Python-facing adapter changes, run
just test-python.
Files:
python/src/nemo_fabric/integrations/harbor/verify_telemetry.pytests/adapters/test_claude_adapter.pypython/src/nemo_fabric/integrations/harbor/models.pytests/integrations/test_harbor_mcp.pytests/integrations/test_harbor_telemetry.pypython/src/nemo_fabric/integrations/harbor/runner.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.pyexamples/harbor/swebench/mcp/repo_inspector.pypython/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.pytests/python/test_harbor_integration.pytests/integrations/test_harbor_runner.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/integrations/harbor/verify_telemetry.pypython/src/nemo_fabric/integrations/harbor/README.mdpython/src/nemo_fabric/integrations/harbor/models.pypython/src/nemo_fabric/integrations/harbor/runner.pypython/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.py
tests/**/*.py
📄 CodeRabbit inference engine (.agents/skills/python-tests/SKILL.md)
tests/**/*.py: Use Pytest to run Python tests.
Do not add@pytest.mark.asyncioto tests; async tests are automatically detected by the async runner.
Do not add-> Nonereturn annotations to test functions.
When mocking a class, useunittest.mock.MagicMockorAsyncMock, supplyingspecwhen necessary; do not define a new mock class.
Prefix mocked class names withmock, notfake.
Prefer pytest fixtures over helper methods.
Define shared fixtures inconftest.pyrather than repeating them across test files.
Define fixtures using@pytest.fixture(name="<fixture_name>"[, scope="<scope>"])and a<fixture_name>_fixturefunction; specifyscopeonly when it is notfunction.
Preferpytest.mark.parametrizeover separate tests for different input types.
Use@pytest.mark.usefixtureswhen a fixture is needed but its return value is unused.
Useos.environto modify environment variables in tests; do not usemonkeypatch.setenv, because the autouserestore_environ_fixtureintests/conftest.pyrestores the environment after each test.
Avoid defensive programming in tests; access expected data directly so missing data raises a clear error instead of being silently tolerated.
Run focused tests withuv run pytest -k "<pattern>"and all tests withuv run pytest.
Files:
tests/adapters/test_claude_adapter.pytests/integrations/test_harbor_mcp.pytests/integrations/test_harbor_telemetry.pytests/python/test_harbor_integration.pytests/integrations/test_harbor_runner.py
tests/adapters/**/*
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
When an adapter or integration changes, run its focused tests under
tests/adapters, followed byjust test-python.
Files:
tests/adapters/test_claude_adapter.py
{tests/**,python/tests/**}
⚙️ CodeRabbit configuration file
{tests/**,python/tests/**}: Tests should cover the behavior promised by the changed API surface, including error paths, lifecycle cleanup, and SDK/native parity where relevant.
Files:
tests/adapters/test_claude_adapter.pytests/integrations/test_harbor_mcp.pytests/integrations/test_harbor_telemetry.pytests/python/test_harbor_integration.pytests/integrations/test_harbor_runner.py
**/*.mdx
📄 CodeRabbit inference engine (CONTRIBUTING.md)
MDX files must use the specified SPDX header in a JSX comment.
In MDX files, use JSX comment delimiters (
{/*and*/}) for top-of-file comments, including SPDX headers; do not use HTML comments.
Files:
docs/integrations/harbor.mdx
docs/**/*.{md,mdx,yml}
📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
Run
just docswhen the documentation site changes.
Files:
docs/integrations/harbor.mdx
{docs/**/*,.github/workflows/ci_python.yml,.github/workflows/ci_rust.yml,justfile}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Use the current install, import, build, test, clean, and documentation commands consistently in documentation, examples, CI workflows, and just recipes.
Files:
docs/integrations/harbor.mdx
{docs/**/*,.github/workflows/ci_python.yml,.github/workflows/ci_rust.yml}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Reflect public packaging changes in release-facing documentation and examples.
Files:
docs/integrations/harbor.mdx
docs/**/*
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
For documentation or examples changes, run
just docswhen practical and verify documented commands against the current repository.
Files:
docs/integrations/harbor.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/integrations/harbor.mdx
🧠 Learnings (3)
📚 Learning: 2026-06-29T22:34:52.407Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 27
File: adapters/codex-cli/fabric-adapter.json:13-15
Timestamp: 2026-06-29T22:34:52.407Z
Learning: In NeMo-Fabric adapter manifest files (e.g., `*/fabric-adapter.json`), keep `config.accepts` limited to the top-level Fabric capability sections that `resolve_capability_plan` consumes (such as `models`, `tools`, `mcp`, `skills`, `telemetry`). Do not add adapter-owned `harness.settings` keys to `config.accepts`; `harness.settings` should remain adapter-owned and be passed through unchanged.
Applied to files:
examples/harbor/swebench/configs/adapters/hermes/fabric-adapter.jsonexamples/harbor/swebench/configs/adapters/claude/fabric-adapter.json
📚 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/integrations/harbor/verify_telemetry.pypython/src/nemo_fabric/integrations/harbor/models.pypython/src/nemo_fabric/integrations/harbor/runner.pypython/src/nemo_fabric/integrations/harbor/telemetry.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.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/claude/src/nemo_fabric_adapters/claude/adapter.py
🧬 Code graph analysis (6)
python/src/nemo_fabric/integrations/harbor/models.py (2)
tests/integrations/test_harbor_runner.py (2)
HarborRunSpec(77-95)HarborRunSpec(372-372)python/src/nemo_fabric/integrations/harbor/runner.py (1)
HarborRunSpec(32-32)
python/src/nemo_fabric/integrations/harbor/runner.py (2)
tests/integrations/test_harbor_runner.py (3)
to_mapping(231-232)compose_config(373-373)run(235-235)tests/python/test_harbor_integration.py (1)
run(131-131)
adapters/claude/src/nemo_fabric_adapters/claude/adapter.py (1)
tests/adapters/test_claude_adapter.py (1)
run_claude(447-447)
python/src/nemo_fabric/integrations/harbor/fabric_agent.py (1)
tests/python/test_harbor_integration.py (1)
FabricAgent(111-124)
tests/python/test_harbor_integration.py (1)
python/src/nemo_fabric/integrations/harbor/fabric_agent.py (2)
FabricAgent(35-46)populate_context_from_result(296-314)
tests/integrations/test_harbor_runner.py (1)
python/src/nemo_fabric/integrations/harbor/fabric_agent.py (1)
name(45-46)
🪛 ast-grep (0.44.1)
python/src/nemo_fabric/integrations/harbor/verify_telemetry.py
[info] 33-33: use jsonify instead of json.dumps for JSON output
Context: json.dumps(summary, indent=2)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
tests/adapters/test_claude_adapter.py
[info] 728-728: use jsonify instead of json.dumps for JSON output
Context: json.dumps(output)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
tests/integrations/test_harbor_mcp.py
[info] 105-105: use jsonify instead of json.dumps for JSON output
Context: json.dumps(request)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
tests/integrations/test_harbor_telemetry.py
[info] 48-56: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"atof_version": "1.0",
"kind": "event",
"name": "agent.end",
"timestamp": "2026-07-13T00:00:00Z",
"uuid": "event-1",
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 63-75: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"schema_version": "ATIF-v1.7",
"session_id": "runtime-1",
"agent": {"name": "fabric", "version": "0.1.0"},
"steps": [{"step_id": 1, "source": "agent", "message": "done"}],
"final_metrics": {
"total_prompt_tokens": 12,
"total_completion_tokens": 4,
"total_steps": 1,
},
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 97-104: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"schema_version": "ATIF-v1.7",
"session_id": "019f616c-5eb1-7c92-928f-b4130bd4a519",
"agent": {"name": "fabric", "version": "0.1.0"},
"steps": [{"step_id": 1, "source": "agent", "message": "done"}],
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 124-131: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"schema_version": "ATIF-v1.7",
"session_id": "relay-session-1",
"agent": {"name": "fabric", "version": "0.1.0"},
"steps": [{"step_id": 1, "source": "agent", "message": "done"}],
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 202-209: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"schema_version": "ATIF-v1.7",
"session_id": "runtime-1",
"agent": {"name": "fabric", "version": "0.1.0"},
"steps": [],
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 224-233: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"atof_version": "1.0",
"kind": "event",
"name": "agent.end",
"timestamp": "2026-07-13T00:00:00Z",
"uuid": "event-1",
"data": {"api_key": "sk-thismustneverbeleak123456"},
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
examples/harbor/swebench/mcp/repo_inspector.py
[info] 87-87: use jsonify instead of json.dumps for JSON output
Context: json.dumps({"root": str(root), "entries": names})
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 106-106: use jsonify instead of json.dumps for JSON output
Context: json.dumps(response)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 108-108: use jsonify instead of json.dumps for JSON output
Context: json.dumps(error_response(None, -32700, str(error)))
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 110-110: use jsonify instead of json.dumps for JSON output
Context: json.dumps(error_response(request_id, -32603, str(error)))
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
python/src/nemo_fabric/integrations/harbor/telemetry.py
[info] 48-48: use jsonify instead of json.dumps for JSON output
Context: json.dumps(summary, indent=2)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 53-53: use jsonify instead of json.dumps for JSON output
Context: json.dumps(summary, indent=2)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
python/src/nemo_fabric/integrations/harbor/fabric_agent.py
[info] 62-62: Do not hardcode temporary file or directory names
Context: "/tmp/nemo-fabric-config"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
[info] 65-65: Do not hardcode temporary file or directory names
Context: "/tmp/nemo-fabric-venv"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
tests/python/test_harbor_integration.py
[info] 341-354: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"schema_version": "ATIF-v1.7",
"session_id": "runtime-1",
"agent": {"name": "fabric", "version": "0.1.0"},
"steps": [{"step_id": 1, "source": "agent", "message": "done"}],
"final_metrics": {
"total_prompt_tokens": 12,
"total_cached_tokens": 3,
"total_completion_tokens": 4,
"total_cost_usd": 0.25,
}
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 376-376: use jsonify instead of json.dumps for JSON output
Context: json.dumps({"status": "succeeded", "atof": {"records": 7}})
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
[info] 214-214: Do not hardcode temporary file or directory names
Context: "/tmp/nemo-fabric-config"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
[info] 215-215: Do not hardcode temporary file or directory names
Context: "/tmp/nemo-fabric-config/agent.yaml"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
[info] 226-226: Do not hardcode temporary file or directory names
Context: "/tmp/nemo-fabric-config/wheelhouse/nemo_fabric.whl"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
[info] 232-232: Do not hardcode temporary file or directory names
Context: "/tmp/nemo-fabric-config"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
[info] 298-298: Do not hardcode temporary file or directory names
Context: "/tmp/nemo-fabric-venv/bin/python -m pip install "
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
[info] 307-307: Do not hardcode temporary file or directory names
Context: "/tmp/nemo-fabric-venv/bin/python"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
[info] 316-316: Do not hardcode temporary file or directory names
Context: "/tmp/custom-fabric/bin/python"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
[info] 332-332: Do not hardcode temporary file or directory names
Context: "/tmp/custom-fabric/bin/python"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
tests/integrations/test_harbor_runner.py
[info] 515-515: Do not hardcode temporary file or directory names
Context: "/tmp/nemo-fabric-config/mcp/repo_inspector.py"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
🪛 LanguageTool
examples/harbor/README.md
[style] ~204-~204: Consider replacing this word to strengthen your wording.
Context: ...ic telemetry is a separate quality gate and never changes the SWE-Bench reward. Re...
(AND_THAT)
[style] ~256-~256: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...he credential-free calculator smoke. 3. Run django__django-13741 once with one ha...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
🪛 Ruff (0.15.21)
tests/adapters/test_claude_adapter.py
[warning] 714-714: Missing return type annotation for private function query_failure
(ANN202)
[warning] 714-714: Missing type annotation for **_
(ANN003)
[warning] 715-717: Create your own exception
(TRY002)
[warning] 715-717: Avoid specifying long messages outside the exception class
(TRY003)
tests/integrations/test_harbor_mcp.py
[warning] 102-102: Missing return type annotation for private function fail_to_list
Add return type annotation: Never
(ANN202)
[warning] 103-103: Avoid specifying long messages outside the exception class
(TRY003)
examples/harbor/swebench/mcp/repo_inspector.py
[warning] 18-18: Dynamically typed expressions (typing.Any) are disallowed in request_id
(ANN401)
[warning] 30-30: Too many return statements (7 > 6)
(PLR0911)
[warning] 103-103: Abstract raise to an inner function
(TRY301)
[warning] 103-103: Avoid specifying long messages outside the exception class
(TRY003)
python/src/nemo_fabric/integrations/harbor/telemetry.py
[warning] 95-95: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 108-108: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 116-116: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 119-119: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 134-134: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 140-140: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 161-161: Dynamically typed expressions (typing.Any) are disallowed in value
(ANN401)
[warning] 165-165: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 169-169: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 172-172: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 175-175: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 177-177: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 180-180: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 183-183: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 185-185: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 187-187: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 189-189: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 192-192: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 216-216: Avoid specifying long messages outside the exception class
(TRY003)
python/src/nemo_fabric/integrations/harbor/fabric_agent.py
[error] 63-63: Probable insecure usage of temporary file or directory: "/tmp/nemo-fabric-config"
(S108)
[error] 66-66: Probable insecure usage of temporary file or directory: "/tmp/nemo-fabric-venv"
(S108)
[warning] 71-71: Dynamically typed expressions (typing.Any) are disallowed in *args
(ANN401)
[warning] 72-72: Dynamically typed expressions (typing.Any) are disallowed in **kwargs
(ANN401)
[warning] 74-74: Star-arg unpacking after a keyword argument is strongly discouraged
(B026)
[warning] 89-89: Avoid specifying long messages outside the exception class
(TRY003)
[error] 109-109: Probable insecure usage of temporary file or directory: "/tmp"
(S108)
[warning] 202-202: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 206-206: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 208-208: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 211-211: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 213-213: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 273-273: Avoid specifying long messages outside the exception class
(TRY003)
[warning] 276-276: Avoid specifying long messages outside the exception class
(TRY003)
tests/python/test_harbor_integration.py
[error] 132-132: Probable insecure usage of temporary file or directory: "/tmp/fabric-run-"
(S108)
[error] 185-185: Probable insecure usage of temporary file or directory: "/tmp/fabric-result-"
(S108)
[warning] 188-188: Async functions should not use pathlib.Path methods, use trio.Path or anyio.path
(ASYNC240)
[error] 215-215: Probable insecure usage of temporary file or directory: "/tmp/nemo-fabric-config"
(S108)
[error] 216-216: Probable insecure usage of temporary file or directory: "/tmp/nemo-fabric-config/agent.yaml"
(S108)
[error] 227-227: Probable insecure usage of temporary file or directory: "/tmp/nemo-fabric-config/wheelhouse/nemo_fabric.whl"
(S108)
[error] 233-233: Probable insecure usage of temporary file or directory: "/tmp/nemo-fabric-config"
(S108)
[error] 308-308: Probable insecure usage of temporary file or directory: "/tmp/nemo-fabric-venv/bin/python"
(S108)
[error] 317-317: Probable insecure usage of temporary file or directory: "/tmp/custom-fabric/bin/python"
(S108)
[error] 333-333: Probable insecure usage of temporary file or directory: "/tmp/custom-fabric/bin/python"
(S108)
tests/integrations/test_harbor_runner.py
[warning] 105-105: Assertion should be broken down into multiple parts
Break down assertion into multiple parts
(PT018)
[warning] 106-106: Assertion should be broken down into multiple parts
Break down assertion into multiple parts
(PT018)
[warning] 248-248: Unused lambda argument: result
(ARG005)
[warning] 248-248: Unused lambda argument: path
(ARG005)
[warning] 248-248: Unused lambda argument: kwargs
(ARG005)
[error] 516-516: Probable insecure usage of temporary file or directory: "/tmp/nemo-fabric-config/mcp/repo_inspector.py"
(S108)
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
python/src/nemo_fabric/integrations/harbor/fabric_agent.py (1)
216-223: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick winCatch
OSErroraroundpath.read_text()inpopulate_context_from_trajectory
This path only handlesValueError, so an unreadabletrajectory.jsoncan abortpopulate_context_post_runeven though the rest of the run succeeded.🤖 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/integrations/harbor/fabric_agent.py` around lines 216 - 223, Update populate_context_from_trajectory to catch OSError from path.read_text alongside ValueError, so an unreadable trajectory.json does not abort populate_context_post_run and the existing fallback behavior remains intact.
♻️ Duplicate comments (1)
python/src/nemo_fabric/integrations/harbor/fabric_agent.py (1)
122-141: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winCredential exposure during package installation remains unresolved.
Both install paths still pass the full
self._extra_env(which can carry model API keys, per_runner_env) intopip install/build-hook execution. This was flagged previously with no confirmed fix in this code. Build a minimal, explicitly allowlisted env for installation instead of reusing the full task-scoped env.🛡️ Proposed fix
+ install_env = {k: v for k, v in self._extra_env.items() if k in _INSTALL_ALLOWED_ENV} if self.fabric_package: result = await environment.exec( fabric_install_command( fabric_python=self.fabric_python, package=self.fabric_package, venv_path=self.fabric_venv_path, ), cwd=self.fabric_cwd, - env=self._extra_env, + env=install_env, timeout_sec=self.fabric_timeout_sec, ) ensure_success("Fabric package installation failed", result) elif self.fabric_install_command: result = await environment.exec( self.fabric_install_command, cwd=self.fabric_cwd, - env=self._extra_env, + env=install_env, timeout_sec=self.fabric_timeout_sec, ) ensure_success("Fabric install command failed", result)🤖 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/integrations/harbor/fabric_agent.py` around lines 122 - 141, Update the installation flow in the fabric agent method containing the `fabric_package` and `fabric_install_command` branches to construct a minimal explicitly allowlisted environment for package installation, excluding model API keys and other task-scoped credentials from `self._extra_env`. Pass this sanitized environment to both `environment.exec` calls while preserving the existing working directory, timeout, commands, and success handling.
🤖 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 `@python/src/nemo_fabric/integrations/harbor/fabric_agent.py`:
- Around line 216-223: Update populate_context_from_trajectory to catch OSError
from path.read_text alongside ValueError, so an unreadable trajectory.json does
not abort populate_context_post_run and the existing fallback behavior remains
intact.
---
Duplicate comments:
In `@python/src/nemo_fabric/integrations/harbor/fabric_agent.py`:
- Around line 122-141: Update the installation flow in the fabric agent method
containing the `fabric_package` and `fabric_install_command` branches to
construct a minimal explicitly allowlisted environment for package installation,
excluding model API keys and other task-scoped credentials from
`self._extra_env`. Pass this sanitized environment to both `environment.exec`
calls while preserving the existing working directory, timeout, commands, and
success handling.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 08b5b17b-4086-4b52-954e-87d7a80a35f5
📒 Files selected for processing (9)
adapters/claude/src/nemo_fabric_adapters/claude/adapter.pyexamples/harbor/demo/README.mdexamples/harbor/swebench/mcp/repo_inspector.pyexamples/harbor/swebench/sample-artifacts/README.mdpython/src/nemo_fabric/integrations/harbor/fabric_agent.pypython/src/nemo_fabric/integrations/harbor/telemetry.pytests/integrations/test_harbor_mcp.pytests/integrations/test_harbor_telemetry.pytests/python/test_harbor_integration.py
📜 Review details
⏰ Context from checks skipped due to timeout. (8)
- GitHub Check: Test (Python 3.11, arm64)
- GitHub Check: Test (Python 3.12, arm64)
- GitHub Check: Test (Python 3.13, arm64)
- GitHub Check: Test (Python 3.14, x86_64)
- GitHub Check: Test (Python 3.13, x86_64)
- GitHub Check: Test (Python 3.12, x86_64)
- GitHub Check: Test (Python 3.11, x86_64)
- GitHub Check: Build wheels (arm64)
🧰 Additional context used
📓 Path-based instructions (21)
**/*.{md,mdx,html}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Changes affecting public behavior, adapters, examples, or workspace structure must update the corresponding documentation; public API changes require updated SDK or API reference documentation.
Files:
examples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/demo/README.md
**/README.md
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Update an adapter or example
README.mdwhen that adapter or example surface changes.
Files:
examples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/demo/README.md
**/*.{md,mdx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
For docs site changes, run
just docsto regenerate Python and Rust API references and validate Fern configuration.
**/*.{md,mdx}: Prioritize factual accuracy in NeMo Fabric documentation and keep commands, package names, APIs, file paths, repository layout, entry points, support claims, examples, and procedures aligned with current repository behavior.
Update relevant entry-point documentation when public behavior changes, includingREADME.md,docs/index.yml, package or crate READMEs, and adapter or integration READMEs.
Use{/* ... */}delimiters for top-of-file SPDX comments in MDX files, not HTML comment delimiters.
CapitalizeNVIDIAcorrectly and use consistent current repository terminology, product names, APIs, and feature names.
Format commands, code, expressions, file names, paths, and filenames as inline code where appropriate.
Use title case for technical-documentation headings.
Introduce code blocks, tables, and lists with complete lead-in sentences.
Use descriptive link text instead of raw URLs or generic labels such ashere.
Write procedures as short, imperative, parallel, easy-to-scan steps; prefer active voice, present tense, plain English, and concise sentences.
Useafterinstead ofoncewhen expressing temporal sequence, and usecaninstead ofmaywhen describing possibility rather than permission.
Use unambiguous date formats and avoid ordinal dates in body text.
When reviewing documentation, report findings in severity order underMust fix,Should fix, andNice to have, with file paths, line references, explanations, and concrete rewrites or directions.
Files:
examples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/demo/README.md
**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*: All source files must include the specified SPDX copyright and Apache-2.0 license header using the comment syntax appropriate to the file type.
Release tags must use raw Rust-compatible SemVer without a leadingv, such as0.1.0or0.1.0-rc.1.
**/*: 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.
**/*: Keep pull request branch scope coherent and reviewable.
Run relevant tests undervalidate-changebefore opening or updating a pull request.
Format changed files with the language-native formatter.
Update documentation and examples for public behavior changes.
Update dependent maintainer or consumer guidance when code changes affect APIs, bindings, commands, paths, packaging guidance, or best practices.
Use Conventional Commit style for pull request titles:<type>: <concise imperative summary>, choosing the type from the actual change surface. Usefixonly for user-facing or runtime product-code bug fixes.
A pull request body must include#### Overview,#### Details,#### Validation,#### Where should the reviewer start?, and `#### Related ...
Files:
examples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/swebench/mcp/repo_inspector.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.pyexamples/harbor/demo/README.mdtests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_mcp.pytests/python/test_harbor_integration.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.pypython/src/nemo_fabric/integrations/harbor/telemetry.py
**/*.{html,md}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
HTML and Markdown files must use the specified SPDX header in an HTML comment.
Files:
examples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/demo/README.md
**/*.{md,rst}
📄 CodeRabbit inference engine (.agents/skills/contribute-api/SKILL.md)
Update documentation and examples in the same branch as the public API change.
Verify README and documentation entry points, package names, paths, examples, and public commands remain current after changes.
Files:
examples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/demo/README.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/swebench/sample-artifacts/README.mdexamples/harbor/demo/README.md
{docs/**/*.{md,mdx,yml},examples/**/*.{md,mdx,yml}}
📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
Update relevant getting-started, reference, adapter, and example documentation when the corresponding examples or adapters change.
Files:
examples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/demo/README.md
**/*.{md,mdx,rst}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-guide.md)
**/*.{md,mdx,rst}: For NeMo Fabric documentation, verify technical claims against the current repository, public API, or documented command before reviewing style.
Always spellNVIDIAin all caps; do not useNvidia,nvidia, orNV.
Format commands, code elements, expressions, package names, file names, and paths as inline code.
Use descriptive link text; avoid raw URLs and weak anchors such ashereorread more.
Use title case consistently for technical documentation headings.
Introduce code blocks, lists, tables, and images with complete sentences.
Write procedures as imperative, parallel steps; split long procedures into smaller tasks.
Prefer active voice, present tense, short sentences, contractions, and plain English while preserving necessary technical precision.
Usecanfor possibility and reservemayfor permission.
Useafterfor temporal relationships instead ofonce, and preferrefer tooverseewhen directing readers to another resource.
Avoid culture-specific idioms, unnecessary Latinisms, jokes, and marketing exaggeration in technical documentation.
Spell out months in body text, avoid ordinal dates, and use clear time zones.
Spell out whole numbers from zero through nine unless they are technical values, parameters, versions, or UI values; use numerals for 10 or greater and commas in thousands.
Do not add trademark symbols to learning-oriented documentation unless the source, platform, or legal guidance explicitly requires them.
Do not replace precise technical terms with simpler words when doing so would lose precision.
Do not flag passive voice when the actor is unknown or the action is the important part.
Do not rewrite API names, package names, command flags, or code literals for style.
**/*.{md,mdx,rst}: Use consistent title case for technical-document headings and table headers; avoid quotation marks, ampersands, and exclamation marks in headings, while preserving official product, event, research, and whitepaper title ...
Files:
examples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/demo/README.md
**/*.{md,rst,txt,adoc}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-language-mechanics.md)
**/*.{md,rst,txt,adoc}: For technical documentation, use professional, active, conversational, engaging, precise, and plain-English prose. Prefer active voice, present tense, short sentences, and scannable paragraphs. Avoid casual or imprecise language, swearing, threats, insults, jokes, puns, culture-specific idioms, marketing exaggeration, and unsupported third-party comparisons.
Usecanfor possibility and reservemayfor permission; useafterfor temporal order; userefer tofor cross-references; prefer short direct sentences and specific verbs; avoid unnecessarypleasein technical documentation.
Prefer active voice when the actor matters. Passive voice is acceptable when the actor is unknown or irrelevant, when the action or result is the focus, or in programmer documentation.
Use natural contractions in conversational technical prose, but do not force them in formal legal copy, API references, or generated text.
Prefer simpler English over Latinisms: usefor exampleorsuch asinstead ofe.g.,and so oninstead ofetc.,that isinstead ofi.e.,compared toinstead ofvs., andby,through, orusinginstead ofvia. Use industry-standard terms such as in silico, in vitro, and in vivo when appropriate, and italicize them in running text.
Usethatwithout commas for essential clauses, andwhichwith commas for nonessential clauses.
Format dates and times clearly: spell out months in body text; use forms such asJune 12, 2025; avoid numeric or ordinal dates; capitalize days; use 12-hour time when appropriate; include a space beforea.m.orp.m.; useETandPTfor needed time zones; avoid24/7; and preferfrom 12:30 to 1:00 p.m.for prose ranges.
Format numbers consistently: spell out zero through nine in body text, use numerals for 10 or greater and for technical values, use commas in thousands, do not begin a sentence with a numeral, spell out ordinals, and use numerals consistently within a category wh...
Files:
examples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/demo/README.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 Fabric contracts.
Files:
examples/harbor/swebench/sample-artifacts/README.mdexamples/harbor/swebench/mcp/repo_inspector.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.pyexamples/harbor/demo/README.md
**/*.py
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.py: Python public APIs must use type annotations, and native Python binding declarations must remain synchronized with their Rust implementations.
Python files must begin with the specified#SPDX copyright and Apache-2.0 license header.
Files:
examples/harbor/swebench/mcp/repo_inspector.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_mcp.pytests/python/test_harbor_integration.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.pypython/src/nemo_fabric/integrations/harbor/telemetry.py
**/*.{rs,py}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.{rs,py}: Usesnake_casefor Rust and Python functions and variables; usePascalCasefor Rust types and Python classes.
Run tests for every language surface affected by a change. Changes touching the Rust core or public schemas require both Rust and Python test suites.
Public contract changes must keep native Python binding declarations synchronized with their Rust implementations.
Files:
examples/harbor/swebench/mcp/repo_inspector.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_mcp.pytests/python/test_harbor_integration.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.pypython/src/nemo_fabric/integrations/harbor/telemetry.py
**/*.{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:
examples/harbor/swebench/mcp/repo_inspector.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_mcp.pytests/python/test_harbor_integration.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.pypython/src/nemo_fabric/integrations/harbor/telemetry.py
**/*.{py,pyi}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
When Python code or a Python-facing adapter changes, run
just test-python.
Files:
examples/harbor/swebench/mcp/repo_inspector.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_mcp.pytests/python/test_harbor_integration.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.pypython/src/nemo_fabric/integrations/harbor/telemetry.py
**/*.{rs,py,pyi,toml}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
When the PyO3 bridge or package metadata changes, run
just build-pythonandcargo check -p fabric-python --locked.
Files:
examples/harbor/swebench/mcp/repo_inspector.pyadapters/claude/src/nemo_fabric_adapters/claude/adapter.pytests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_mcp.pytests/python/test_harbor_integration.pypython/src/nemo_fabric/integrations/harbor/fabric_agent.pypython/src/nemo_fabric/integrations/harbor/telemetry.py
tests/**/*.py
📄 CodeRabbit inference engine (.agents/skills/python-tests/SKILL.md)
tests/**/*.py: Use Pytest to run Python tests.
Do not add@pytest.mark.asyncioto tests; async tests are automatically detected by the async runner.
Do not add-> Nonereturn annotations to test functions.
When mocking a class, useunittest.mock.MagicMockorAsyncMock, supplyingspecwhen necessary; do not define a new mock class.
Prefix mocked class names withmock, notfake.
Prefer pytest fixtures over helper methods.
Define shared fixtures inconftest.pyrather than repeating them across test files.
Define fixtures using@pytest.fixture(name="<fixture_name>"[, scope="<scope>"])and a<fixture_name>_fixturefunction; specifyscopeonly when it is notfunction.
Preferpytest.mark.parametrizeover separate tests for different input types.
Use@pytest.mark.usefixtureswhen a fixture is needed but its return value is unused.
Useos.environto modify environment variables in tests; do not usemonkeypatch.setenv, because the autouserestore_environ_fixtureintests/conftest.pyrestores the environment after each test.
Avoid defensive programming in tests; access expected data directly so missing data raises a clear error instead of being silently tolerated.
Run focused tests withuv run pytest -k "<pattern>"and all tests withuv run pytest.
Files:
tests/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_mcp.pytests/python/test_harbor_integration.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/integrations/test_harbor_telemetry.pytests/integrations/test_harbor_mcp.pytests/python/test_harbor_integration.py
{Cargo.toml,pyproject.toml,python/pyproject.toml,python/src/nemo_fabric/**}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
{Cargo.toml,pyproject.toml,python/pyproject.toml,python/src/nemo_fabric/**}: Keep Rust package names, Python package/import paths, and native module names internally consistent across Cargo and Python packaging metadata and source paths.
Ensure generated native and Python artifacts are placed where downstream consumers expect them.
Files:
python/src/nemo_fabric/integrations/harbor/fabric_agent.pypython/src/nemo_fabric/integrations/harbor/telemetry.py
{pyproject.toml,python/pyproject.toml,Cargo.toml,python/src/nemo_fabric/**}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
The editable maturin build must continue to produce the
nemo_fabric._nativeextension.
Files:
python/src/nemo_fabric/integrations/harbor/fabric_agent.pypython/src/nemo_fabric/integrations/harbor/telemetry.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/integrations/harbor/fabric_agent.pypython/src/nemo_fabric/integrations/harbor/telemetry.py
🧠 Learnings (2)
📚 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/claude/src/nemo_fabric_adapters/claude/adapter.py
📚 Learning: 2026-06-28T04:03:32.877Z
Learnt from: AjayThorve
Repo: NVIDIA/NeMo-Fabric PR: 26
File: python/tests/smoke_typed_config.py:163-177
Timestamp: 2026-06-28T04:03:32.877Z
Learning: In NVIDIA NeMo Fabric Python SDK serialization of `RuntimeCapabilities` (to satisfy the “parity contract” with Rust core and the CLI), do not emit metadata keys when the corresponding metadata is absent. Instead, omit those fields entirely so the produced JSON matches the Rust/CLI output (e.g., avoid `null`, empty objects, or placeholder metadata). During review, verify the serializer/builders follow this omission rule and that Python outputs/parity tests reflect the same shape.
Applied to files:
python/src/nemo_fabric/integrations/harbor/fabric_agent.pypython/src/nemo_fabric/integrations/harbor/telemetry.py
🧬 Code graph analysis (3)
adapters/claude/src/nemo_fabric_adapters/claude/adapter.py (1)
adapters/common/src/nemo_fabric_adapters/common/relay_gateway.py (3)
RelayGatewayError(26-27)start_relay_gateway(132-178)stop_relay_gateway(111-129)
python/src/nemo_fabric/integrations/harbor/fabric_agent.py (1)
tests/python/test_harbor_integration.py (1)
populate_context_from_telemetry_summary(384-384)
python/src/nemo_fabric/integrations/harbor/telemetry.py (1)
tests/integrations/test_harbor_telemetry.py (1)
_resolve_artifact_path(174-177)
🪛 Ruff (0.15.21)
examples/harbor/swebench/mcp/repo_inspector.py
[warning] 42-42: Too many return statements (9 > 6)
(PLR0911)
python/src/nemo_fabric/integrations/harbor/telemetry.py
[warning] 95-95: Avoid specifying long messages outside the exception class
(TRY003)
🔇 Additional comments (17)
examples/harbor/swebench/sample-artifacts/README.md (1)
16-16: Usecanfor possibility.Change “a harness may have produced” to “a harness can have produced.” The table header is already corrected.
Source: Coding guidelines
examples/harbor/demo/README.md (1)
19-22: LGTM!Also applies to: 109-118, 141-152
tests/python/test_harbor_integration.py (2)
20-22: 🎯 Functional CorrectnessConfirm the Harbor-unavailable fallback stub accepts
metadata=.A prior review noted the fallback
AgentContextstub only defined__init__(self), causingAgentContext(metadata={...})(used bytest_harbor_attaches_telemetry_summary_to_metadata) to raiseTypeErrorwhen the real Harbor package isn't installed. That stub isn't in the current diff view, so this couldn't be re-verified.#!/bin/bash rg -n -A10 'class AgentContext' tests/python/test_harbor_integration.pySource: Path instructions
406-418: LGTM! Good direct coverage of the non-UTF8 telemetry-summary failure path.python/src/nemo_fabric/integrations/harbor/fabric_agent.py (2)
58-96: LGTM!Also applies to: 143-173, 196-214, 216-223, 239-242
349-365: LGTM! Correctly isolates telemetry-summary load/parse failures (OSError,UnicodeDecodeError,JSONDecodeError) from run success, matching the prior review's fix request.python/src/nemo_fabric/integrations/harbor/telemetry.py (1)
90-99: LGTM! Path-escape check now runs unconditionally before thelogs_dirremap, correctly closing the traversal gap flagged previously.tests/integrations/test_harbor_telemetry.py (1)
46-265: LGTM! Solid coverage of the path-traversal fix and ATOF/ATIF validation edge cases (ambiguous ATIF, structural rejection, credential detection, strict vs non-strict).examples/harbor/swebench/mcp/repo_inspector.py (4)
55-72: Protocol version negotiation correctly implemented.
initializenow echoes the requested version when supported and returnsUNSUPPORTED_PROTOCOL_VERSIONwithrequested/supporteddata otherwise, resolving the earlier hardcoded-version issue.
87-115:tools/callvalidation and omitted-argumentshandling look correct.
nameis validated against"repo_summary", arguments default to{}viaparams.get("arguments", {})(fixing the earlier rejection of omitted arguments), and non-empty/non-dict arguments are rejected with-32602.
121-134: Request ID is now preserved across the JSON parse/dispatch boundary.
request_idis captured immediately afterjson.loadsand reused in theexcept Exceptionerror envelope, fixing the earlier"id": nullissue on dispatch failures.
15-15: 🎯 Functional CorrectnessNo change needed for
JsonRpcIdThe repo targets Python 3.11+, sostr | int | float | Noneis supported at runtime.> Likely an incorrect or invalid review comment.tests/integrations/test_harbor_mcp.py (1)
18-20: LGTM!Also applies to: 89-126
adapters/claude/src/nemo_fabric_adapters/claude/adapter.py (4)
858-867: Fragile string-prefix matching on SDK error text (previously flagged).Still gating normalization on the exact prefix
"Claude Code returned an error result:". Confirmed this message is a real string surfaced by the SDK, but an exact-prefix match remains brittle to future wording changes — a regression that would silently stop redacting provider text (falls through toraise, which is safe, but defeats the intended normalization).🐛 Proposed fix using a substring match
- if not str(error).startswith("Claude Code returned an error result:"): + if "returned an error result" not in str(error): raise
14-14: LGTM!
747-763: 🩺 Stability & AvailabilityCleanup failure info is dropped when relay startup itself fails.
If
_start_relay_gatewayraisesAdapterRelayError(line 758-763), the outertry'sfinallystill runs_cleanup_relay(line 886), but execution never reachesreturn _merge_relay_output(...)(line 888) since the exception propagates past it. Any secondarycleanup_errorcomputed at that point (e.g., plugin dir removal failure) is silently discarded — only the original relay-start error surfaces torun().This is an edge case (double failure: gateway fails to start and cleanup also fails), but it means the merged
relay_runtime.cleanup_errordiagnostics are only populated on the "happy start, later cleanup failure" path, not on "failed start, failed cleanup." Worth confirming this is the intended behavior, and thatAdapterRelayErroris a subclass ofClaudeAdapterErrorsorun()'sexcept ClaudeAdapterError(line 896) still normalizes this path into valid JSON.Also applies to: 836-888
796-833: LGTM!
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
|
@AjayThorve I have pulled this into draft because I want to drop all yaml/factory config and reconstruct that in the FabricAgent. I will mark it as ready once all changes are 100% in. apologies for the confusion on this. |
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
There was a problem hiding this comment.
Ran the full Harbor integration matrix on current head 7ac3659.
| Test | Trials | Exceptions | Result |
|---|---|---|---|
| Calculator scripted | 1 | 0 | Reward 1.0 |
| Calculator Hermes | 1 | 0 | Reward 1.0 |
| Calculator Hermes + Relay | 1 | 0 | Reward 1.0; ATOF and ATIF valid |
| Calculator Claude via NVIDIA | 1 | 0 | Reward 1.0 |
| SWE-Bench install gate | 1 install | 0 | Passed |
| SWE-Bench Hermes baseline | 1 | 0 | Fabric succeeded; reward 0 |
| SWE-Bench skill + Relay | 1 | 0 | Telemetry valid; reward 0 |
| SWE-Bench MCP + Relay | 1 | 0 | False green: MCP initialization fails |
| SWE-Bench blocked browser + Relay | 1 | 0 | Reward 1.0; browser policy verified |
| SWE-Bench Relay-only | 1 | 0 | Reward 1.0; telemetry valid |
| SWE-Bench Claude via NVIDIA | 1 | 0 | Reward 1.0 |
| SWE-Bench Claude via NVIDIA + Relay | 1 | 0 | Reward 1.0; telemetry valid |
| SWE-Bench verified shard | 5 | 0 | Mean reward 0.2; telemetry valid for all 5 |
Claude used NVIDIA Inference Hub with model aws/anthropic/bedrock-claude-opus-4-8. Neither API key appeared in persisted artifacts. The two runtime issues are called out inline.
Signed-off-by: Ajay Thorve <athorve@nvidia.com>
|
/merge |
Overview
Harden the consumer-neutral
FabricAgentHarbor integration and provide a reproducible workflow for comparing Hermes and Claude on one fixed SWE-Bench task.Details
>=0.18,<0.19FabricConfig; retainmodule:callablefactories only as an optional advanced pathexamples/harborBoth harnesses completed
swe-bench/django__django-13741end to end:nvidia/nemotron-3-nanosucceeded1.0anthropic/claude-sonnet-4-5succeeded1.0Validation
succeeded, valid direct ATOF/ATIF, and Harbor reward1.0Where should the reviewer start?
Start with
python/src/nemo_fabric/integrations/harbor/fabric_agent.pyandpython/src/nemo_fabric/integrations/harbor/runner.pyfor the integration contract, then followexamples/harbor/README.mdfor the qualified workflow. The sanitized run outputs are underexamples/harbor/swebench/sample-artifacts/.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Closes FABRIC-69
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.