FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(python): suppress weak same-name CALLS for get/run/execute by Joseph-MingEn · Pull Request #1386 · DeusData/codebase-memory-mcp · GitHub

fix(python): suppress weak same-name CALLS for get/run/execute - #1386

Open
Joseph-MingEn wants to merge 1 commit into
DeusData:mainfrom
Joseph-MingEn:fix/py-suppress-weak-generic-calls
Open

fix(python): suppress weak same-name CALLS for get/run/execute#1386
Joseph-MingEn wants to merge 1 commit into
DeusData:mainfrom
Joseph-MingEn:fix/py-suppress-weak-generic-calls

Conversation

Copy link
Copy Markdown
Contributor

Summary

  • Suppress weak short-name CALLS resolution for Python attribute calls and bare generic callees (get / run / execute), mirroring the existing TS/JS weak-method guard.
  • Flag Python attribute calls as is_method during extraction so prior_cp.get(...) cannot suffix_match onto unrelated Methods (e.g. _SessionRegistry.get).
  • Same guard drops bare run() Callable-parameter calls from binding to unrelated Methods (e.g. SatoriLive.run).

Motivation (Yui WP-B C2 / G2)

On a large Python repo, trace_path hop-1 showed fabricated CALLS:

  • router.submit_task → _SessionRegistry.get via strategy=suffix_match / callee=prior_cp.get / conf 0.28
  • gate._run_with_heavy_slot → SatoriLive.run via suffix_match / bare run() / conf 0.28

Strong strategies (import_map, same_module, lsp_*) are kept.

Test plan

  • ./build/c/test-runner registry (includes new python suppress unit tests)
  • ./build/c/test-runner pipeline (includes pipeline_python_suppresses_weak_generic_edges)
  • Maintainer CI green

Made with Cursor

Mirror TS/JS weak-method guards for Python attribute calls and bare
generic callees so suffix_match cannot bind prior_cp.get / run() onto
unrelated Methods (G2 / Yui WP-B C2).

Co-authored-by: Cursor <cursoragent@cursor.com>
Joseph-MingEn requested a review from DeusData as a code owner July 31, 2026 16:33

Copy link
Copy Markdown

Thanks for opening this — it has been seen, and it is queued.

This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence.

Current review status: working through a backlog. 0.9.1-rc.1 is out, so the release freeze that held reviews is over — but it left a large queue of open pull requests behind it, and we are reading through them oldest-first. The background is in discussion #1144.

What that means for this PR, concretely:

  • It will not be closed for inactivity. No stale bot touches pull requests here.
  • It may still sit a while before a human reads it. That is on us, not on you.
  • Older PRs are read first, so a recent one is not being skipped — it is behind a queue.

Things that will genuinely speed it up whenever review does happen:

  • Keep it rebased on main — the tree is moving quickly right now, and a conflicting branch cannot be reviewed as the diff you intended.
  • Get CI green, or say which failures you believe are pre-existing.
  • Keep the change to one claim. Bundled features and refactors get split before they get merged, which costs you a round trip.
  • Every commit needs a sign-off (git commit -s) — CI enforces DCO.

If this fixes a bug, a reproduction we can run is worth more than a description of the symptom.

Thanks for contributing, and sorry in advance for the wait.

DeusData added bug Something isn't working parsing/quality Graph extraction bugs, false positives, missing edges priority/high Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker. labels Aug 3, 2026
DeusData added this to the 0.9.1-rc milestone Aug 3, 2026

DeusData commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Thank you for the focused Python same-name fallback suppression and the tests around generic method names. This is now routed as a high-priority parsing fix in 0.9.1-rc and linked to the remaining scope in #1355. This is triage rather than approval; our review queue is full, so the detailed review may take a little time, especially because the PR addresses only one part of the broader binding problem.

Copy link
Copy Markdown
Owner

The false-positive class is real (prior_cp.get resolving to an unrelated _SessionRegistry.get is exactly the #1276 family) and mirroring the TS/JS guard is the right instinct. Three things before this can merge: (1) mechanical — the branch conflicts, DCO and lint are red, and all three pr-smoke legs fail; rebase + sign-off + lint first. (2) The blanket is_method=true for every Python attribute call in extract_calls.c changes semantics for every other is_method consumer — narrow it or make the case. (3) The hardcoded {get,run,execute} blacklist plus blanket weak-member suppression is a recall cut on a priority language: our #1000 lesson is that graph-shape changes need corpus-scale evidence, so please include Django-scale before/after edge counts (we can help run them once the branch is green). Related work just landed you should build on: #1647 now suppresses cross-language suffix_match CALLS.

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

Labels

bug Something isn't working parsing/quality Graph extraction bugs, false positives, missing edges priority/high Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL