codeant-ai-for-open-source[bot] commented on code in PR #43349:
URL: https://github.com/apache/superset/pull/43349#discussion_r3817435042
##########
superset/mcp_service/chart/tool/get_chart_data.py:
##########
@@ -1117,7 +1126,7 @@ async def _query_from_form_data(
)
cache_status = get_cache_status_from_result(
- query_result, force_refresh=request.force_refresh
+ query_result, force_refresh=effective_force
)
Review Comment:
**Suggestion:** The `refreshed` response field is documented and implemented
as indicating a force refresh, but passing `effective_force` makes every
`use_cache=False, force_refresh=False` request report `refreshed=True`. This
conflates cache bypassing with an explicit refresh and produces an incorrect
cache status for callers; pass the original `request.force_refresh` when
constructing response metadata while retaining `effective_force` for query
execution. [cache]
<details>
<summary><b>Severity Level:</b> Minor ๐งน</summary>
```mdx
- โ ๏ธ `ChartData.cache_status.refreshed` misrepresents cache-bypass requests.
- โ ๏ธ MCP clients cannot distinguish bypassing cache from explicit refresh.
- โ ๏ธ Saved and unsaved chart responses expose inconsistent request semantics.
```
</details>
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
<details>
<summary><b>Prompt for AI Agent ๐ค </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset/mcp_service/chart/tool/get_chart_data.py
**Line:** 1128:1130
**Comment:**
*Cache: The `refreshed` response field is documented and implemented as
indicating a force refresh, but passing `effective_force` makes every
`use_cache=False, force_refresh=False` request report `refreshed=True`. This
conflates cache bypassing with an explicit refresh and produces an incorrect
cache status for callers; pass the original `request.force_refresh` when
constructing response metadata while retaining `effective_force` for query
execution.
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%2F43349&comment_hash=300419b5a9059a4c0b4f883a7769e50c49ae9ecbaecdc16f189dde06c13ab27a&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43349&comment_hash=300419b5a9059a4c0b4f883a7769e50c49ae9ecbaecdc16f189dde06c13ab27a&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]