You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "aminghadersohi (via GitHub)" <gi...@apache.org> on 2026/07/10 04:16:02 UTC

[PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

aminghadersohi opened a new pull request, #41922:
URL: https://github.com/apache/superset/pull/41922

   ### SUMMARY
   Fixes several documentation/metadata inconsistencies found in a review of the MCP (Model Context Protocol) service (`superset/mcp_service/`). No tool behavior changes.
   
   - `update_chart`'s preview-first behavior (default `generate_preview=True` returns a cached preview and does not persist) is intentional, but `DEFAULT_INSTRUCTIONS` in `app.py` described it as if it always applies changes. Updated the instructions to clarify persistence only happens with `generate_preview=False`.
   - Fixed a stale comment in `generate_chart.py` ("Save chart by default") that contradicted the actual `save_chart=False` default.
   - Added `get_chart_type_schema` and the 4 semantic-layer tools (`list_metrics`, `get_table`, `get_compatible_dimensions`, `get_compatible_metrics`) to the "Available tools" section of `DEFAULT_INSTRUCTIONS`, which had omitted them since they were added.
   - Advertised the `superset://schema/{chart,dataset,dashboard,all}` resources in the "Available Resources" section of `DEFAULT_INSTRUCTIONS`, which only listed 2 of the 6 registered resources.
   - Synced the filter-column lists in the `list_charts` and `list_dashboards` docstrings with their actual Pydantic schemas (both were missing `editor`; `list_charts` was also missing `dashboards`).
   - Added `class_permission_name="Chart"` to `get_chart_type_schema`, the only one of 62 tools missing this annotation.
   - Aligned `destructiveHint` values across mutating tools: `update_dashboard` persists immediately so it should be `True` (was `False`); `update_chart_preview` only writes to cache and never persists so it should be `False` (was `True`).
   - Changed `get_dashboard_datasets`'s tag from `core` to `discovery` to match its sibling get-info tools.
   - Fixed doc drift in `superset/mcp_service/CLAUDE.md`, which showed `health_check` as an example of an unprotected (`protect=False`) tool when it is actually a protected tool.
   
   ### TESTING INSTRUCTIONS
   - `pytest tests/unit_tests/mcp_service/` β€” full suite passes (2667 passed)
   - `pre-commit run` on all changed files β€” mypy, ruff, ruff-format, pylint all pass
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41922:
URL: https://github.com/apache/superset/pull/41922#issuecomment-4984615047

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers a full AI review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #41922:
URL: https://github.com/apache/superset/pull/41922#discussion_r3583748115


##########
superset/mcp_service/app.py:
##########
@@ -216,6 +224,10 @@ def get_default_instructions(
 Available Resources:
 - instance://metadata: Instance configuration, stats, and available dataset IDs
 - chart://configs: Valid chart configuration examples and best practices
+- superset://schema/chart: Filterable/sortable/select columns for the chart model
+- superset://schema/dataset: Filterable/sortable/select columns for the dataset model
+- superset://schema/dashboard: Filterable/sortable/select columns for the dashboard model
+- superset://schema/all: Combined schema metadata for chart, dataset, and dashboard

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Missing unit tests for schema resources</b></div>
   <div id="fix">
   
   Add unit tests covering request validation, success paths, error handling, and URI pattern matching for the new schema discovery resources in `superset/mcp_service/system/resources/schema_discovery.py`.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #b950b5</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #41922:
URL: https://github.com/apache/superset/pull/41922#discussion_r3597138950


##########
tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py:
##########
@@ -0,0 +1,133 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""Tests for the schema discovery MCP resources (superset://schema/*)."""
+
+from collections.abc import Iterator
+from typing import Any
+from unittest.mock import Mock, patch
+
+import pytest
+from fastmcp import Client, FastMCP
+from fastmcp.exceptions import McpError
+
+from superset.mcp_service.app import mcp
+from superset.mcp_service.system.resources.schema_discovery import (
+    _build_schema_resource,
+)
+from superset.utils import json
+
+RESOURCE_URIS = {
+    "chart": "superset://schema/chart",
+    "dataset": "superset://schema/dataset",
+    "dashboard": "superset://schema/dashboard",
+    "all": "superset://schema/all",
+}

Review Comment:
   **Suggestion:** Add an explicit type annotation for this module-level mapping to comply with the requirement to type-hint relevant variables. [custom_rule]
   
   **Severity Level:** Minor 🧹
   <details>
   <summary><b>Why it matters? ⭐ </b></summary>
   
   The file introduces a module-level mapping with a clear, annotatable type (`dict[str, str]`) but leaves it untyped. This matches the rule requiring type hints on relevant variables in new or modified Python code.
   </details>
   <details>
   <summary><b>Rule source πŸ“– </b></summary>
   
   .cursor/rules/dev-standard.mdc (line 28)
   </details>
   
   [![Fix in Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=4c73a05eb18c4af3836c399f271ab108&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [![Fix in VSCode Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=4c73a05eb18c4af3836c399f271ab108&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent πŸ€– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py
   **Line:** 33:39
   **Comment:**
   	*Custom Rule: Add an explicit type annotation for this module-level mapping to comply with the requirement to type-hint relevant variables.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41922&comment_hash=b567d475729e71d783e7766238262b53a67ce54d4479e5d67d4d041c2bc61faf&reaction=like'>πŸ‘</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41922&comment_hash=b567d475729e71d783e7766238262b53a67ce54d4479e5d67d4d041c2bc61faf&reaction=dislike'>πŸ‘Ž</a>



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #41922:
URL: https://github.com/apache/superset/pull/41922#discussion_r3561825595


##########
superset/mcp_service/chart/tool/get_chart_type_schema.py:
##########
@@ -172,6 +172,7 @@ def _get_chart_type_schema_impl(
 
 @tool(
     tags=["discovery"],
+    class_permission_name="Chart",
     annotations=ToolAnnotations(

Review Comment:
   Adding `class_permission_name="Chart"` changes runtime authorization when `MCP_RBAC_ENABLED` is on: previously this tool would "fail open" (authenticated but no RBAC check), now it will require Chart read permission. That’s likely correct, but it contradicts the PR description claim of "No tool behavior changes" (this can affect who can call/see the tool).



##########
superset/mcp_service/app.py:
##########
@@ -176,15 +176,23 @@ def get_default_instructions(
 - create_virtual_dataset: Save a SQL query as a virtual dataset for charting (requires write access)
 - query_dataset: Query a dataset using its semantic layer (saved metrics, dimensions, filters) without needing a saved chart
 
+Semantic Layer:
+- list_metrics: Discover metrics across built-in datasets and external semantic views (1-based pagination)
+- get_table: Query a data source (built-in dataset or external semantic view) by metric/dimension names
+- get_compatible_dimensions: Get dimensions compatible with a given metric/dimension selection
+- get_compatible_metrics: Get metrics compatible with a given dimension/metric selection
+
 Chart Management:
 - list_charts: List charts with advanced filters (1-based pagination)
 - get_chart_info: Get detailed chart information by ID
 - get_chart_preview: Get a visual preview of a chart as formatted content or URL
 - get_chart_data: Get underlying chart data in text-friendly format
 - get_chart_sql: Get the rendered SQL query for a chart (without executing it)
+- get_chart_type_schema: Get the JSON Schema and examples for a chart_type before calling generate_chart/update_chart
 - generate_chart: Create and save a new chart permanently (requires write access)

Review Comment:
   The DEFAULT_INSTRUCTIONS tool list says `generate_chart` "Create and save a new chart permanently", but `generate_chart` defaults to `save_chart=False` (preview-only) and only persists when explicitly requested. This description can mislead clients/LLMs into claiming a chart was saved when it wasn’t.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41922:
URL: https://github.com/apache/superset/pull/41922#issuecomment-4975703564

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers a full AI review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #41922:
URL: https://github.com/apache/superset/pull/41922#issuecomment-4931998734

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/41922?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 64.08%. Comparing base ([`0ff52d4`](https://app.codecov.io/gh/apache/superset/commit/0ff52d46e076cd02e45bd776e0387c138055343a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`e6cfab7`](https://app.codecov.io/gh/apache/superset/commit/e6cfab75cabae4f7e37eccf88847f0dfe31a9a60?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #41922      +/-   ##
   ==========================================
   - Coverage   64.74%   64.08%   -0.67%     
   ==========================================
     Files        2738     2738              
     Lines      152950   152950              
     Branches    35055    35055              
   ==========================================
   - Hits        99032    98017    -1015     
   - Misses      52018    53021    +1003     
   - Partials     1900     1912      +12     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/41922/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Ξ” | |
   |---|---|---|
   | [hive](https://app.codecov.io/gh/apache/superset/pull/41922/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.99% <ΓΈ> (ΓΈ)` | |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/41922/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.93% <ΓΈ> (ΓΈ)` | |
   | [postgres](https://app.codecov.io/gh/apache/superset/pull/41922/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [presto](https://app.codecov.io/gh/apache/superset/pull/41922/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.95% <ΓΈ> (ΓΈ)` | |
   | [python](https://app.codecov.io/gh/apache/superset/pull/41922/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `58.03% <ΓΈ> (-1.35%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/41922/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [unit](https://app.codecov.io/gh/apache/superset/pull/41922/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/41922?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41922:
URL: https://github.com/apache/superset/pull/41922#issuecomment-4976834592

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers a full AI review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #41922:
URL: https://github.com/apache/superset/pull/41922#discussion_r3589106385


##########
superset/mcp_service/app.py:
##########
@@ -216,6 +224,10 @@ def get_default_instructions(
 Available Resources:
 - instance://metadata: Instance configuration, stats, and available dataset IDs
 - chart://configs: Valid chart configuration examples and best practices
+- superset://schema/chart: Filterable/sortable/select columns for the chart model
+- superset://schema/dataset: Filterable/sortable/select columns for the dataset model
+- superset://schema/dashboard: Filterable/sortable/select columns for the dashboard model
+- superset://schema/all: Combined schema metadata for chart, dataset, and dashboard

Review Comment:
   <!-- Bito Reply -->
   The suggestion to add unit tests for the schema discovery resources is appropriate and has been addressed by the implementation of the requested tests in `tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py`. Since the suggestion correctly identified a missing testing requirement for the new functionality, it is not necessary to avoid such suggestions in the future.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #41922:
URL: https://github.com/apache/superset/pull/41922#issuecomment-5005143583

   ### <span aria-hidden="true">βœ…</span> Deploy Preview for *superset-docs-preview* ready!
   
   
   |  Name | Link |
   |:-:|------------------------|
   |<span aria-hidden="true">πŸ”¨</span> Latest commit | d3dfbda1c0cc8e8acba1302b9c07757c2b9469f0 |
   |<span aria-hidden="true">πŸ”</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a5a5281120951000844e5cb |
   |<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-41922--superset-docs-preview.netlify.app](https://deploy-preview-41922--superset-docs-preview.netlify.app) |
   |<span aria-hidden="true">πŸ“±</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br />![QR Code](https://app.netlify.com/qr-code/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTQxOTIyLS1zdXBlcnNldC1kb2NzLXByZXZpZXcubmV0bGlmeS5hcHAifQ.8NySvQsWSJUl4xZJrlwsJFe4JgI-r6GXRhN3ADKkWCI)<br /><br />_Use your smartphone camera to open QR code link._</details> |
   |<span aria-hidden="true">πŸ€–</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#q1YqKMrPLShRslJS0lFKKkrMS84AsnOTC3RL8vNzdJPz84ozi0tS85IrgfIpqQU5-ZWeKUAVZommiaZGFoaGRgaWpoYGBgYWJiappslJSrUA) |
   ---
   <!-- [superset-docs-preview Preview](https://deploy-preview-41922--superset-docs-preview.netlify.app) -->
   _To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #41922:
URL: https://github.com/apache/superset/pull/41922#discussion_r3604607675


##########
tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py:
##########
@@ -0,0 +1,133 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""Tests for the schema discovery MCP resources (superset://schema/*)."""
+
+from collections.abc import Iterator
+from typing import Any
+from unittest.mock import Mock, patch
+
+import pytest
+from fastmcp import Client, FastMCP
+from fastmcp.exceptions import McpError
+
+from superset.mcp_service.app import mcp
+from superset.mcp_service.system.resources.schema_discovery import (
+    _build_schema_resource,
+)
+from superset.utils import json
+
+RESOURCE_URIS = {
+    "chart": "superset://schema/chart",
+    "dataset": "superset://schema/dataset",
+    "dashboard": "superset://schema/dashboard",
+    "all": "superset://schema/all",
+}

Review Comment:
   Fixed in commit d3dfbda1c0: added `RESOURCE_URIS: dict[str, str]` annotation to the module-level mapping.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi merged PR #41922:
URL: https://github.com/apache/superset/pull/41922


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #41922:
URL: https://github.com/apache/superset/pull/41922#discussion_r3589105262


##########
superset/mcp_service/app.py:
##########
@@ -216,6 +224,10 @@ def get_default_instructions(
 Available Resources:
 - instance://metadata: Instance configuration, stats, and available dataset IDs
 - chart://configs: Valid chart configuration examples and best practices
+- superset://schema/chart: Filterable/sortable/select columns for the chart model
+- superset://schema/dataset: Filterable/sortable/select columns for the dataset model
+- superset://schema/dashboard: Filterable/sortable/select columns for the dashboard model
+- superset://schema/all: Combined schema metadata for chart, dataset, and dashboard

Review Comment:
   Added unit tests for the schema discovery resources in `tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py` (commit 0f98930c9e). Coverage includes:
   - URI/registration: all four `superset://schema/*` resources are discoverable via `list_resources`
   - Success paths: chart/dataset/dashboard resources and the combined `all` resource, asserting column metadata shape and expected default/sort/search fields
   - Error handling: reading an unregistered URI raises `McpError`, and `_build_schema_resource` returns an empty dict for an unknown model type



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #41922:
URL: https://github.com/apache/superset/pull/41922#discussion_r3589767293


##########
tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py:
##########
@@ -0,0 +1,127 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""Tests for the schema discovery MCP resources (superset://schema/*)."""
+
+from unittest.mock import Mock, patch
+
+import pytest
+from fastmcp import Client
+from fastmcp.exceptions import McpError
+
+from superset.mcp_service.app import mcp
+from superset.mcp_service.system.resources.schema_discovery import (
+    _build_schema_resource,
+)
+from superset.utils import json
+
+RESOURCE_URIS = {
+    "chart": "superset://schema/chart",
+    "dataset": "superset://schema/dataset",
+    "dashboard": "superset://schema/dashboard",
+    "all": "superset://schema/all",
+}
+
+
+@pytest.fixture
+def mcp_server():

Review Comment:
   Added `-> FastMCP` return type annotation to the `mcp_server` fixture (commit 4dba1608da).



##########
tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py:
##########
@@ -0,0 +1,127 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""Tests for the schema discovery MCP resources (superset://schema/*)."""
+
+from unittest.mock import Mock, patch
+
+import pytest
+from fastmcp import Client
+from fastmcp.exceptions import McpError
+
+from superset.mcp_service.app import mcp
+from superset.mcp_service.system.resources.schema_discovery import (
+    _build_schema_resource,
+)
+from superset.utils import json
+
+RESOURCE_URIS = {
+    "chart": "superset://schema/chart",
+    "dataset": "superset://schema/dataset",
+    "dashboard": "superset://schema/dashboard",
+    "all": "superset://schema/all",
+}
+
+
+@pytest.fixture
+def mcp_server():
+    return mcp
+
+
+@pytest.fixture(autouse=True)
+def mock_auth():

Review Comment:
   Added `-> Iterator[Mock]` return type annotation to the `mock_auth` fixture, matching the convention used elsewhere in this test suite (e.g. `test_remove_chart_from_dashboard.py`) (commit 4dba1608da).



##########
tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py:
##########
@@ -0,0 +1,127 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""Tests for the schema discovery MCP resources (superset://schema/*)."""
+
+from unittest.mock import Mock, patch
+
+import pytest
+from fastmcp import Client
+from fastmcp.exceptions import McpError
+
+from superset.mcp_service.app import mcp
+from superset.mcp_service.system.resources.schema_discovery import (
+    _build_schema_resource,
+)
+from superset.utils import json
+
+RESOURCE_URIS = {
+    "chart": "superset://schema/chart",
+    "dataset": "superset://schema/dataset",
+    "dashboard": "superset://schema/dashboard",
+    "all": "superset://schema/all",
+}
+
+
+@pytest.fixture
+def mcp_server():
+    return mcp
+
+
+@pytest.fixture(autouse=True)
+def mock_auth():
+    """Mock authentication for all tests."""
+    with patch("superset.mcp_service.auth.get_user_from_request") as mock_get_user:
+        mock_user = Mock()
+        mock_user.id = 1
+        mock_user.username = "admin"
+        mock_get_user.return_value = mock_user
+        yield mock_get_user
+
+
+async def _read_resource(mcp_server, uri):

Review Comment:
   Added `(mcp_server: FastMCP, uri: str) -> dict[str, Any]` type hints to `_read_resource` (commit 4dba1608da).



##########
tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py:
##########
@@ -0,0 +1,127 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""Tests for the schema discovery MCP resources (superset://schema/*)."""
+
+from unittest.mock import Mock, patch
+
+import pytest
+from fastmcp import Client
+from fastmcp.exceptions import McpError
+
+from superset.mcp_service.app import mcp
+from superset.mcp_service.system.resources.schema_discovery import (
+    _build_schema_resource,
+)
+from superset.utils import json
+
+RESOURCE_URIS = {
+    "chart": "superset://schema/chart",
+    "dataset": "superset://schema/dataset",
+    "dashboard": "superset://schema/dashboard",
+    "all": "superset://schema/all",
+}
+
+
+@pytest.fixture
+def mcp_server():
+    return mcp
+
+
+@pytest.fixture(autouse=True)
+def mock_auth():
+    """Mock authentication for all tests."""
+    with patch("superset.mcp_service.auth.get_user_from_request") as mock_get_user:
+        mock_user = Mock()
+        mock_user.id = 1
+        mock_user.username = "admin"
+        mock_get_user.return_value = mock_user
+        yield mock_get_user
+
+
+async def _read_resource(mcp_server, uri):
+    async with Client(mcp_server) as client:
+        result = await client.read_resource(uri)
+    return json.loads(result[0].text)
+
+
+class TestSchemaDiscoveryResourceRegistration:
+    """URI pattern matching: resources are discoverable under superset://schema/*."""
+
+    @pytest.mark.asyncio
+    async def test_all_schema_resources_registered(self, mcp_server):

Review Comment:
   Added `(self, mcp_server: FastMCP) -> None` type hints to this test method (commit 4dba1608da).



##########
tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py:
##########
@@ -0,0 +1,127 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""Tests for the schema discovery MCP resources (superset://schema/*)."""
+
+from unittest.mock import Mock, patch
+
+import pytest
+from fastmcp import Client
+from fastmcp.exceptions import McpError
+
+from superset.mcp_service.app import mcp
+from superset.mcp_service.system.resources.schema_discovery import (
+    _build_schema_resource,
+)
+from superset.utils import json
+
+RESOURCE_URIS = {
+    "chart": "superset://schema/chart",
+    "dataset": "superset://schema/dataset",
+    "dashboard": "superset://schema/dashboard",
+    "all": "superset://schema/all",
+}
+
+
+@pytest.fixture
+def mcp_server():
+    return mcp
+
+
+@pytest.fixture(autouse=True)
+def mock_auth():
+    """Mock authentication for all tests."""
+    with patch("superset.mcp_service.auth.get_user_from_request") as mock_get_user:
+        mock_user = Mock()
+        mock_user.id = 1
+        mock_user.username = "admin"
+        mock_get_user.return_value = mock_user
+        yield mock_get_user
+
+
+async def _read_resource(mcp_server, uri):
+    async with Client(mcp_server) as client:
+        result = await client.read_resource(uri)
+    return json.loads(result[0].text)
+
+
+class TestSchemaDiscoveryResourceRegistration:
+    """URI pattern matching: resources are discoverable under superset://schema/*."""
+
+    @pytest.mark.asyncio
+    async def test_all_schema_resources_registered(self, mcp_server):
+        async with Client(mcp_server) as client:
+            resources = await client.list_resources()
+
+        resource_uris = {str(resource.uri) for resource in resources}
+        for uri in RESOURCE_URIS.values():
+            assert uri in resource_uris
+
+
+class TestSchemaDiscoveryResourceSuccessPaths:
+    """Success paths for each model-specific and combined schema resource."""
+
+    @pytest.mark.asyncio
+    async def test_chart_schema_resource(self, mcp_server):

Review Comment:
   Added `(self, mcp_server: FastMCP) -> None` type hints to this test method (commit 4dba1608da).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41922:
URL: https://github.com/apache/superset/pull/41922#issuecomment-4940364358

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers a full AI review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #41922:
URL: https://github.com/apache/superset/pull/41922#discussion_r3582904236


##########
superset/mcp_service/chart/tool/get_chart_type_schema.py:
##########
@@ -172,6 +172,7 @@ def _get_chart_type_schema_impl(
 
 @tool(
     tags=["discovery"],
+    class_permission_name="Chart",
     annotations=ToolAnnotations(

Review Comment:
   Good catch, and you're right that this is a real runtime behavior change, not just metadata β€” updated the PR description to say so explicitly instead of claiming 'No tool behavior changes.'
   
   To be precise about the effect: `get_chart_type_schema` was the only one of 62 tools missing `class_permission_name`, so with `MCP_RBAC_ENABLED` it previously fail-opened (authenticated, no permission check). Adding `class_permission_name="Chart"` closes that gap and makes it require Chart read permission, consistent with every other chart-scoped tool (`get_chart_info`, `list_charts`, etc.). Since it's a pure schema-lookup tool (no dataset access), Chart read is the correct/minimal permission for it.
   
   This is an intentional fix, not an accidental behavior change β€” but you're right the PR description shouldn't have said 'no behavior changes' when this one line does change enforcement. Fixed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #41922:
URL: https://github.com/apache/superset/pull/41922#discussion_r3589116801


##########
tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py:
##########
@@ -0,0 +1,127 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""Tests for the schema discovery MCP resources (superset://schema/*)."""
+
+from unittest.mock import Mock, patch
+
+import pytest
+from fastmcp import Client
+from fastmcp.exceptions import McpError
+
+from superset.mcp_service.app import mcp
+from superset.mcp_service.system.resources.schema_discovery import (
+    _build_schema_resource,
+)
+from superset.utils import json
+
+RESOURCE_URIS = {
+    "chart": "superset://schema/chart",
+    "dataset": "superset://schema/dataset",
+    "dashboard": "superset://schema/dashboard",
+    "all": "superset://schema/all",
+}
+
+
+@pytest.fixture
+def mcp_server():

Review Comment:
   **Suggestion:** Add explicit type hints for this fixture's return type to comply with the typing requirement for new Python functions. [custom_rule]
   
   **Severity Level:** Minor 🧹
   <details>
   <summary><b>Why it matters? ⭐ </b></summary>
   
   The new fixture `mcp_server` has no return type annotation, which violates the Python type-hints rule for new or modified functions.
   </details>
   <details>
   <summary><b>Rule source πŸ“– </b></summary>
   
   .cursor/rules/dev-standard.mdc (line 28)
   </details>
   
   [![Fix in Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=23dcd231255c47f282cfa7f1a500601b&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [![Fix in VSCode Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=23dcd231255c47f282cfa7f1a500601b&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent πŸ€– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py
   **Line:** 40:41
   **Comment:**
   	*Custom Rule: Add explicit type hints for this fixture's return type to comply with the typing requirement for new Python functions.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41922&comment_hash=6c0bf0bc653afb1032cc756b43911d2f2f54b01a8f669130e45a4b905f92556a&reaction=like'>πŸ‘</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41922&comment_hash=6c0bf0bc653afb1032cc756b43911d2f2f54b01a8f669130e45a4b905f92556a&reaction=dislike'>πŸ‘Ž</a>



##########
tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py:
##########
@@ -0,0 +1,127 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""Tests for the schema discovery MCP resources (superset://schema/*)."""
+
+from unittest.mock import Mock, patch
+
+import pytest
+from fastmcp import Client
+from fastmcp.exceptions import McpError
+
+from superset.mcp_service.app import mcp
+from superset.mcp_service.system.resources.schema_discovery import (
+    _build_schema_resource,
+)
+from superset.utils import json
+
+RESOURCE_URIS = {
+    "chart": "superset://schema/chart",
+    "dataset": "superset://schema/dataset",
+    "dashboard": "superset://schema/dashboard",
+    "all": "superset://schema/all",
+}
+
+
+@pytest.fixture
+def mcp_server():
+    return mcp
+
+
+@pytest.fixture(autouse=True)
+def mock_auth():

Review Comment:
   **Suggestion:** Add a return type annotation for this fixture generator so the function signature is fully typed. [custom_rule]
   
   **Severity Level:** Minor 🧹
   <details>
   <summary><b>Why it matters? ⭐ </b></summary>
   
   The autouse fixture `mock_auth` is a generator fixture but its signature has no return type annotation, so it violates the type-hints requirement.
   </details>
   <details>
   <summary><b>Rule source πŸ“– </b></summary>
   
   .cursor/rules/dev-standard.mdc (line 28)
   </details>
   
   [![Fix in Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=47d9b9ec296a4b959bbe8ab929c9cb25&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [![Fix in VSCode Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=47d9b9ec296a4b959bbe8ab929c9cb25&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent πŸ€– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py
   **Line:** 45:46
   **Comment:**
   	*Custom Rule: Add a return type annotation for this fixture generator so the function signature is fully typed.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41922&comment_hash=b9fa3124ee0edaf48bcf8bc2fd584252ac6e05499ea2d940bf3d193ec74f5565&reaction=like'>πŸ‘</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41922&comment_hash=b9fa3124ee0edaf48bcf8bc2fd584252ac6e05499ea2d940bf3d193ec74f5565&reaction=dislike'>πŸ‘Ž</a>



##########
tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py:
##########
@@ -0,0 +1,127 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""Tests for the schema discovery MCP resources (superset://schema/*)."""
+
+from unittest.mock import Mock, patch
+
+import pytest
+from fastmcp import Client
+from fastmcp.exceptions import McpError
+
+from superset.mcp_service.app import mcp
+from superset.mcp_service.system.resources.schema_discovery import (
+    _build_schema_resource,
+)
+from superset.utils import json
+
+RESOURCE_URIS = {
+    "chart": "superset://schema/chart",
+    "dataset": "superset://schema/dataset",
+    "dashboard": "superset://schema/dashboard",
+    "all": "superset://schema/all",
+}
+
+
+@pytest.fixture
+def mcp_server():
+    return mcp
+
+
+@pytest.fixture(autouse=True)
+def mock_auth():
+    """Mock authentication for all tests."""
+    with patch("superset.mcp_service.auth.get_user_from_request") as mock_get_user:
+        mock_user = Mock()
+        mock_user.id = 1
+        mock_user.username = "admin"
+        mock_get_user.return_value = mock_user
+        yield mock_get_user
+
+
+async def _read_resource(mcp_server, uri):
+    async with Client(mcp_server) as client:
+        result = await client.read_resource(uri)
+    return json.loads(result[0].text)
+
+
+class TestSchemaDiscoveryResourceRegistration:
+    """URI pattern matching: resources are discoverable under superset://schema/*."""
+
+    @pytest.mark.asyncio
+    async def test_all_schema_resources_registered(self, mcp_server):
+        async with Client(mcp_server) as client:
+            resources = await client.list_resources()
+
+        resource_uris = {str(resource.uri) for resource in resources}
+        for uri in RESOURCE_URIS.values():
+            assert uri in resource_uris
+
+
+class TestSchemaDiscoveryResourceSuccessPaths:
+    """Success paths for each model-specific and combined schema resource."""
+
+    @pytest.mark.asyncio
+    async def test_chart_schema_resource(self, mcp_server):

Review Comment:
   **Suggestion:** Add explicit annotations for this async test method signature, including fixture parameter type and return type. [custom_rule]
   
   **Severity Level:** Minor 🧹
   <details>
   <summary><b>Why it matters? ⭐ </b></summary>
   
   This new async test method has no type annotations on the fixture parameter or return type, so it violates the Python type-hints requirement.
   </details>
   <details>
   <summary><b>Rule source πŸ“– </b></summary>
   
   .cursor/rules/dev-standard.mdc (line 28)
   </details>
   
   [![Fix in Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=f4f39b7b308c4e1a81bc13cc2e287114&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [![Fix in VSCode Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=f4f39b7b308c4e1a81bc13cc2e287114&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent πŸ€– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py
   **Line:** 78:79
   **Comment:**
   	*Custom Rule: Add explicit annotations for this async test method signature, including fixture parameter type and return type.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41922&comment_hash=747b1901e552504d4db6b96feeb8bf929b99c9e744030af048f6dae71bd062c6&reaction=like'>πŸ‘</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41922&comment_hash=747b1901e552504d4db6b96feeb8bf929b99c9e744030af048f6dae71bd062c6&reaction=dislike'>πŸ‘Ž</a>



##########
tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py:
##########
@@ -0,0 +1,127 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""Tests for the schema discovery MCP resources (superset://schema/*)."""
+
+from unittest.mock import Mock, patch
+
+import pytest
+from fastmcp import Client
+from fastmcp.exceptions import McpError
+
+from superset.mcp_service.app import mcp
+from superset.mcp_service.system.resources.schema_discovery import (
+    _build_schema_resource,
+)
+from superset.utils import json
+
+RESOURCE_URIS = {
+    "chart": "superset://schema/chart",
+    "dataset": "superset://schema/dataset",
+    "dashboard": "superset://schema/dashboard",
+    "all": "superset://schema/all",
+}
+
+
+@pytest.fixture
+def mcp_server():
+    return mcp
+
+
+@pytest.fixture(autouse=True)
+def mock_auth():
+    """Mock authentication for all tests."""
+    with patch("superset.mcp_service.auth.get_user_from_request") as mock_get_user:
+        mock_user = Mock()
+        mock_user.id = 1
+        mock_user.username = "admin"
+        mock_get_user.return_value = mock_user
+        yield mock_get_user
+
+
+async def _read_resource(mcp_server, uri):

Review Comment:
   **Suggestion:** Add parameter and return type hints to this async helper function, including the server and URI inputs and parsed JSON output. [custom_rule]
   
   **Severity Level:** Minor 🧹
   <details>
   <summary><b>Why it matters? ⭐ </b></summary>
   
   The async helper `_read_resource` omits parameter and return type hints even though they are straightforwardly annotatable, so this is a real violation.
   </details>
   <details>
   <summary><b>Rule source πŸ“– </b></summary>
   
   .cursor/rules/dev-standard.mdc (line 28)
   </details>
   
   [![Fix in Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=7f5d7dcdbd4d49f9a32a90bb46a0af41&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [![Fix in VSCode Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=7f5d7dcdbd4d49f9a32a90bb46a0af41&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent πŸ€– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py
   **Line:** 56:56
   **Comment:**
   	*Custom Rule: Add parameter and return type hints to this async helper function, including the server and URI inputs and parsed JSON output.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41922&comment_hash=ddc45d8b84f56fe3da7ddaf31e1f777153bc6e051e950b82aa92a8f2c8bcca1e&reaction=like'>πŸ‘</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41922&comment_hash=ddc45d8b84f56fe3da7ddaf31e1f777153bc6e051e950b82aa92a8f2c8bcca1e&reaction=dislike'>πŸ‘Ž</a>



##########
tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py:
##########
@@ -0,0 +1,127 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""Tests for the schema discovery MCP resources (superset://schema/*)."""
+
+from unittest.mock import Mock, patch
+
+import pytest
+from fastmcp import Client
+from fastmcp.exceptions import McpError
+
+from superset.mcp_service.app import mcp
+from superset.mcp_service.system.resources.schema_discovery import (
+    _build_schema_resource,
+)
+from superset.utils import json
+
+RESOURCE_URIS = {
+    "chart": "superset://schema/chart",
+    "dataset": "superset://schema/dataset",
+    "dashboard": "superset://schema/dashboard",
+    "all": "superset://schema/all",
+}
+
+
+@pytest.fixture
+def mcp_server():
+    return mcp
+
+
+@pytest.fixture(autouse=True)
+def mock_auth():
+    """Mock authentication for all tests."""
+    with patch("superset.mcp_service.auth.get_user_from_request") as mock_get_user:
+        mock_user = Mock()
+        mock_user.id = 1
+        mock_user.username = "admin"
+        mock_get_user.return_value = mock_user
+        yield mock_get_user
+
+
+async def _read_resource(mcp_server, uri):
+    async with Client(mcp_server) as client:
+        result = await client.read_resource(uri)
+    return json.loads(result[0].text)
+
+
+class TestSchemaDiscoveryResourceRegistration:
+    """URI pattern matching: resources are discoverable under superset://schema/*."""
+
+    @pytest.mark.asyncio
+    async def test_all_schema_resources_registered(self, mcp_server):

Review Comment:
   **Suggestion:** Add type hints for this async test method parameters and annotate the return type to satisfy the mandatory typing rule. [custom_rule]
   
   **Severity Level:** Minor 🧹
   <details>
   <summary><b>Why it matters? ⭐ </b></summary>
   
   The async test method omits type hints for its fixture parameter and return type, which violates the stated typing rule for new Python code.
   </details>
   <details>
   <summary><b>Rule source πŸ“– </b></summary>
   
   .cursor/rules/dev-standard.mdc (line 28)
   </details>
   
   [![Fix in Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=51d09026690942fbbceb9ee7a013b605&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [![Fix in VSCode Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=51d09026690942fbbceb9ee7a013b605&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent πŸ€– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** tests/unit_tests/mcp_service/system/resources/test_schema_discovery.py
   **Line:** 65:66
   **Comment:**
   	*Custom Rule: Add type hints for this async test method parameters and annotate the return type to satisfy the mandatory typing rule.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41922&comment_hash=32dc2a00a81add7b0f2888144f421351f317b98957431560350261086dce8dbf&reaction=like'>πŸ‘</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41922&comment_hash=32dc2a00a81add7b0f2888144f421351f317b98957431560350261086dce8dbf&reaction=dislike'>πŸ‘Ž</a>



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41922:
URL: https://github.com/apache/superset/pull/41922#issuecomment-4931930377

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41922:
URL: https://github.com/apache/superset/pull/41922#issuecomment-5006668120

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers a full AI review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org