codeant-ai-for-open-source[bot] commented on code in PR #43840:
URL: https://github.com/apache/superset/pull/43840#discussion_r3929811200
##########
superset/config.py:
##########
@@ -539,7 +539,13 @@ class D3TimeFormat(TypedDict, total=False):
# - stable: Production-ready, tested and supported
# - deprecated: Will be removed in a future major release
-DEFAULT_FEATURE_FLAGS: dict[str, bool] = {
+DEFAULT_# Whether this process registers the MCP host tools at startup. Only
processes
Review Comment:
**Suggestion:** The bare `DEFAULT_` expression is evaluated while importing
the default configuration, raising `NameError` and preventing every Superset
process from starting. [import error]
**Assessment:** ๐ด `Critical` ยท ๐ `Occurrence: Often`
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=422eacbbf4ef42058b540d17d80f7f9a&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=422eacbbf4ef42058b540d17d80f7f9a&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/config.py
**Line:** 542:542
**Comment:**
*Import Error: The bare `DEFAULT_` expression is evaluated while
importing the default configuration, raising `NameError` and preventing every
Superset process from starting.
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%2F43840&comment_hash=65bca701592fa5e23a9ad5a556fd58ea0c514aeee54a4ff74cc4cf5064f6d76b&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43840&comment_hash=65bca701592fa5e23a9ad5a556fd58ea0c514aeee54a4ff74cc4cf5064f6d76b&reaction=dislike'>๐</a>
##########
superset/initialization/__init__.py:
##########
@@ -558,7 +558,12 @@ def init_core_dependencies(self) -> None:
)
initialize_core_api_dependencies()
- initialize_core_mcp_dependencies()
+ # MCP host tools only need to be registered in processes that serve MCP
+ # (the web app and the standalone MCP service). Deployments can disable
+ # this in processes that never serve MCP -- e.g. Celery workers -- to
+ # avoid importing the MCP stack where it is unused.
+ if self.config.get("CORE_MCP_HOST_TOOLS_ENABLED", True):
Review Comment:
**Suggestion:** When this flag is false, MCP decorators remain abstract and
raise `NotImplementedError`, so extensions defining MCP tools or prompts fail
during eager import and are skipped. [incomplete implementation]
**Assessment:** ๐ `Major` ยท ๐ `Occurrence: Sometimes`
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=8eba55a2a7784afe9d7493b687047a81&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=8eba55a2a7784afe9d7493b687047a81&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/initialization/__init__.py
**Line:** 565:565
**Comment:**
*Incomplete Implementation: When this flag is false, MCP decorators
remain abstract and raise `NotImplementedError`, so extensions defining MCP
tools or prompts fail during eager import and are skipped.
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%2F43840&comment_hash=fd99d86e7d11f354025ae2b9f7fe8ef3b94ba1842e8811aa9431379d672d9652&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43840&comment_hash=fd99d86e7d11f354025ae2b9f7fe8ef3b94ba1842e8811aa9431379d672d9652&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]