Why
In tree-sitter-python a function_definition span excludes its decorators (they live in the parent decorated_definition). So a decorator-only change (e.g. @cache → @lru_cache) is invisible when the anchor points at the function.
What
Decide and implement: either extend the hashed span to the enclosing decorated_definition when present, or document the gap explicitly. Mirror the decision for other decorator-bearing languages.
Why
In tree-sitter-python a
function_definitionspan excludes its decorators (they live in the parentdecorated_definition). So a decorator-only change (e.g.@cache→@lru_cache) is invisible when the anchor points at the function.What
Decide and implement: either extend the hashed span to the enclosing
decorated_definitionwhen present, or document the gap explicitly. Mirror the decision for other decorator-bearing languages.