Skip to content

chore: Add path filters for integrations#122

Merged
rapids-bot[bot] merged 32 commits into
NVIDIA:mainfrom
dagardner-nv:david-path-filters
May 18, 2026
Merged

chore: Add path filters for integrations#122
rapids-bot[bot] merged 32 commits into
NVIDIA:mainfrom
dagardner-nv:david-path-filters

Conversation

@dagardner-nv
Copy link
Copy Markdown
Contributor

@dagardner-nv dagardner-nv commented May 15, 2026

Overview

Add CI path filters for LangChain/LangGraph/Deep Agents integrations

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

Details

  • Avoid installing these optional dependencies, and running the associated tests unless this part of the code has changed
  • Rename python/tests/integrations/deepagents to python/tests/integrations/deepagents_tests avoids situation where import deepagents was importing the test module and not the third-party library, langchain, langgraph test directories were renamed as well.
  • Update tests to lazily import third-party libraries, allowing pytest to skip over these tests if the optional dependencies aren't installed.
  • Omit integrations sub-module from Python coverage reports.
Unrelated Changes:
  • Update the test-python-binding skill with instructions on fixture naming pattern

Where should the reviewer start?

The paths that trigger running LC integrations
.github/ci-path-filters.yml

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

  • Closes #

Summary by CodeRabbit

  • Tests

    • Reorganized integration tests for LangChain/LangGraph/DeepAgents: added new LangChain/langgraph/deepagents suites, moved/refactored tests for isolation, and removed obsolete modules; added session-scoped/autouse fixtures to improve ordering and reuse.
  • Chores

    • CI now conditionally runs Python integration suites via new path filters and workflow flags; test targets split to run base and integration tests separately.
  • Documentation

    • Added guidance on recommended pytest fixture patterns.

Review Change Stack

… installed

Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
…path-filters

Signed-off-by: David Gardner <dagardner@nvidia.com>
…y suceeding

Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
…lters

Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
…lters

Signed-off-by: David Gardner <dagardner@nvidia.com>
@dagardner-nv dagardner-nv self-assigned this May 15, 2026
@dagardner-nv dagardner-nv added the Improvement improvement to existing functionality label May 15, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: f941427d-0677-4547-bd17-79014e2697b7

📥 Commits

Reviewing files that changed from the base of the PR and between 005b767 and cc72e20.

📒 Files selected for processing (1)
  • .github/workflows/ci_check.yml
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Check / Run
🧰 Additional context used
📓 Path-based instructions (4)
.github/workflows/**/*.{yml,yaml}

📄 CodeRabbit inference engine (.agents/skills/maintain-ci/SKILL.md)

.github/workflows/**/*.{yml,yaml}: Put permissions: on each job that needs token access in GitHub Actions workflows
Avoid workflow-level permissions unless the repository intentionally centralizes them and the inheritance tradeoff is documented
Keep third-party actions pinned to full commit SHAs and preserve the readable version comment after the SHA
Prefer action-native or ecosystem-native caching over generic actions/cache in GitHub Actions workflows
Use lockfiles or dependency manifests to drive cache invalidation in GitHub Actions workflows
Keep deploy and publish permissions isolated to the jobs that need them
Read both caller and callee when a workflow uses workflow_call in GitHub Actions
Put release-tag validation in the earliest practical caller job when the pipeline has tag-based publish behavior
Keep release-tag policy aligned with RELEASING.md: raw SemVer tags only, no leading v
contents: read is the default minimum for checkout-based build, test, docs, and packaging jobs
pull-requests: read is required for PR metadata lookup jobs in GitHub Actions workflows
pages: write and id-token: write should be limited to Pages deployment jobs and any caller that invokes them through a reusable workflow
For reusable workflows, the caller must grant every permission the called jobs require and the callee cannot elevate beyond what the caller provides
Prefer astral-sh/setup-uv cache support with cache-dependency-glob anchored to uv.lock for Python dependency caching
Prefer Swatinem/rust-cache with explicit shared-key and workspaces instead of ad hoc target-directory caching
Avoid caching generated outputs that can hide stale behavior unless the repo already relies on them deliberately
Ensure each job has the minimum permissions it needs during GitHub Actions CI review
Ensure reusable workflow callers grant only the scopes their callees require
Ensure every external action is pinned to a full SHA in GitHub Actions workflows
Ensure cache ...

Files:

  • .github/workflows/ci_check.yml
{.github/**/*.{yml,yaml},*.patch,scripts/**/*,*.sh,*.bat,Dockerfile*}

📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)

Update CI configuration, patch files, and build scripts with new functional identifiers after rename operations

Files:

  • .github/workflows/ci_check.yml
{.github/workflows/*.{yml,yaml},.gitlab-ci.yml}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Ensure CI workflow references match local package names and installation methods

Files:

  • .github/workflows/ci_check.yml
{.github/**,.gitlab-ci.yml,.pre-commit-config.yaml,justfile,scripts/**}

⚙️ CodeRabbit configuration file

{.github/**,.gitlab-ci.yml,.pre-commit-config.yaml,justfile,scripts/**}: Review automation changes for reproducibility, pinned versions where appropriate, secret handling, and consistency with the documented validation matrix.
Pay attention to commands that need generated native artifacts, FFI libraries, or platform-specific environment variables.

Files:

  • .github/workflows/ci_check.yml
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: NVIDIA/NeMo-Flow

Timestamp: 2026-05-18T20:06:26.638Z
Learning: Use this skill when the change is primarily in `python/nemo_flow`, `python/tests`, `crates/python`, or Python-facing docs/examples
Learnt from: CR
Repo: NVIDIA/NeMo-Flow

Timestamp: 2026-05-18T20:06:26.638Z
Learning: Use `karpathy-guidelines` alongside this skill for implementation or review work. Keep changes scoped, surface assumptions, and define focused validation before editing
Learnt from: CR
Repo: NVIDIA/NeMo-Flow

Timestamp: 2026-05-18T20:06:26.638Z
Learning: If `crates/core`, `crates/adaptive`, or shared runtime semantics changed, also use `validate-change`
Learnt from: CR
Repo: NVIDIA/NeMo-Flow

Timestamp: 2026-05-18T20:06:26.638Z
Learning: If the change is actually about docs only, prefer `contribute-docs` plus targeted command checks
📚 Learning: 2026-05-03T04:23:07.497Z
Learnt from: willkill07
Repo: NVIDIA/NeMo-Flow PR: 46
File: .github/workflows/ci_rust.yml:31-64
Timestamp: 2026-05-03T04:23:07.497Z
Learning: In GitHub Actions workflow YAML, it’s valid to conditionally disable a service container by setting the service container’s `image` to an empty string (`''`) via a matrix variable (e.g., `redis_service_image: ''`). This intentionally makes the runner skip service initialization for that matrix entry rather than failing the job. When reviewing workflows, don’t flag this as an error if the workflow uses an empty `image` to disable the service on specific matrix entries (e.g., OS-specific setups); verify the `image` is sourced from the matrix variable and that the service is only expected to be available when a non-empty image is provided.

Applied to files:

  • .github/workflows/ci_check.yml
🔇 Additional comments (3)
.github/workflows/ci_check.yml (3)

14-18: LGTM!


112-112: LGTM!


118-123: LGTM!


Walkthrough

Adds a CI path filter and flags to optionally run LangChain/LangGraph/DeepAgents Python integration tests; splits CI test targets, excludes integration tests from base runs, configures coverage exclusion, and refactors/introduces autouse/session pytest fixtures and integration test modules.

Changes

Conditional Integration Testing for LangChain, LangGraph, and DeepAgents

Layer / File(s) Summary
CI workflow conditional execution
.github/ci-path-filters.yml, .github/workflows/ci_changes.yml, .github/workflows/ci_check.yml, .github/workflows/ci.yaml, .github/workflows/ci_python.yml
Adds python_integration_langchain path filter and new outputs/inputs (run_python_integration_langchain, run_integration_langchain); wires flags through ci_changes → ci_check/ci_python to conditionally enable extras and a LangChain integration test step.
Base integration fixtures and coverage
python/tests/integrations/conftest.py, pyproject.toml
Adds session-scoped fixtures integration_langchain, integration_langgraph, integration_deepagents with ordered dependency and pytest.skip on import failure; coverage configured to omit integration directories.
Build targets and fixture docs
justfile, .agents/skills/test-python-binding/SKILL.md
test-python CI target now excludes integration tests; new test-python-langchain target runs integration suites with extras; test-all updated to include it; SKILL.md adds recommended pytest fixture pattern.
LangChain integration tests: callbacks and middleware
python/tests/integrations/langchain_tests/conftest.py, python/tests/integrations/langchain_tests/test_callbacks.py, python/tests/integrations/langchain_tests/test_middleware.py
Adds autouse integration_langchain conftest, refactors callbacks tests to use a session callbacks_module fixture for isolated monkeypatching, and introduces a comprehensive test_middleware.py covering sync/async model/tool wrapping, codec inference, and end-to-end agent event assertions.
DeepAgents integration tests with injected fixtures
python/tests/integrations/deepagents_tests/conftest.py, python/tests/integrations/deepagents_tests/test_deepagents_integration.py
Adds autouse integration_deepagents conftest; refactors tests to accept injected deepagents_integration_module and shared callback_handler fixtures; replaces class-level mock model with a factory-based mock.
LangGraph integration tests with shared callback handler
python/tests/integrations/langgraph_tests/conftest.py, python/tests/integrations/langgraph_tests/test_langgraph_integration.py
Adds autouse integration_langgraph conftest; extracts callback_handler fixture, renames helper to _events_to_strings, and updates graph tests to use the injected handler and class-level expected events.

Sequence Diagram

sequenceDiagram
  participant Test as test_agent_integration
  participant RecordingMW as RecordingMiddleware
  participant Model as MockedBaseChatModel
  participant NemoFlow as nemo_flow.scope
  Test->>NemoFlow: enter scope context
  Test->>RecordingMW: call wrap_model_call / awrap_model_call
  RecordingMW->>Model: invoke / ainvoke (with modified model_settings)
  Model-->>RecordingMW: ModelResponse
  RecordingMW-->>Test: ModelResponse
  Test->>NemoFlow: collect and assert events
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • NVIDIA/NeMo-Flow#90: DeepAgents integration work related to refactored DeepAgents integration tests and fixtures.
  • NVIDIA/NeMo-Flow#96: Overlapping edits to SKILL.md adding pytest fixture guidance.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title follows Conventional Commits format with type 'chore' and a concise imperative summary under 72 characters, accurately describing the main change of adding CI path filters for integrations.
Description check ✅ Passed The description includes all required sections: Overview with confirmation checkboxes completed, Details explaining the changes (path filters, directory renames, lazy imports, coverage exclusion), reviewer guidance pointing to key files, and related issues placeholder.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@github-actions github-actions Bot added size:L PR is large Maintenance CI or Build or general repository maintenance lang:python PR changes/introduces Python code and removed Improvement improvement to existing functionality labels May 15, 2026
[skip ci]

Signed-off-by: David Gardner <dagardner@nvidia.com>
@willkill07 willkill07 added this to the 0.3 milestone May 18, 2026
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
…e test

Signed-off-by: David Gardner <dagardner@nvidia.com>
[skip ci]

Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
@github-actions github-actions Bot added size:XL PR is extra large and removed size:L PR is large labels May 18, 2026
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
@dagardner-nv dagardner-nv marked this pull request as ready for review May 18, 2026 19:49
@dagardner-nv dagardner-nv requested a review from a team as a code owner May 18, 2026 19:49
Signed-off-by: David Gardner <dagardner@nvidia.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🤖 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 @.agents/skills/test-python-binding/SKILL.md:
- Around line 42-46: The fenced Python code block using triple backticks in
SKILL.md needs blank lines inserted immediately before the opening ```python and
immediately after the closing ``` to satisfy MD031; update the section that
shows the pytest fixture example (the ```python block that contains
`@pytest.fixture` and def <fixture_name>_fixture()) so there is an empty line
above the opening fence and an empty line below the closing fence (preserve the
existing text around the block, only add the blank lines).

In @.github/workflows/ci_check.yml:
- Around line 118-123: The extras string is being passed as a single quoted
scalar (and an empty quoted scalar) which makes uv sync receive one combined arg
or an empty arg; change the implementation to use a bash array (e.g.
FLOW_CI_UV_SYNC_EXTRA_ARGS as an array) and populate it with individual extras
when PYTHON_INTEGRATION_LANGCHAIN is true, leave it empty otherwise, then expand
it in the uv sync invocation using the array expansion syntax
(\"${FLOW_CI_UV_SYNC_EXTRA_ARGS[@]}\") so each extra is passed as a separate
argument and no empty argument is passed; update the lines that set
FLOW_CI_UV_SYNC_EXTRA_ARGS and the uv sync call accordingly.

In @.github/workflows/ci_python.yml:
- Around line 139-142: The CI step named "Run Python LangChain integration
tests" is calling a non-existent Just target
`test-python-integration-langchain`; update the `run:` invocation to use the
renamed Just target `test-python-langchain` (so the command becomes `just --set
ci true --set output_dir "${{ github.workspace }}" test-python-langchain`),
keeping the existing `if: ${{ inputs.run_integration_langchain == 'true' }}` and
`working-directory` unchanged so enabling the input still triggers the correct
recipe.

In @.github/workflows/ci.yaml:
- Line 215: The CI job's run condition currently uses test-trigger flags
(needs.ci_changes.outputs.run_python and run_python_integration_langchain) which
causes packaging to run for integration-test-only changes; restore the original
gating by using the run_python_package output instead. Update the condition for
run_package so it references needs.ci_changes.outputs.run_python_package
(instead of run_python or run_python_integration_langchain) so packaging jobs
only run when run_python_package is true.

In `@python/tests/integrations/conftest.py`:
- Around line 18-19: Replace the broad except Exception that wraps the langchain
import and calls pytest.skip("langchain must be installed to run LangChain based
tests") with a targeted except ImportError (or ModuleNotFoundError) so only
missing-dependency import failures trigger the skip; update each occurrence that
surrounds the langchain import/pytest.skip pattern (the blocks that currently
catch Exception and call pytest.skip with that message) to catch ImportError
instead and let other exceptions surface.

In `@python/tests/integrations/langgraph_tests/test_langgraph_integration.py`:
- Around line 89-96: The class attribute `_expected_events` is currently a
mutable list; change it to an immutable tuple by replacing the list literal
[...] with a tuple literal (e.g. (...)) so the attribute is read-only and avoids
RUF012; update any equality/iteration uses (in tests referencing
`_expected_events`) to continue working with the tuple type if needed.
🪄 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: 9325d3cc-9d42-444c-906d-21b3cf9334b3

📥 Commits

Reviewing files that changed from the base of the PR and between efd933b and 4e48df5.

📒 Files selected for processing (17)
  • .agents/skills/test-python-binding/SKILL.md
  • .github/ci-path-filters.yml
  • .github/workflows/ci.yaml
  • .github/workflows/ci_changes.yml
  • .github/workflows/ci_check.yml
  • .github/workflows/ci_python.yml
  • justfile
  • pyproject.toml
  • python/tests/integrations/conftest.py
  • python/tests/integrations/deepagents_tests/conftest.py
  • python/tests/integrations/deepagents_tests/test_deepagents_integration.py
  • python/tests/integrations/langchain/test_middleware.py
  • python/tests/integrations/langchain_tests/conftest.py
  • python/tests/integrations/langchain_tests/test_callbacks.py
  • python/tests/integrations/langchain_tests/test_middleware.py
  • python/tests/integrations/langgraph_tests/conftest.py
  • python/tests/integrations/langgraph_tests/test_langgraph_integration.py
💤 Files with no reviewable changes (1)
  • python/tests/integrations/langchain/test_middleware.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (22)
**/*.toml

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Include SPDX license headers in TOML files using TOML comment syntax

Files:

  • pyproject.toml
{Cargo.toml,setup.py,setup.cfg,pyproject.toml,go.mod,go.sum,package.json,package-lock.json,yarn.lock,pom.xml,*.gradle}

📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)

Update repository manifest files (Cargo.toml, setup.py, go.mod, package.json, etc.) with new package/crate names during rename operations

Files:

  • pyproject.toml
{Cargo.toml,pyproject.toml,go/nemo_flow/go.mod,package.json,package-lock.json,crates/node/package.json}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Maintain consistent package names, import paths, and module names across Rust, Python, Go, Node, and WebAssembly workspaces in NeMo Flow

Files:

  • pyproject.toml
.github/workflows/**/*.{yml,yaml}

📄 CodeRabbit inference engine (.agents/skills/maintain-ci/SKILL.md)

.github/workflows/**/*.{yml,yaml}: Put permissions: on each job that needs token access in GitHub Actions workflows
Avoid workflow-level permissions unless the repository intentionally centralizes them and the inheritance tradeoff is documented
Keep third-party actions pinned to full commit SHAs and preserve the readable version comment after the SHA
Prefer action-native or ecosystem-native caching over generic actions/cache in GitHub Actions workflows
Use lockfiles or dependency manifests to drive cache invalidation in GitHub Actions workflows
Keep deploy and publish permissions isolated to the jobs that need them
Read both caller and callee when a workflow uses workflow_call in GitHub Actions
Put release-tag validation in the earliest practical caller job when the pipeline has tag-based publish behavior
Keep release-tag policy aligned with RELEASING.md: raw SemVer tags only, no leading v
contents: read is the default minimum for checkout-based build, test, docs, and packaging jobs
pull-requests: read is required for PR metadata lookup jobs in GitHub Actions workflows
pages: write and id-token: write should be limited to Pages deployment jobs and any caller that invokes them through a reusable workflow
For reusable workflows, the caller must grant every permission the called jobs require and the callee cannot elevate beyond what the caller provides
Prefer astral-sh/setup-uv cache support with cache-dependency-glob anchored to uv.lock for Python dependency caching
Prefer Swatinem/rust-cache with explicit shared-key and workspaces instead of ad hoc target-directory caching
Avoid caching generated outputs that can hide stale behavior unless the repo already relies on them deliberately
Ensure each job has the minimum permissions it needs during GitHub Actions CI review
Ensure reusable workflow callers grant only the scopes their callees require
Ensure every external action is pinned to a full SHA in GitHub Actions workflows
Ensure cache ...

Files:

  • .github/workflows/ci_python.yml
  • .github/workflows/ci_check.yml
  • .github/workflows/ci_changes.yml
  • .github/workflows/ci.yaml
{.github/**/*.{yml,yaml},*.patch,scripts/**/*,*.sh,*.bat,Dockerfile*}

📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)

Update CI configuration, patch files, and build scripts with new functional identifiers after rename operations

Files:

  • .github/workflows/ci_python.yml
  • .github/workflows/ci_check.yml
  • .github/ci-path-filters.yml
  • .github/workflows/ci_changes.yml
  • .github/workflows/ci.yaml
{.github/workflows/*.{yml,yaml},.gitlab-ci.yml}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Ensure CI workflow references match local package names and installation methods

Files:

  • .github/workflows/ci_python.yml
  • .github/workflows/ci_check.yml
  • .github/workflows/ci_changes.yml
  • .github/workflows/ci.yaml
{.github/**,.gitlab-ci.yml,.pre-commit-config.yaml,justfile,scripts/**}

⚙️ CodeRabbit configuration file

{.github/**,.gitlab-ci.yml,.pre-commit-config.yaml,justfile,scripts/**}: Review automation changes for reproducibility, pinned versions where appropriate, secret handling, and consistency with the documented validation matrix.
Pay attention to commands that need generated native artifacts, FFI libraries, or platform-specific environment variables.

Files:

  • .github/workflows/ci_python.yml
  • .github/workflows/ci_check.yml
  • .github/ci-path-filters.yml
  • .github/workflows/ci_changes.yml
  • justfile
  • .github/workflows/ci.yaml
**/*.py

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.py: Use Ruff with rule sets E, F, W, I for Python linting
Use Ruff formatter for Python code with line length 120 and double quotes
Use ty for Python type checking
Use snake_case naming convention for Python code
Include SPDX license headers in all Python source files using Python comment syntax

Format changed Python wrapper and test files with uv run ruff format python

Files:

  • python/tests/integrations/langgraph_tests/conftest.py
  • python/tests/integrations/deepagents_tests/conftest.py
  • python/tests/integrations/conftest.py
  • python/tests/integrations/langchain_tests/conftest.py
  • python/tests/integrations/langchain_tests/test_callbacks.py
  • python/tests/integrations/langchain_tests/test_middleware.py
  • python/tests/integrations/langgraph_tests/test_langgraph_integration.py
  • python/tests/integrations/deepagents_tests/test_deepagents_integration.py
**/*.{rs,py,go,js,ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use SONAR_IGNORE_START / SONAR_IGNORE_END markers only for documented false positives that cannot be resolved in code; keep ignored blocks small, add explanatory comments, and require reviewer sign-off

Files:

  • python/tests/integrations/langgraph_tests/conftest.py
  • python/tests/integrations/deepagents_tests/conftest.py
  • python/tests/integrations/conftest.py
  • python/tests/integrations/langchain_tests/conftest.py
  • python/tests/integrations/langchain_tests/test_callbacks.py
  • python/tests/integrations/langchain_tests/test_middleware.py
  • python/tests/integrations/langgraph_tests/test_langgraph_integration.py
  • python/tests/integrations/deepagents_tests/test_deepagents_integration.py
**/*.{md,markdown,py,sh,bash,js,ts,java,cpp,go,rust}

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

Keep package names, repo references, and build commands current in documentation

Files:

  • python/tests/integrations/langgraph_tests/conftest.py
  • python/tests/integrations/deepagents_tests/conftest.py
  • python/tests/integrations/conftest.py
  • python/tests/integrations/langchain_tests/conftest.py
  • python/tests/integrations/langchain_tests/test_callbacks.py
  • python/tests/integrations/langchain_tests/test_middleware.py
  • python/tests/integrations/langgraph_tests/test_langgraph_integration.py
  • python/tests/integrations/deepagents_tests/test_deepagents_integration.py
**/*.{md,markdown,py,sh,bash}

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

Keep stable user-facing wrappers at scripts/ root in docs and examples; only point at namespaced helper paths when documenting internal maintenance work

Files:

  • python/tests/integrations/langgraph_tests/conftest.py
  • python/tests/integrations/deepagents_tests/conftest.py
  • python/tests/integrations/conftest.py
  • python/tests/integrations/langchain_tests/conftest.py
  • python/tests/integrations/langchain_tests/test_callbacks.py
  • python/tests/integrations/langchain_tests/test_middleware.py
  • python/tests/integrations/langgraph_tests/test_langgraph_integration.py
  • python/tests/integrations/deepagents_tests/test_deepagents_integration.py
**/*.{md,markdown,py,sh,bash,js,ts,example}

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

Example commands must match current package names and paths

Files:

  • python/tests/integrations/langgraph_tests/conftest.py
  • python/tests/integrations/deepagents_tests/conftest.py
  • python/tests/integrations/conftest.py
  • python/tests/integrations/langchain_tests/conftest.py
  • python/tests/integrations/langchain_tests/test_callbacks.py
  • python/tests/integrations/langchain_tests/test_middleware.py
  • python/tests/integrations/langgraph_tests/test_langgraph_integration.py
  • python/tests/integrations/deepagents_tests/test_deepagents_integration.py
**/{integrations,integration,*-integration}/**

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

**/{integrations,integration,*-integration}/**: Keep NeMo Flow optional in framework integrations
Preserve the framework's original behavior when NeMo Flow is absent
Wrap tool and LLM paths at the correct framework boundary
Integration pattern must follow docs/integrate-frameworks/adding-scopes.md

Files:

  • python/tests/integrations/langgraph_tests/conftest.py
  • python/tests/integrations/deepagents_tests/conftest.py
  • python/tests/integrations/conftest.py
  • python/tests/integrations/langchain_tests/conftest.py
  • python/tests/integrations/langchain_tests/test_callbacks.py
  • python/tests/integrations/langchain_tests/test_middleware.py
  • python/tests/integrations/langgraph_tests/test_langgraph_integration.py
  • python/tests/integrations/deepagents_tests/test_deepagents_integration.py
**/*.{js,ts,tsx,jsx,py,rs,go,java,c,cpp,h,cc,cxx,cs,rb,php,swift,kt}

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

Changed files must be formatted with the language-native formatter

Files:

  • python/tests/integrations/langgraph_tests/conftest.py
  • python/tests/integrations/deepagents_tests/conftest.py
  • python/tests/integrations/conftest.py
  • python/tests/integrations/langchain_tests/conftest.py
  • python/tests/integrations/langchain_tests/test_callbacks.py
  • python/tests/integrations/langchain_tests/test_middleware.py
  • python/tests/integrations/langgraph_tests/test_langgraph_integration.py
  • python/tests/integrations/deepagents_tests/test_deepagents_integration.py
python/**/*.py

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

python/**/*.py: If Python language surface changed, always run Python test target even when Rust core did not change
For Python changes, use uv run ruff format python to format Python files

Files:

  • python/tests/integrations/langgraph_tests/conftest.py
  • python/tests/integrations/deepagents_tests/conftest.py
  • python/tests/integrations/conftest.py
  • python/tests/integrations/langchain_tests/conftest.py
  • python/tests/integrations/langchain_tests/test_callbacks.py
  • python/tests/integrations/langchain_tests/test_middleware.py
  • python/tests/integrations/langgraph_tests/test_langgraph_integration.py
  • python/tests/integrations/deepagents_tests/test_deepagents_integration.py
**/*.{py,js,ts,tsx,go,rs,md}

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

Format changed files with the language-native formatter before the final lint/test pass

Files:

  • python/tests/integrations/langgraph_tests/conftest.py
  • python/tests/integrations/deepagents_tests/conftest.py
  • python/tests/integrations/conftest.py
  • python/tests/integrations/langchain_tests/conftest.py
  • python/tests/integrations/langchain_tests/test_callbacks.py
  • python/tests/integrations/langchain_tests/test_middleware.py
  • python/tests/integrations/langgraph_tests/test_langgraph_integration.py
  • python/tests/integrations/deepagents_tests/test_deepagents_integration.py
**/*.{rs,py,js,ts,tsx,go}

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

During iteration, prefer uv run pre-commit run --files <changed files...> for targeted validation

Files:

  • python/tests/integrations/langgraph_tests/conftest.py
  • python/tests/integrations/deepagents_tests/conftest.py
  • python/tests/integrations/conftest.py
  • python/tests/integrations/langchain_tests/conftest.py
  • python/tests/integrations/langchain_tests/test_callbacks.py
  • python/tests/integrations/langchain_tests/test_middleware.py
  • python/tests/integrations/langgraph_tests/test_langgraph_integration.py
  • python/tests/integrations/deepagents_tests/test_deepagents_integration.py
**/*test*.py

📄 CodeRabbit inference engine (.agents/skills/test-python-binding/SKILL.md)

Run focused pytest first when you know the affected area

Do not add @pytest.mark.asyncio decorator to any test function; async tests are automatically detected and run by the async runner

Do not add a -> None return type annotation to test functions

When mocking a class, use unittest.mock.MagicMock or unittest.mock.AsyncMock with the spec constructor argument when necessary, instead of defining a new class

The name of the mocked class should be prefixed with mock, not fake

Prefer pytest fixtures over helper methods

Do not repeat fixtures; if a fixture is needed in multiple test files, place it in a conftest.py file

Prefer pytest.mark.parametrize over creating individual tests for different input types

Files:

  • python/tests/integrations/langgraph_tests/conftest.py
  • python/tests/integrations/deepagents_tests/conftest.py
  • python/tests/integrations/conftest.py
  • python/tests/integrations/langchain_tests/conftest.py
  • python/tests/integrations/langchain_tests/test_callbacks.py
  • python/tests/integrations/langchain_tests/test_middleware.py
  • python/tests/integrations/langgraph_tests/test_langgraph_integration.py
  • python/tests/integrations/deepagents_tests/test_deepagents_integration.py
**/conftest.py

📄 CodeRabbit inference engine (.agents/skills/test-python-binding/SKILL.md)

When creating a fixture follow the pattern: @pytest.fixture(name="<fixture_name>"[, scope="<scope>"]) def <fixture_name>_fixture() -> <return_type>:. Only specify the scope argument when the value is something other than "function"

Files:

  • python/tests/integrations/langgraph_tests/conftest.py
  • python/tests/integrations/deepagents_tests/conftest.py
  • python/tests/integrations/conftest.py
  • python/tests/integrations/langchain_tests/conftest.py
{crates/**/tests/**,python/tests/**,go/nemo_flow/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_flow/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • python/tests/integrations/langgraph_tests/conftest.py
  • python/tests/integrations/deepagents_tests/conftest.py
  • python/tests/integrations/conftest.py
  • python/tests/integrations/langchain_tests/conftest.py
  • python/tests/integrations/langchain_tests/test_callbacks.py
  • python/tests/integrations/langchain_tests/test_middleware.py
  • python/tests/integrations/langgraph_tests/test_langgraph_integration.py
  • python/tests/integrations/deepagents_tests/test_deepagents_integration.py
justfile

📄 CodeRabbit inference engine (.agents/skills/update-project-version/SKILL.md)

When editing helper code, keep set_project_version, set_cargo_workspace_version, and set_node_package_versions aligned with version-update fields; maintain set_node_package_version as a compatibility alias and set_npm_package_version as the reusable npm JSON helper

Files:

  • justfile
**/{tests,test}/**/*{integration,smoke}*.py

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

Relevant integration tests or smoke path must pass before contribution

Files:

  • python/tests/integrations/langgraph_tests/test_langgraph_integration.py
  • python/tests/integrations/deepagents_tests/test_deepagents_integration.py
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: NVIDIA/NeMo-Flow

Timestamp: 2026-05-18T19:50:14.108Z
Learning: Run the full Python suite with `just test-python` before review
Learnt from: CR
Repo: NVIDIA/NeMo-Flow

Timestamp: 2026-05-18T19:50:14.108Z
Learning: If any Rust files changed as part of the Python work, also run `cargo fmt --all`, `just test-rust`, and `cargo clippy --workspace --all-targets -- -D warnings`
Learnt from: CR
Repo: NVIDIA/NeMo-Flow

Timestamp: 2026-05-18T19:50:14.108Z
Learning: Use `just build-python` when you want an explicit build-only pass
Learnt from: CR
Repo: NVIDIA/NeMo-Flow

Timestamp: 2026-05-18T19:50:14.108Z
Learning: If the native Rust bridge changed, add the Rust crate tests for `nemo-flow-python`
Learnt from: CR
Repo: NVIDIA/NeMo-Flow

Timestamp: 2026-05-18T19:50:14.108Z
Learning: Use this skill when the change is primarily in `python/nemo_flow`, `python/tests`, `crates/python`, or Python-facing docs/examples
Learnt from: CR
Repo: NVIDIA/NeMo-Flow

Timestamp: 2026-05-18T19:50:14.108Z
Learning: If `crates/core`, `crates/adaptive`, or shared runtime semantics changed, also use `validate-change` skill
Learnt from: CR
Repo: NVIDIA/NeMo-Flow

Timestamp: 2026-05-18T19:50:14.108Z
Learning: If the change is actually about docs only, prefer `contribute-docs` skill plus targeted command checks
📚 Learning: 2026-05-03T04:23:07.497Z
Learnt from: willkill07
Repo: NVIDIA/NeMo-Flow PR: 46
File: .github/workflows/ci_rust.yml:31-64
Timestamp: 2026-05-03T04:23:07.497Z
Learning: In GitHub Actions workflow YAML, it’s valid to conditionally disable a service container by setting the service container’s `image` to an empty string (`''`) via a matrix variable (e.g., `redis_service_image: ''`). This intentionally makes the runner skip service initialization for that matrix entry rather than failing the job. When reviewing workflows, don’t flag this as an error if the workflow uses an empty `image` to disable the service on specific matrix entries (e.g., OS-specific setups); verify the `image` is sourced from the matrix variable and that the service is only expected to be available when a non-empty image is provided.

Applied to files:

  • .github/workflows/ci_python.yml
  • .github/workflows/ci_check.yml
  • .github/workflows/ci_changes.yml
🪛 markdownlint-cli2 (0.22.1)
.agents/skills/test-python-binding/SKILL.md

[warning] 42-42: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 46-46: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

🪛 Ruff (0.15.12)
python/tests/integrations/conftest.py

[warning] 17-17: Consider moving this statement to an else block

(TRY300)


[warning] 18-18: Do not catch blind exception: Exception

(BLE001)


[warning] 23-23: Unused function argument: integration_langchain

(ARG001)


[warning] 30-30: Consider moving this statement to an else block

(TRY300)


[warning] 31-31: Do not catch blind exception: Exception

(BLE001)


[warning] 36-36: Unused function argument: integration_langgraph

(ARG001)


[warning] 43-43: Consider moving this statement to an else block

(TRY300)


[warning] 44-44: Do not catch blind exception: Exception

(BLE001)

python/tests/integrations/langchain_tests/test_callbacks.py

[warning] 46-46: Use @pytest.fixture over @pytest.fixture()

Remove parentheses

(PT001)


[warning] 53-53: Use @pytest.fixture over @pytest.fixture()

Remove parentheses

(PT001)


[warning] 54-54: Unused function argument: mock_nemo_flow

(ARG001)

python/tests/integrations/langchain_tests/test_middleware.py

[warning] 83-83: Dynamically typed expressions (typing.Any) are disallowed in func

(ANN401)


[warning] 83-83: Unused function argument: kwargs

(ARG001)


[warning] 83-83: Dynamically typed expressions (typing.Any) are disallowed in **kwargs

(ANN401)


[warning] 130-130: Missing return type annotation for special method __init__

Add return type annotation: None

(ANN204)


[warning] 138-138: Dynamically typed expressions (typing.Any) are disallowed in codec

(ANN401)


[warning] 139-139: Dynamically typed expressions (typing.Any) are disallowed in response_codec

(ANN401)


[warning] 140-140: Dynamically typed expressions (typing.Any) are disallowed in func

(ANN401)


[warning] 141-141: Dynamically typed expressions (typing.Any) are disallowed in _llm_execute

(ANN401)


[warning] 305-305: Boolean-typed positional argument in function definition

(FBT001)


[warning] 355-355: Missing return type annotation for private function event_recorder

Add return type annotation: None

(ANN202)

python/tests/integrations/langgraph_tests/test_langgraph_integration.py

[warning] 89-96: Mutable default value for class attribute

(RUF012)

python/tests/integrations/deepagents_tests/test_deepagents_integration.py

[warning] 44-44: Dynamically typed expressions (typing.Any) are disallowed in _tools

(ANN401)


[warning] 44-44: Dynamically typed expressions (typing.Any) are disallowed in *_args

(ANN401)


[warning] 44-44: Dynamically typed expressions (typing.Any) are disallowed in **_kwargs

(ANN401)

🔇 Additional comments (20)
python/tests/integrations/langgraph_tests/conftest.py (1)

9-14: LGTM!

python/tests/integrations/langgraph_tests/test_langgraph_integration.py (8)

20-20: LGTM!


37-38: LGTM!


60-64: LGTM!


67-76: LGTM!


79-85: LGTM!


98-108: LGTM!


110-120: LGTM!


123-159: LGTM!

python/tests/integrations/langchain_tests/conftest.py (1)

1-14: LGTM!

python/tests/integrations/langchain_tests/test_callbacks.py (1)

8-57: LGTM!

Also applies to: 133-135, 231-270

python/tests/integrations/langchain_tests/test_middleware.py (1)

1-374: LGTM!

.github/ci-path-filters.yml (1)

70-82: LGTM!

.github/workflows/ci_changes.yml (1)

51-53: LGTM!

Also applies to: 86-86

pyproject.toml (1)

116-118: LGTM!

justfile (1)

857-863: LGTM!

Also applies to: 871-884, 1030-1030

.agents/skills/test-python-binding/SKILL.md (1)

41-47: LGTM!

python/tests/integrations/deepagents_tests/conftest.py (1)

9-14: LGTM!

python/tests/integrations/deepagents_tests/test_deepagents_integration.py (2)

38-47: LGTM!

Also applies to: 64-294


24-35: ⚡ Quick win

The fixture parameter typing prevents type checkers from recognizing module-specific attributes.

On line 35, accessing .NemoFlowDeepAgentsCallbackHandler() on the deepagents_integration_module parameter (typed as types.ModuleType on line 33) won't be recognized by static type checkers. Type checkers lack knowledge of the attributes available on the dynamically-loaded module.

Consider using cast() at the usage site or defining a TYPE_CHECKING alias to provide proper type information:

# Option 1: Use cast at usage site
from typing import cast
return cast(deepagents_integration, deepagents_integration_module).NemoFlowDeepAgentsCallbackHandler()

# Option 2: Use TYPE_CHECKING conditional (at module level)
if TYPE_CHECKING:
    import nemo_flow.integrations.deepagents as deepagents_integration
else:
    DeepAgentsModule = types.ModuleType

`@pytest.fixture`(name="deepagents_integration_module", scope="session")
def deepagents_integration_module_fixture() -> DeepAgentsModule:
    import nemo_flow.integrations.deepagents as deepagents_integration
    return deepagents_integration

Comment thread .agents/skills/test-python-binding/SKILL.md
Comment thread .github/workflows/ci_check.yml Outdated
Comment thread .github/workflows/ci_python.yml Outdated
Comment thread .github/workflows/ci.yaml
Comment thread python/tests/integrations/conftest.py
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
@dagardner-nv
Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot rapids-bot Bot merged commit b4cfb34 into NVIDIA:main May 18, 2026
67 checks passed
@dagardner-nv dagardner-nv deleted the david-path-filters branch May 18, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lang:python PR changes/introduces Python code Maintenance CI or Build or general repository maintenance size:XL PR is extra large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants