aminghadersohi commented on PR #40124:
URL: https://github.com/apache/superset/pull/40124#issuecomment-4546969568

   @richardfogaca Thanks for the notes — here's my take on each.
   
   **Suggestion 1 — `sanitize_for_llm_context` on the tab-not-found error**
   
   Skipping this. The error is returned as a structured MCP tool result, not 
embedded into a system prompt or instruction block. The MCP protocol delivers 
tool results as isolated `tool_result` content blocks; the model receives it as 
structured output, not as something that gets concatenated into its 
instructional context. The `DashboardError.error` validator applies 
`sanitize_for_llm_context` for read-path operations that surface large volumes 
of dashboard-owned text — that threat model doesn't apply here. The 
tab-not-found error is a short diagnostic with a bounded, controlled format; 
the tab labels appear inside a `Label (TAB-id)` enumeration, not free-form. 
Adding the wrapping would make the error message less readable for the common 
case without meaningful security benefit.
   
   **Suggestion 2 — include component ID in the available-tab list**
   
   Done — `_collect_available_tab_names` now returns `Label (TAB-id)` entries 
so callers can always use the component ID to retry unambiguously regardless of 
duplicate names or blank labels. Also dropped the single-quote wrapping from 
the join since each entry is already self-describing. Added 
`test_collect_available_tab_names_duplicate_names` as a regression test, 
updated the existing display-names test, and added component-ID assertions to 
`test_add_chart_target_tab_not_found`. (commit `bce85f8fa1`)


-- 
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]

Reply via email to