Skip to content

Conversation

@willkill07
Copy link
Member

@willkill07 willkill07 commented Oct 3, 2025

Description

Fixes a test failure in the Haystack Deep Researcher example

Closes nvbugs-5557788

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
    • Any contribution which contains commits that are not Signed-Off will not be accepted.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

Summary by CodeRabbit

  • Tests

    • Updated test setup to reflect the new package namespace, ensuring tests run against the correct modules and configurations. No user-facing behavior changes.
  • Chores

    • Aligned internal references with the updated package naming for consistency across the project.

@willkill07 willkill07 requested a review from a team as a code owner October 3, 2025 18:50
@coderabbitai
Copy link

coderabbitai bot commented Oct 3, 2025

Walkthrough

Updated a test to reference the nat_haystack_deep_research_agent package instead of aiq_haystack_deep_research_agent, changing the config file path and the dynamic loader import module. No behavioral logic or public signatures were changed.

Changes

Cohort / File(s) Summary
Test path and import updates
`examples/frameworks/haystack_deep_research_agent/tests/test_haystack_deep_research_agent.py`
Replaced config path from .../aiq_haystack_deep_research_agent/configs/config.yml to .../nat_haystack_deep_research_agent/configs/config.yml and updated dynamic import from `aiq.runtime.loader` to `nat.runtime.loader`; retained `load_workflow` usage.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

bug, non-breaking

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title is concise and descriptive, uses an imperative verb form, clearly references the test failure for the Haystack Deep Research example, and stays well under the 72 character limit.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai bot added bug Something isn't working non-breaking Non-breaking change labels Oct 3, 2025
Copy link

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

🧹 Nitpick comments (3)
examples/frameworks/haystack_deep_research_agent/tests/test_haystack_deep_research_agent.py (3)

25-30: Add a docstring.

Per coding guidelines, provide a Google-style docstring for this function, even though it's private, to explain its purpose and parameters.

Apply this diff:

 def _opensearch_reachable(url: str) -> bool:
+    """Check if OpenSearch is reachable at the given URL.
+    
+    Args:
+        url: The OpenSearch endpoint URL.
+        
+    Returns:
+        True if the cluster health endpoint responds with 2xx status, False otherwise.
+    """
     try:

46-58: Add a docstring.

Per coding guidelines, provide a Google-style docstring for this test function to explain what the E2E test validates.

Apply this diff:

 async def test_full_workflow_e2e() -> None:
+    """Test the full Haystack Deep Research Agent workflow end-to-end.
+    
+    Validates that the workflow can be loaded from config and execute a simple query,
+    returning a non-empty string result.
+    """
     config_file = (Path(__file__).resolve().parents[1] / "src" / "nat_haystack_deep_research_agent" / "configs" /

61-82: Add a docstring.

Per coding guidelines, provide a Google-style docstring for this test function to explain what configuration aspects it validates.

Apply this diff:

 def test_config_yaml_loads_and_has_keys() -> None:
+    """Test that config.yml can be loaded and contains required keys.
+    
+    Validates the presence of essential configuration keys including workflow type,
+    LLM settings, and operational parameters.
+    """
     config_file = (Path(__file__).resolve().parents[1] / "configs" / "config.yml")
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8a8d734 and 61c94d3.

📒 Files selected for processing (1)
  • examples/frameworks/haystack_deep_research_agent/tests/test_haystack_deep_research_agent.py (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{py,yaml,yml}

📄 CodeRabbit inference engine (.cursor/rules/nat-test-llm.mdc)

**/*.{py,yaml,yml}: Configure response_seq as a list of strings; values cycle per call, and [] yields an empty string.
Configure delay_ms to inject per-call artificial latency in milliseconds for nat_test_llm.

Files:

  • examples/frameworks/haystack_deep_research_agent/tests/test_haystack_deep_research_agent.py
**/*.py

📄 CodeRabbit inference engine (.cursor/rules/nat-test-llm.mdc)

**/*.py: Programmatic use: create TestLLMConfig(response_seq=[...], delay_ms=...), add with builder.add_llm("", cfg).
When retrieving the test LLM wrapper, use builder.get_llm(name, wrapper_type=LLMFrameworkEnum.) and call the framework’s method (e.g., ainvoke, achat, call).

**/*.py: In code comments/identifiers use NAT abbreviations as specified: nat for API namespace/CLI, nvidia-nat for package name, NAT for env var prefixes; do not use these abbreviations in documentation
Follow PEP 20 and PEP 8; run yapf with column_limit=120; use 4-space indentation; end files with a single trailing newline
Run ruff check --fix as linter (not formatter) using pyproject.toml config; fix warnings unless explicitly ignored
Respect naming: snake_case for functions/variables, PascalCase for classes, UPPER_CASE for constants
Treat pyright warnings as errors during development
Exception handling: use bare raise to re-raise; log with logger.error() when re-raising to avoid duplicate stack traces; use logger.exception() when catching without re-raising
Provide Google-style docstrings for every public module, class, function, and CLI command; first line concise and ending with a period; surround code entities with backticks
Validate and sanitize all user input, especially in web or CLI interfaces
Prefer httpx with SSL verification enabled by default and follow OWASP Top-10 recommendations
Use async/await for I/O-bound work; profile CPU-heavy paths with cProfile or mprof before optimizing; cache expensive computations with functools.lru_cache or external cache; leverage NumPy vectorized operations when beneficial

Files:

  • examples/frameworks/haystack_deep_research_agent/tests/test_haystack_deep_research_agent.py
**/*

⚙️ CodeRabbit configuration file

**/*: # Code Review Instructions

  • Ensure the code follows best practices and coding standards. - For Python code, follow
    PEP 20 and
    PEP 8 for style guidelines.
  • Check for security vulnerabilities and potential issues. - Python methods should use type hints for all parameters and return values.
    Example:
    def my_function(param1: int, param2: str) -> bool:
        pass
  • For Python exception handling, ensure proper stack trace preservation:
    • When re-raising exceptions: use bare raise statements to maintain the original stack trace,
      and use logger.error() (not logger.exception()) to avoid duplicate stack trace output.
    • When catching and logging exceptions without re-raising: always use logger.exception()
      to capture the full stack trace information.

Documentation Review Instructions - Verify that documentation and comments are clear and comprehensive. - Verify that the documentation doesn't contain any TODOs, FIXMEs or placeholder text like "lorem ipsum". - Verify that the documentation doesn't contain any offensive or outdated terms. - Verify that documentation and comments are free of spelling mistakes, ensure the documentation doesn't contain any

words listed in the ci/vale/styles/config/vocabularies/nat/reject.txt file, words that might appear to be
spelling mistakes but are listed in the ci/vale/styles/config/vocabularies/nat/accept.txt file are OK.

Misc. - All code (except .mdc files that contain Cursor rules) should be licensed under the Apache License 2.0,

and should contain an Apache License 2.0 header comment at the top of each file.

  • Confirm that copyright years are up-to date whenever a file is changed.

Files:

  • examples/frameworks/haystack_deep_research_agent/tests/test_haystack_deep_research_agent.py
examples/**/*

⚙️ CodeRabbit configuration file

examples/**/*: - This directory contains example code and usage scenarios for the toolkit, at a minimum an example should
contain a README.md or file README.ipynb.

  • If an example contains Python code, it should be placed in a subdirectory named src/ and should
    contain a pyproject.toml file. Optionally, it might also contain scripts in a scripts/ directory.
  • If an example contains YAML files, they should be placed in a subdirectory named configs/. - If an example contains sample data files, they should be placed in a subdirectory named data/, and should
    be checked into git-lfs.

Files:

  • examples/frameworks/haystack_deep_research_agent/tests/test_haystack_deep_research_agent.py

@willkill07
Copy link
Member Author

/merge

@rapids-bot rapids-bot bot merged commit 620602d into NVIDIA:release/1.3 Oct 3, 2025
17 checks passed
@willkill07 willkill07 deleted the wkk_fix-haystack-example-test branch October 23, 2025 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants