When changing dependency declarations in configuration files like pyproject.toml, treat group placement and lockfile updates as part of the change.

Example (pattern):

[project.optional-dependencies]
# Keep in both groups if both are required
default = ["pycryptodomex==3.20.0"]
test = ["pycryptodomex==3.20.0", "websockets>=14.0"]

After editing, regenerate and commit the matching lockfile (e.g., uv.lock).