Skip to content

Pair renames that only rename params - #12

Merged
kridaydave merged 2 commits into
mainfrom
rename-similarity
Sep 9, 2026
Merged

kridaydave merged 2 commits into
mainfrom
rename-similarity

Conversation

@kridaydave

Copy link
Copy Markdown
Contributor

PR made by muse-spark-1.3-contributor from opencode on behalf of Kriday.

Renaming a function and its params showed as a remove plus an add, which hides what really happened. The engine now scores rename similarity and pairs param-only renames when you opt in.

Summary:

  • Scores renames 100 for same code, 80 for renamed params, 0 otherwise
  • New rename_min_score policy key, defaults to 100 so current behavior stays
  • Types still count, changed bodies and arity changes never pair
  • Unit tests plus black-box checks on the built binary, full suite green

The engine only paired renames when code matched letter for letter, so renaming a function and its params showed as a remove plus an add. It now scores similarity 100 for same code, 80 for same code with renamed params, and pairs at a policy threshold that defaults to 100 so nothing changes until you opt in.

Commit made by muse-spark-1.3-contributor in opencode on behalf of Kriday.
…ring

Review caught untyped names hiding in mixed lists, lifetimes scoring zero, and no upper bound check on the new policy key. Fixed all three and pinned the wiring end to end.

Commit made by muse-spark-1.3-contributor in opencode on behalf of Kriday.
@kridaydave
kridaydave merged commit 22b7d3e into main Sep 9, 2026
5 checks passed
@kridaydave
kridaydave deleted the rename-similarity branch September 9, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant