goingforstudying-ctrl commented on code in PR #40746:
URL: https://github.com/apache/superset/pull/40746#discussion_r3399817673
##########
superset/mcp_service/user/schemas.py:
##########
@@ -278,7 +306,7 @@ def serialize_user_object(
user_roles = getattr(user, "roles", None)
if user_roles is not None:
try:
- roles = [r.name for r in user_roles if hasattr(r, "name")]
+ roles = [sanitize_for_llm_context(r.name,
field_path=("roles",)) for r in user_roles if hasattr(r, "name") and
isinstance(r.name, str)]
Review Comment:
Good catch. Role names are operational identifiers like username and email,
so escape_llm_context_delimiters fits better here — it escapes the delimiter
tokens without wrapping the string content. Switched to that in the latest push.
--
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]