Repository navigation
changed: classify edits by place and parameters, not by name - #1809
Merged
swapnilpaliwal-sd merged 1 commit intoSep 30, 2026
Merged
swapnilpaliwal-sd merged 1 commit into
swapnilpaliwal-sd merged 1 commit into
Conversation
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
September 30, 2026 05:44
swapnilpaliwal-sd
force-pushed
the
apps/javascript/declaration-diff-misclassifies-edits
branch
from
September 30, 2026 07:31
9a149c5 to
c224262
Compare
…rs, not by its name
The per-declaration diff behind `changed`, test-impact and the edit hooks found a declaration's
new header by searching for its name, and read a parameter list with a regex. So:
- a method renamed in place was "removed old" + "added new";
- a JS/TS constructor (`<constructor>` in the graph, `constructor(` in the text) was never found
again: every header edit came back as removed + "added S.constructor";
- a destructured parameter's `{` ended the header, and an arrow inside a default value took the
edit ("signature millis");
- a `this.x = ...` field whose line moved was "removed" while still assigned;
- a graph holding the new name printed the old header's words as a "return type".
Now a header that became another name with the same parameters (and no overload keeps them) is
"renamed old → new", targeted at the old declaration; constructors are looked for as written;
parameters are parsed by bracket depth, destructured fields are one row each, defaults compared;
a function written inside another's parameter list is charged to that one; `this.x =` declares a
field; a header found word for word further down is a move, not a signature change.
A span whose header line was rewritten into a header of another name with the same parameters is
kept there when the graph already holds the new name (a refresh that raced the edit), and reported
as the rename.
Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
swapnilpaliwal-sd
force-pushed
the
apps/javascript/declaration-diff-misclassifies-edits
branch
from
September 30, 2026 07:38
c224262 to
7217619
Compare
swapnilpaliwal-sd
deleted the
apps/javascript/declaration-diff-misclassifies-edits
branch
September 30, 2026 07:53
Open
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The per-declaration diff behind
changed,test-impactand the edit hooks matched declarations by name and header text.signature old — renamed old → new, targeted at the old declaration and its callers. Before, it wasremoved old+added new.constructor(, not under the graph's<constructor>name. Before, every header edit was reported as removed +added S.constructor.{inside the parameter list no longer ends the header.file:linetarget that would resolve to a narrower callable on the same line falls back to the qualified name.this.x = …counts as declaring fieldx, so a field that is still assigned is not reportedremoved.Checked: new case
javascript/edits-in-place(9 checks: 6 fail before the fix, all pass after). The rename checks in the python/java/csharpedit-targets-the-declaration-editedcases now requirerenamed X → Y. Case suites: JS 250/253, TS 176/181, Python 268/269, Java 304/304, C# 201/203; the failing checks are the same on the base branch. Engine JS suite 89/89. On the product: probes 47/70 on both builds, call edges 8960 = 8960, and a real rename gives the same 52 tests from the hook and the CLI.header_name(n, d, rel)(how a declaration is spelled), used by both the range diff and this change; the header-text reader is nowdeclared_name(h, is_py).