Skip to content

fix: update mcp test to not patch multiple times#1045

Merged
rapids-bot[bot] merged 2 commits intoNVIDIA:release/1.3from
willkill07:wkk_fix-mcp-test
Oct 20, 2025
Merged

fix: update mcp test to not patch multiple times#1045
rapids-bot[bot] merged 2 commits intoNVIDIA:release/1.3from
willkill07:wkk_fix-mcp-test

Conversation

@willkill07
Copy link
Member

@willkill07 willkill07 commented Oct 20, 2025

Description

Closes

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

    • Internal test structure reorganized for session management; no change to behavior or test outcomes.
  • Chores

    • Updated markdown link-check tool to a newer version.
    • Adjusted CI pre-commit invocation to run on changed/staged files rather than all files.

Signed-off-by: Will Killian <wkillian@nvidia.com>
@willkill07 willkill07 self-assigned this Oct 20, 2025
@willkill07 willkill07 requested a review from a team as a code owner October 20, 2025 16:43
@willkill07 willkill07 added bug Something isn't working non-breaking Non-breaking change labels Oct 20, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 20, 2025

Walkthrough

Refactored a concurrent session creation test to consolidate the MCPStreamableHTTPClient patch context; updated pre-commit hook version for markdown-link-check; and changed the pre-commit invocation in CI checks to remove the --all-files flag.

Changes

Cohort / File(s) Summary
Test restructuring
tests/nat/mcp/test_mcp_session_management.py
Moved MCPStreamableHTTPClient patch-wrapping to an outer with block, defined create_session helper inside that context, and indented task creation/assertions into the same block — no behavioral change.
Pre-commit hook version
.pre-commit-config.yaml
Updated tcort/markdown-link-check hook revision from v3.12.2 to v3.14.1.
CI pre-commit invocation
ci/scripts/checks.sh
Removed --all-files flag from the pre-commit command invocation (now runs with default scope).

Sequence Diagram(s)

(Skipped — changes are refactors/config updates without new runtime control flow across components.)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)
Check name Status Explanation Resolution
Title Check ❌ Error The PR title "fix: update mcp test to not patch multiple times" is concise (48 chars, well under the 72-char limit) and uses imperative mood as required. However, the changeset contains three distinct, unrelated modifications: a refactoring of the MCP test structure, an update to the markdown-link-check hook version in pre-commit configuration, and a removal of the --all-files flag from a CI script. The title only addresses the MCP test change and does not reflect the other two significant changes (markdown-link-check version bump and pre-commit flag removal), making it incomplete and potentially misleading about the true scope of the PR. Consider revising the pull request to separate these three independent changes into distinct PRs, each with its own focused title, or update the PR title to reflect all changes being made. If these changes are intentionally bundled, the title should be reframed to accurately represent the full scope—for example, "fix: update dependencies and CI configuration" or similar language that encompasses all modifications in the changeset.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent 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 c4d495f and aa7207b.

📒 Files selected for processing (2)
  • .pre-commit-config.yaml (1 hunks)
  • ci/scripts/checks.sh (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
{scripts/**,ci/scripts/**}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Shell or utility scripts belong in scripts/ or ci/scripts/ and must not be mixed with library code

Files:

  • ci/scripts/checks.sh
**/*

⚙️ 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:

  • ci/scripts/checks.sh
🧠 Learnings (2)
📚 Learning: 2025-09-23T18:39:15.023Z
Learnt from: CR
PR: NVIDIA/NeMo-Agent-Toolkit#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-09-23T18:39:15.023Z
Learning: Do not commit code that fails pre-commit or ci/scripts/run_ci_local.sh check

Applied to files:

  • ci/scripts/checks.sh
📚 Learning: 2025-09-23T18:39:15.023Z
Learnt from: CR
PR: NVIDIA/NeMo-Agent-Toolkit#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-09-23T18:39:15.023Z
Learning: Run pre-commit (pre-commit run --all-files) locally before pushing; CI fails if formatting is wrong

Applied to files:

  • ci/scripts/checks.sh
🔇 Additional comments (2)
ci/scripts/checks.sh (1)

22-24: Clarify the impact of removing --all-files from CI checks.

Removing the --all-files flag narrows the scope of pre-commit checks to only changed/staged files. This is a significant behavioral change with potential implications:

  • Risk: Unchanged files could harbor issues if their dependencies change or configurations drift.
  • Benefit: Faster CI feedback for incremental changes.

The learnings indicate that local runs should use --all-files, but CI is now diverging. Please clarify the rationale and ensure this aligns with your CI/CD strategy. If this is intentional, consider documenting the decision.

How does this change align with the PR objective to "fix mcp test to not patch multiple times"? Is narrowing the pre-commit scope a separate improvement, or is it required for the test fix?

.pre-commit-config.yaml (1)

35-40: Version v3.14.1 is stable and compatible with existing configuration.

The version bump includes documentation updates and a bug fix for exit code handling when dead links are found (v3.14.1). Earlier changes in v3.13.0 added support for named regex groups and Unicode anchor links, but these are backwards-compatible feature additions. The --config and exclude parameters you're using are not affected by these changes, so no configuration adjustments are needed.


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.

Signed-off-by: Will Killian <wkillian@nvidia.com>
@willkill07
Copy link
Member Author

/merge

@rapids-bot rapids-bot bot merged commit 08b4c3b into NVIDIA:release/1.3 Oct 20, 2025
17 checks passed
@willkill07 willkill07 deleted the wkk_fix-mcp-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