Repository navigation
fix(parser): disambiguate Python and Ruby methods in same-leaf classes - #1087
azizur100389 wants to merge 4 commits into
Conversation
code-review-graph reviewOverall risk: 0.65 (MEDIUM) — 31 changed function(s)/class(es), 46 affected flow(s), 3 test gap(s) (1 with no tested caller found, 2 reached only through a caller) Risk-scored changes
Affected execution flows
Test gaps
Reached only through a callerNo test names these directly, but a tested caller reaches them along the call path shown. That is a path in the call graph, not a record of execution -- the caller's tests may never take this branch. Treat it as where to look, not as coverage: these count as gaps and are scored as untested.
Powered by code-review-graph — local-first analysis; no code leaves the CI runner. |
|
Thank you for this PR. I tested it with same-name classes in Python and Ruby files. Before I can merge it, please fix these:
The failing tests are on the branch After you push the fix, I will test it again. |
|
Hi @tirth8205, the review issues have been fixed and pushed, with regression tests covering the reported cases. Top-level Ruby classes sharing a name with nested classes now resolve implicit and self calls within the correct class, including nested-first declaration order. Your regression test is included with its xfail mark removed. I rechecked CI today: all 17 checks are passing, with the upgrade-path check intentionally skipped. The branch is also up to date with staging and has no merge conflicts. Could you please retest the updated PR when you have a chance? Thank you! |
Linked issue
Closes #999.
What & why
Python and Ruby methods in Alpha.Same and Beta.Same share identities and overwrite each other. Index ambiguous class leaf scopes once per file, carry the full lexical scope into affected method identities and CONTAINS/call sources, and prefer same-scope calls rather than another class's method. Keep unique-leaf method identities unchanged and leave a missing local member unbound. Rebuild existing graphs to replace overwritten rows.
How it was tested
Applied the same regression/affected-module/full-baseline methodology used in my previous PRs (#274, #276, #279, #353 and #354), against unchanged staging
6b12d11625cbec3b6773e076cb3d136464fa90e5.GitHub CI: 17 applicable checks passed on the final commit, including Python 3.10–3.13, browser tests, native Windows tests, and the three MCP-client platforms. Python 3.13: 4,274 passed, 804 skipped, 46 deselected, 2 xfailed, 2 xpassed; 85.88% coverage (65% required). The manual upgrade job is skipped by design.
Full local Windows suite: 4,147 passed, 112 failed, 819 skipped, 46 deselected, 2 xfailed, 2 xpassed; 86% coverage. Unchanged staging full baseline: 4,143 passed, 110 failed. The two additional failures are the callers_of default token-budget and affected-flows worst-case token-budget tests. Both also fail on unchanged staging with comparable long workspace temporary paths (supplemental baseline: 2/2 failed). They reflect absolute-path length in response sizes; no production budget or assertion was weakened. PATH/PYTHONPATH select the isolated checkout, and Git ceilings keep fixture repositories away from the enclosing home Git repository. Browser tests passed in CI; browser and opt-in upgrade tests were excluded locally.
All ten issue fixes were additionally tested together: 283 regression checks passed, and the combined affected suite had 1,142 passed / 25 unchanged-staging Windows failures, with no new failure identities. The tested combination is preserved in this integration branch.