codeant-ai-for-open-source[bot] commented on code in PR #43571:
URL: https://github.com/apache/superset/pull/43571#discussion_r3871282883
##########
superset/mcp_service/chart/schemas.py:
##########
@@ -1045,6 +1045,57 @@ def reject_sql_expression_on_dimensions(self) ->
"PieChartConfig":
return self
+class RadarChartConfig(BaseChartConfig):
+ """Config for radar charts (viz_type ``radar``).
+
+ Matches the frontend Radar buildQuery contract: multiple ``metrics``
+ become the radar axes (indicators), and an optional ``groupby`` splits the
+ data into one polygon per category. With no groupby the whole dataset is a
+ single polygon. The query orders by the first metric descending.
+ """
+
+ model_config = ConfigDict(extra="ignore", populate_by_name=True)
+
+ chart_type: Literal["radar"] = "radar"
+ metrics: List[ColumnRef] = Field(
+ ...,
+ min_length=1,
Review Comment:
**Suggestion:** The schema accepts a single metric, even though the radar
plugin describes radar charts as requiring two or more axes. This allows a
one-axis configuration to pass validation and reach chart generation as a
degenerate radar; enforce the same minimum metric count in the schema and
plugin contract. [api mismatch]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ❌ MCP can generate degenerate one-axis radar charts.
- ⚠️ Radar requests contradict the plugin’s documented two-axis contract.
- ⚠️ Users receive an unusable visualization instead of validation guidance.
```
</details>
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=1d2488816e5a4cedb1dbb000dfa8015e&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=1d2488816e5a4cedb1dbb000dfa8015e&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/schemas.py
**Line:** 1060:1062
**Comment:**
*Api Mismatch: The schema accepts a single metric, even though the
radar plugin describes radar charts as requiring two or more axes. This allows
a one-axis configuration to pass validation and reach chart generation as a
degenerate radar; enforce the same minimum metric count in the schema and
plugin contract.
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%2F43571&comment_hash=e0af2b25d0506310efece4f1899e143e3e17d929be59a71f83fd22e0c9e97d65&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43571&comment_hash=e0af2b25d0506310efece4f1899e143e3e17d929be59a71f83fd22e0c9e97d65&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]