codeant-ai-for-open-source[bot] commented on code in PR #39469:
URL: https://github.com/apache/superset/pull/39469#discussion_r3460090347


##########
tests/integration_tests/users/api_tests.py:
##########
@@ -100,6 +115,216 @@ def test_update_me_empty_payload(self):
         rv = self.client.put("/api/v1/me/", json={})
         assert rv.status_code == 400
 
+    def test_update_me_rejects_password_when_auth_db(self) -> None:
+        self.login(ADMIN_USERNAME)
+        rv = self.client.put(meUri, json={"password": "ignored"})
+        assert rv.status_code == 400
+        data = json.loads(rv.data.decode("utf-8"))
+        assert "AUTH_TYPE is AUTH_DB" in data["message"]
+
+    def test_put_my_password_wrong_current(self) -> None:

Review Comment:
   **Suggestion:** Add a docstring describing the wrong-current-password 
scenario and expected API response. [custom_rule]
   
   **Severity Level:** Minor ⚠️
   <details>
   <summary><b>Why it matters? 🤔 </b></summary>
   
   This newly added method has no docstring.
   Since the rule requires docstrings on newly added Python functions and 
classes, the suggestion is valid and verified.
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=1e33659c5a9743bd894fd74c8c7238b4&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=1e33659c5a9743bd894fd74c8c7238b4&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** tests/integration_tests/users/api_tests.py
   **Line:** 125:125
   **Comment:**
        *Custom Rule: Add a docstring describing the wrong-current-password 
scenario and expected API response.
   
   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%2F39469&comment_hash=d232012f1d8648a1c562c41bffd158cff04a76d2d12d5b305a53a76c0fc8e665&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39469&comment_hash=d232012f1d8648a1c562c41bffd158cff04a76d2d12d5b305a53a76c0fc8e665&reaction=dislike'>👎</a>



##########
superset/views/users/api.py:
##########
@@ -14,47 +14,163 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+from __future__ import annotations
+
+import functools
+import logging
 from datetime import datetime
-from typing import Any, Dict
+from typing import Any, Callable, Dict
 
-from flask import current_app as app, g, redirect, request, Response
+from flask import current_app as app, g, redirect, request, Response, session
 from flask_appbuilder.api import expose, permission_name, safe
+from flask_appbuilder.const import AUTH_DB
 from flask_appbuilder.security.decorators import protect
 from flask_appbuilder.security.sqla.models import User
+from flask_login import login_user
 from marshmallow import ValidationError
+from sqlalchemy.exc import SQLAlchemyError
 from sqlalchemy.orm.exc import NoResultFound
-from werkzeug.security import generate_password_hash
 
 from superset import is_feature_enabled
 from superset.daos.user import UserDAO
-from superset.extensions import db, event_logger
+from superset.extensions import db, event_logger, security_manager
+from superset.utils.auth_db_password import (
+    get_auth_db_login_rate_limit_string,
+    get_public_auth_db_password_policy,
+    validate_auth_db_password,
+)
+from superset.utils.auth_db_password_hash import (
+    hash_auth_db_password,
+    verify_auth_db_password,
+)
+from superset.utils.auth_session_stamp import (
+    bump_user_session_auth_stamp,
+    clear_flask_login_remember_cookie,
+)
 from superset.utils.slack import get_user_avatar, SlackClientError
 from superset.views.base_api import BaseSupersetApi, requires_json, 
statsd_metrics
-from superset.views.users.schemas import CurrentUserPutSchema, 
UserResponseSchema
+from superset.views.users.schemas import (
+    CurrentUserPasswordPutSchema,
+    CurrentUserPutSchema,
+    UserResponseSchema,
+)
 from superset.views.utils import bootstrap_user_data
 
+logger = logging.getLogger(__name__)
+
 user_response_schema = UserResponseSchema()
 
 
+def _get_client_ip() -> str | None:
+    """Return best-effort client IP from request context."""
+    if request.access_route:
+        return request.access_route[0]
+    return request.remote_addr
+
+
+def _me_password_rate_limit_key() -> str:
+    uid = getattr(getattr(g, "user", None), "id", None)
+    if uid is not None:
+        return f"me_password_uid:{uid}"
+    return _get_client_ip() or "unknown"

Review Comment:
   **Suggestion:** Add an inline docstring to this newly introduced helper 
function to document what key it generates and when it falls back to client IP. 
[custom_rule]
   
   **Severity Level:** Minor ⚠️
   <details>
   <summary><b>Why it matters? 🤔 </b></summary>
   
   This is a newly introduced Python function and it has no docstring in the 
final file state.
   The custom rule requires new functions and classes to be documented inline, 
so this is a real violation.
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=3ff516ab49de4c8aa046ff5a3ba3f401&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=3ff516ab49de4c8aa046ff5a3ba3f401&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset/views/users/api.py
   **Line:** 71:75
   **Comment:**
        *Custom Rule: Add an inline docstring to this newly introduced helper 
function to document what key it generates and when it falls back to client IP.
   
   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%2F39469&comment_hash=ff09fa8120b17e92561b658809d455a066ffa604ee49415546a26923f0f7b4d5&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39469&comment_hash=ff09fa8120b17e92561b658809d455a066ffa604ee49415546a26923f0f7b4d5&reaction=dislike'>👎</a>



##########
tests/integration_tests/users/api_tests.py:
##########
@@ -100,6 +115,216 @@ def test_update_me_empty_payload(self):
         rv = self.client.put("/api/v1/me/", json={})
         assert rv.status_code == 400
 
+    def test_update_me_rejects_password_when_auth_db(self) -> None:
+        self.login(ADMIN_USERNAME)
+        rv = self.client.put(meUri, json={"password": "ignored"})
+        assert rv.status_code == 400
+        data = json.loads(rv.data.decode("utf-8"))
+        assert "AUTH_TYPE is AUTH_DB" in data["message"]
+
+    def test_put_my_password_wrong_current(self) -> None:
+        self.login(ADMIN_USERNAME)
+        rv = self.client.put(
+            mePasswordUri,
+            json={
+                "current_password": "not-the-admin-password",
+                "new_password": "AnotherStr0ng!Pass",
+                "confirm_password": "AnotherStr0ng!Pass",
+            },
+        )
+        assert rv.status_code == 400
+        data = json.loads(rv.data.decode("utf-8"))
+        assert data["message"] == "Incorrect current password."
+
+    def test_put_my_password_weak_new(self) -> None:

Review Comment:
   **Suggestion:** Add an inline docstring to explain that this test verifies 
weak password validation failure. [custom_rule]
   
   **Severity Level:** Minor ⚠️
   <details>
   <summary><b>Why it matters? 🤔 </b></summary>
   
   The method is newly added and lacks a docstring.
   This matches the stated rule for documenting new Python functions, so the 
suggestion is verified.
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=6edf0bd1d30348bf86a23224479e1720&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=6edf0bd1d30348bf86a23224479e1720&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** tests/integration_tests/users/api_tests.py
   **Line:** 139:139
   **Comment:**
        *Custom Rule: Add an inline docstring to explain that this test 
verifies weak password validation failure.
   
   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%2F39469&comment_hash=c53bdc23e01f84e78d08514ac55598b71e5361f14881dd153268f35752c166e5&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39469&comment_hash=c53bdc23e01f84e78d08514ac55598b71e5361f14881dd153268f35752c166e5&reaction=dislike'>👎</a>



##########
tests/integration_tests/users/api_tests.py:
##########
@@ -100,6 +115,216 @@ def test_update_me_empty_payload(self):
         rv = self.client.put("/api/v1/me/", json={})
         assert rv.status_code == 400
 
+    def test_update_me_rejects_password_when_auth_db(self) -> None:
+        self.login(ADMIN_USERNAME)
+        rv = self.client.put(meUri, json={"password": "ignored"})
+        assert rv.status_code == 400
+        data = json.loads(rv.data.decode("utf-8"))
+        assert "AUTH_TYPE is AUTH_DB" in data["message"]
+
+    def test_put_my_password_wrong_current(self) -> None:
+        self.login(ADMIN_USERNAME)
+        rv = self.client.put(
+            mePasswordUri,
+            json={
+                "current_password": "not-the-admin-password",
+                "new_password": "AnotherStr0ng!Pass",
+                "confirm_password": "AnotherStr0ng!Pass",
+            },
+        )
+        assert rv.status_code == 400
+        data = json.loads(rv.data.decode("utf-8"))
+        assert data["message"] == "Incorrect current password."
+
+    def test_put_my_password_weak_new(self) -> None:
+        self.login(ADMIN_USERNAME)
+        rv = self.client.put(
+            mePasswordUri,
+            json={
+                "current_password": DEFAULT_PASSWORD,
+                "new_password": "short",
+                "confirm_password": "short",
+            },
+        )
+        assert rv.status_code == 400
+        data = json.loads(rv.data.decode("utf-8"))
+        assert "new_password" in data["message"]
+
+    def test_put_my_password_success(self) -> None:

Review Comment:
   **Suggestion:** Add a concise docstring stating that this test covers the 
successful password change flow. [custom_rule]
   
   **Severity Level:** Minor ⚠️
   <details>
   <summary><b>Why it matters? 🤔 </b></summary>
   
   This is a newly added test method with no inline docstring present.
   The custom rule requires new Python functions/classes to be documented, so 
this is a real violation.
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=e4beb5464ee74d948ee1e8895b13ce0d&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=e4beb5464ee74d948ee1e8895b13ce0d&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** tests/integration_tests/users/api_tests.py
   **Line:** 153:153
   **Comment:**
        *Custom Rule: Add a concise docstring stating that this test covers the 
successful password change flow.
   
   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%2F39469&comment_hash=619449da443ad6652b7faa8b419866eb17b3f11c7e322f2832755e7ac414268e&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39469&comment_hash=619449da443ad6652b7faa8b419866eb17b3f11c7e322f2832755e7ac414268e&reaction=dislike'>👎</a>



##########
tests/integration_tests/users/api_tests.py:
##########
@@ -100,6 +115,216 @@ def test_update_me_empty_payload(self):
         rv = self.client.put("/api/v1/me/", json={})
         assert rv.status_code == 400
 
+    def test_update_me_rejects_password_when_auth_db(self) -> None:
+        self.login(ADMIN_USERNAME)
+        rv = self.client.put(meUri, json={"password": "ignored"})
+        assert rv.status_code == 400
+        data = json.loads(rv.data.decode("utf-8"))
+        assert "AUTH_TYPE is AUTH_DB" in data["message"]
+
+    def test_put_my_password_wrong_current(self) -> None:
+        self.login(ADMIN_USERNAME)
+        rv = self.client.put(
+            mePasswordUri,
+            json={
+                "current_password": "not-the-admin-password",
+                "new_password": "AnotherStr0ng!Pass",
+                "confirm_password": "AnotherStr0ng!Pass",
+            },
+        )
+        assert rv.status_code == 400
+        data = json.loads(rv.data.decode("utf-8"))
+        assert data["message"] == "Incorrect current password."
+
+    def test_put_my_password_weak_new(self) -> None:
+        self.login(ADMIN_USERNAME)
+        rv = self.client.put(
+            mePasswordUri,
+            json={
+                "current_password": DEFAULT_PASSWORD,
+                "new_password": "short",
+                "confirm_password": "short",
+            },
+        )
+        assert rv.status_code == 400
+        data = json.loads(rv.data.decode("utf-8"))
+        assert "new_password" in data["message"]
+
+    def test_put_my_password_success(self) -> None:
+        self.login(ADMIN_USERNAME)
+        new_password = "AnotherStr0ng!Pass"  # noqa: S105
+        try:
+            rv = self.client.put(
+                mePasswordUri,
+                json={
+                    "current_password": DEFAULT_PASSWORD,
+                    "new_password": new_password,
+                    "confirm_password": new_password,
+                },
+            )
+            assert rv.status_code == 200
+
+            rv2 = self.client.put(
+                mePasswordUri,
+                json={
+                    "current_password": new_password,
+                    "new_password": "YetAnotherStr0ng!Pw",
+                    "confirm_password": "YetAnotherStr0ng!Pw",
+                },
+            )
+            assert rv2.status_code == 200
+        finally:
+            self._restore_admin_default_password()
+
+    def test_put_my_password_invalidates_cloned_session_client(self) -> None:
+        """
+        Rotating the session stamp on password change logs out other clients 
that
+        still present the pre-change signed session cookie.
+        """
+        from flask.testing import FlaskClient
+
+        app = superset_integration_app
+        client_a: FlaskClient = app.test_client()
+        login(client_a, ADMIN_USERNAME)
+
+        session_cookie = client_a.get_cookie("session")
+        assert session_cookie is not None
+
+        client_b: FlaskClient = app.test_client()
+        client_b.set_cookie(
+            key="session",
+            value=session_cookie.value,
+            domain=session_cookie.domain or "localhost",
+            path=session_cookie.path or "/",
+        )
+
+        new_password = "AnotherStr0ng!PassClone"  # noqa: S105
+        try:
+            rv = client_a.put(
+                mePasswordUri,
+                json={
+                    "current_password": DEFAULT_PASSWORD,
+                    "new_password": new_password,
+                    "confirm_password": new_password,
+                },
+            )
+            assert rv.status_code == 200
+
+            assert client_b.get(meUri).status_code == 401
+        finally:
+            self._restore_admin_default_password(app)
+
+    def test_put_my_password_clears_remember_cookie(self) -> None:
+        """
+        Password change schedules Flask-Login remember-me cookie deletion.
+
+        Superset does not expose remember-me in the React login UI; this is 
defensive
+        hardening for FAB / Flask-Login persistent cookies.
+        """
+        app = superset_integration_app
+        remember_name = app.config.get("REMEMBER_COOKIE_NAME", 
"remember_token")
+        self.login(ADMIN_USERNAME)
+        self.client.set_cookie(remember_name, "stale-remember-token")
+
+        new_password = "AnotherStr0ng!PassRemember"  # noqa: S105
+        try:
+            rv = self.client.put(
+                mePasswordUri,
+                json={
+                    "current_password": DEFAULT_PASSWORD,
+                    "new_password": new_password,
+                    "confirm_password": new_password,
+                },
+            )
+            assert rv.status_code == 200
+
+            set_cookies = rv.headers.getlist("Set-Cookie")
+            cleared = any(
+                remember_name in header
+                and ("=;" in header or "Max-Age=0" in header or "1970" in 
header)
+                for header in set_cookies
+            )
+            assert cleared, f"Expected remember cookie clear in {set_cookies}"
+        finally:
+            self._restore_admin_default_password(app)
+
+    def test_put_my_password_invalid_hash_algorithm(self) -> None:
+        self.login(ADMIN_USERNAME)
+        original_auth_db_config = superset_integration_app.config.get(
+            "AUTH_DB_CONFIG", {}
+        )
+        try:
+            superset_integration_app.config["AUTH_DB_CONFIG"] = {
+                **original_auth_db_config,
+                "password_hash_algorithm": "invalid",
+            }
+            rv = self.client.put(
+                mePasswordUri,
+                json={
+                    "current_password": DEFAULT_PASSWORD,
+                    "new_password": "AnotherStr0ng!Pass",
+                    "confirm_password": "AnotherStr0ng!Pass",
+                },
+            )
+        finally:
+            superset_integration_app.config["AUTH_DB_CONFIG"] = 
original_auth_db_config
+
+        assert rv.status_code == 400
+        data = json.loads(rv.data.decode("utf-8"))
+        assert "password_hash_algorithm" in data["message"]
+
+    def test_put_my_password_unavailable_when_not_auth_db(self) -> None:
+        self.login(ADMIN_USERNAME)
+        original_auth = superset_integration_app.config["AUTH_TYPE"]
+        try:
+            superset_integration_app.config["AUTH_TYPE"] = AUTH_OAUTH
+            rv = self.client.put(
+                mePasswordUri,
+                json={
+                    "current_password": DEFAULT_PASSWORD,
+                    "new_password": "AnotherStr0ng!Pass",
+                    "confirm_password": "AnotherStr0ng!Pass",
+                },
+            )
+        finally:
+            superset_integration_app.config["AUTH_TYPE"] = original_auth
+        assert rv.status_code == 400
+        data = json.loads(rv.data.decode("utf-8"))
+        assert "AUTH_TYPE is AUTH_DB" in data["message"]
+
+    def test_get_my_password_policy_success(self) -> None:
+        self.login(ADMIN_USERNAME)
+        rv = self.client.get("/api/v1/me/password/policy")
+        assert rv.status_code == 200
+        data = json.loads(rv.data.decode("utf-8"))
+        assert data["result"] == get_public_auth_db_password_policy()
+
+    def test_get_my_password_policy_unavailable_when_not_auth_db(self) -> None:
+        self.login(ADMIN_USERNAME)
+        original_auth = superset_integration_app.config["AUTH_TYPE"]
+        try:
+            superset_integration_app.config["AUTH_TYPE"] = AUTH_OAUTH
+            rv = self.client.get("/api/v1/me/password/policy")
+        finally:
+            superset_integration_app.config["AUTH_TYPE"] = original_auth
+        assert rv.status_code == 400
+        data = json.loads(rv.data.decode("utf-8"))
+        assert "AUTH_TYPE is AUTH_DB" in data["message"]
+
+    def test_put_my_password_confirmation_mismatch(self) -> None:

Review Comment:
   **Suggestion:** Add a docstring that explains this test checks mismatch 
handling between new and confirmation passwords. [custom_rule]
   
   **Severity Level:** Minor ⚠️
   <details>
   <summary><b>Why it matters? 🤔 </b></summary>
   
   The final file state shows this newly added function without a docstring.
   That directly violates the rule requiring docstrings on new Python functions 
and classes.
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=e440a0d5686e45af8addb2ad46cd75b9&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=e440a0d5686e45af8addb2ad46cd75b9&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** tests/integration_tests/users/api_tests.py
   **Line:** 314:314
   **Comment:**
        *Custom Rule: Add a docstring that explains this test checks mismatch 
handling between new and confirmation passwords.
   
   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%2F39469&comment_hash=90edcce2a5e39533060a96783f3dea09b34806f893603bb1f97e76b787444e1f&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39469&comment_hash=90edcce2a5e39533060a96783f3dea09b34806f893603bb1f97e76b787444e1f&reaction=dislike'>👎</a>



##########
tests/integration_tests/users/api_tests.py:
##########
@@ -100,6 +115,216 @@ def test_update_me_empty_payload(self):
         rv = self.client.put("/api/v1/me/", json={})
         assert rv.status_code == 400
 
+    def test_update_me_rejects_password_when_auth_db(self) -> None:

Review Comment:
   **Suggestion:** Add a short docstring to this newly added test method to 
document the expected behavior being validated. [custom_rule]
   
   **Severity Level:** Minor ⚠️
   <details>
   <summary><b>Why it matters? 🤔 </b></summary>
   
   This is a newly added Python test method and it has no docstring in the 
final file state.
   The custom rule requires newly added Python functions/classes to include 
docstrings, so the suggestion identifies a real violation.
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=e7b24c3050eb404083f73b6d7b9ae6ae&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=e7b24c3050eb404083f73b6d7b9ae6ae&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** tests/integration_tests/users/api_tests.py
   **Line:** 118:118
   **Comment:**
        *Custom Rule: Add a short docstring to this newly added test method to 
document the expected behavior being validated.
   
   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%2F39469&comment_hash=0ce1cdb5a8ff4f61e3fb31fa16e3b3543b3a803c26c9296cf1906ebe663cf304&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39469&comment_hash=0ce1cdb5a8ff4f61e3fb31fa16e3b3543b3a803c26c9296cf1906ebe663cf304&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]

Reply via email to