codeant-ai-for-open-source[bot] commented on code in PR #42895: URL: https://github.com/apache/superset/pull/42895#discussion_r3761956756
########## superset/mcp_service/chart/prompts/create_chart_guided.py: ########## @@ -137,7 +137,9 @@ async def create_chart_guided_prompt( - If the chart type doesn't suit the data, try a different kind ## Available Aggregations -SUM, COUNT, AVG, MIN, MAX, COUNT_DISTINCT, STDDEV, VAR, MEDIAN +SUM, COUNT, AVG, MIN, MAX, COUNT_DISTINCT, STDDEV_SAMP, VAR_SAMP, MEDIAN +(support for STDDEV_SAMP/VAR_SAMP/MEDIAN depends on the connected database; +an unsupported choice returns a clear error naming the aggregate and database) Review Comment: **Suggestion:** The prompt claims unsupported aggregates return an error naming both the aggregate and the database, but the actual validation error only says “The MEDIAN aggregate is not supported on this database” and does not identify the connected database or engine. This gives the model a stronger diagnostic contract than the implementation provides; either include the backend name in the error or remove that claim from the prompt. [api mismatch] <details> <summary><b>Severity Level:</b> Minor 🧹</summary> ```mdx - ⚠️ MCP chart guidance promises backend-specific diagnostics. - ⚠️ Models cannot identify which database lacks support. - ⚠️ Troubleshooting unsupported aggregates requires separate dataset inspection. ``` </details> [](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=cc1c67ce2c6849e882c390af7bf97975&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=cc1c67ce2c6849e882c390af7bf97975&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) <details> <summary><b>Prompt for AI Agent 🤖 </b></summary> ```mdx This is a comment left during a code review. **Path:** superset/mcp_service/chart/prompts/create_chart_guided.py **Line:** 141:142 **Comment:** *Api Mismatch: The prompt claims unsupported aggregates return an error naming both the aggregate and the database, but the actual validation error only says “The MEDIAN aggregate is not supported on this database” and does not identify the connected database or engine. This gives the model a stronger diagnostic contract than the implementation provides; either include the backend name in the error or remove that claim from the prompt. 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%2F42895&comment_hash=45d2d08f017d868145f6c839d746aefe912e20a8d0291ee0d1905a464bba36ac&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42895&comment_hash=45d2d08f017d868145f6c839d746aefe912e20a8d0291ee0d1905a464bba36ac&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: [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]
