fix(pipeline): suppress weak Python member calls - #1324
Conversation
|
Reviewed properly, and this needs changes — but I want to start with what is right, because the direction is correct and the diagnosis behind it is excellent. Issue #1276 is one of the best bug reports this repo has received. Reproducible on public code, a quantified repo-wide invariant (55 production→test edges in a 12k-node repo), and a correct implementation-level diagnosis — unflagged Your tests are exemplary too — both resolver paths exercised, the parallel one reconstructed with the Now the problem, and unlike most red PRs I have looked at tonight, this CI failure is genuinely yours. Our smoke fixture is: from pkg import helper
result = helper.compute(42)and all three smoke legs fail identically with The reason is a real Python-versus-TypeScript semantic difference rather than a coding slip. In Python, The fix shape: exempt receivers that are known imports of the file. Extraction already has the import table, or the resolution side can consult the import map before applying the guard — flag Please also add a positive test pinning One more genuine failure: clang-format violations in the new Two of your six failures are not yours: One thing worth the maintainer's eyes that I have flagged separately: the With the import-receiver exemption this lands as a flagship graph-quality improvement. The hard part — finding and proving the false-edge factory — is already done. |
Signed-off-by: imi <hoshinoimi@gmail.com>
7c3dbfc to
1ec5212
Compare
|
Addressed the review findings in
Local verification:
The full local smoke cannot coexist with the currently active installed MCP version cohort, so I left that process untouched and am relying on the updated PR's clean CI environment for smoke verification. Full |
What does this PR do?
Fixes #1276.
Python attribute calls were not consistently classified as member calls, allowing weak
suffix_match,unique, andfield_type_hintresolutions to create false-positiveCALLSedges when no import-reachable target existed.This change marks unresolved receiver calls as method calls and applies the existing weak-member suppression policy consistently in sequential and parallel resolution. Direct
self/cls/supercalls and receivers rooted in an imported local name are exempt, so canonical calls such asfrom pkg import helper; helper.compute()still resolve. Strong LSP, import, same-module, and service resolutions remain available.Regression coverage exercises extraction plus sequential and parallel pipelines, including positive imported-module receiver calls and negative unrelated member calls.
Verification
nix develop --command make -j8 -f Makefile.cbm test-focused TEST_SUITES='extraction registry pipeline'nix develop --command make -f Makefile.cbm lint-format lint-no-suppressgit diff --checkand changed-rangeclang-format --dry-run --Werror: passed.lint-cireached cppcheck but returned its repository-widetoomanyconfigsinformational diagnostic; no patch-local format or suppression violation remained.Checklist
git commit -s) and follows the Contributor License Agreementmake -f Makefile.cbm test) — focused sanitized suites passed