codeant-ai-for-open-source[bot] commented on code in PR #45828:
URL: https://github.com/apache/superset/pull/45828#discussion_r4434235064


##########
superset/mcp_service/chart/chart_helpers.py:
##########
@@ -1165,6 +1187,36 @@ def coerce_enum_values(value: Any) -> Any:
     return value
 
 
+def _query_semantic_selection_version(
+    form_data: dict[str, Any], extra_form_data: dict[str, Any] | None
+) -> str | None:
+    """Mirror Explore's version transport without certifying external 
selections."""
+    version: object = form_data.get("semantic_selection_version")
+    if not isinstance(version, str):
+        return None
+    unverified: str = "unverified-external-selections"
+    sources: list[Any] = list(form_data.get("semantic_selection_sources") or 
[])
+    extra: dict[str, Any]
+    for extra in (form_data.get("extra_form_data") or {}, extra_form_data or 
{}):
+        if extra.get("semantic_selection_sources"):
+            sources.extend(extra["semantic_selection_sources"])
+        elif any(extra.get(key) for key in SEMANTIC_SELECTION_MEMBER_KEYS):
+            return unverified

Review Comment:
   ✅ **Customized review instruction saved!**
   
   **Instruction:**
   > Do not flag caller-supplied semantic selection versions or source records 
as a trust-boundary issue when they describe only the caller's own request 
selections; the chart-data API and Explore already accept these records.
   
   **Applied to:**
     - `superset/mcp_service/chart/chart_helpers.py`
   
   ---
   💡 *To manage or update this instruction, visit: [CodeAnt AI 
Settings](https://app.codeant.ai/org/settings/learnings)*



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

  • [PR] fix(mc... via GitHub
    • Re: [P... via GitHub
    • Re: [P... via GitHub
    • Re: [P... aminghadersohi (via GitHub) via notifications
    • Re: [P... mikebridge (via GitHub) via notifications
    • Re: [P... aminghadersohi (via GitHub) via notifications
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications

Reply via email to