| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Codecov Results 📊✅ 98083 passed | ⏭️ 6614 skipped | Total: 104697 | Pass Rate: 93.68% | Execution Time: 352m 55s 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ❌ Patch coverage is 68.29%. Project has 2541 uncovered lines.
@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 89.69% 89.62% -0.07%
==========================================
Files 193 193 —
Lines 24394 24478 +84
Branches 8644 8656 +12
==========================================
+ Hits 21878 21937 +59
- Misses 2516 2541 +25
- Partials 1401 1403 +2Generated by Codecov Action |
Sorry, something went wrong.
There was a problem hiding this comment.
handler_name may be unbound in _extract_handler_data_from_args for tool and prompt types
In _extract_handler_data_from_args (mcp.py ~line 423), if original_args is empty and original_kwargs.get("name") is falsy, handler_name is never assigned for handler_type == "tool" or "prompt", causing an UnboundLocalError when it is referenced at return handler_name, arguments (tool) or arguments = {"name": handler_name, ...} (prompt). Add an else: handler_name = "unknown" fallback in both branches.
EvidenceIdentified by Warden find-bugs
Sorry, something went wrong.
There was a problem hiding this comment.
UnboundLocalError when tool/prompt handler called with no args and no kwargs name
In _extract_handler_data_from_args, handler_name is only assigned inside if original_args: / elif original_kwargs.get("name"): branches for the "tool" and "prompt" types; if both conditions are false, handler_name is never set. The prompt branch then immediately dereferences it at arguments = {"name": handler_name, ...}, raising UnboundLocalError at runtime.
EvidenceIdentified by Warden code-review
Sorry, something went wrong.
There was a problem hiding this comment.
UnboundLocalError when original_args is empty and original_kwargs has no 'name' key in _extract_handler_data_from_args
For handler_type == 'tool' and handler_type == 'prompt', handler_name is assigned only inside if/elif branches with no else fallback; if both conditions are falsy the variable is unbound and will raise UnboundLocalError — for 'prompt' the crash occurs immediately at arguments = {'name': handler_name, ...} inside the function.
EvidenceIdentified by Warden find-bugs
Sorry, something went wrong.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 16ab49a. Configure here.
Sorry, something went wrong.
Separate patches for tool, prompt and resource handlers. This reduces conditionals and removes inappropriate generalization. Each handler type has different input and output types, and require different span attributes. Change `_get_active_http_scopes()` to the `_active_http_scopes()` context manager to make the function more ergonomic, as it's now used in multiple places.
| Back | FazBrowse Home | New Git URL |
Description
Separate patches for tool, prompt and resource handlers.
This reduces conditionals and removes inappropriate generalization. Each handler type has different input and output types, and require different span attributes.
Change _get_active_http_scopes to the _active_http_scopes context manager to make the function more ergonomic, as it's now used in multiple places.
Issues
Reminders