Repository navigation
fix(go): preserve generic receiver method ownership - #833
Merged
tirth8205 merged 2 commits intoAug 19, 2026
Merged
Conversation
code-review-graph reviewOverall risk: 0.30 (LOW) — 4 changed function(s)/class(es), 0 affected flow(s), 2 test gap(s) Risk-scored changes
Test gaps
Token savings: this graph-backed report used ~204,014 fewer tokens (~100%) than reading every changed file in full (estimated, chars/4 approximation). Powered by code-review-graph — local-first analysis; no code leaves the CI runner. |
merlincat11
marked this pull request as ready for review
August 8, 2026 03:01
Owner
|
Confirmed the new test fails on main and that T[P] and *T[P] receiver methods attach correctly, including multi param and unnamed receivers. Merging. Small follow-up: the unwrap in _get_go_receiver_type can land on a comment node, so func (b * /c/ T) F() loses its parent; filtering comment nodes there would cover it. |
This was referenced Aug 19, 2026
pull Bot
pushed a commit
to ttnghia/code-review-graph
that referenced
this pull request
Aug 19, 2026
Keep both test blocks at the shared anchor in tests/test_multilang.py: the generic-receiver regression from tirth8205#833 and the receiver-call resolution tests from this branch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012fHfGDiZedoxjpKzanHri3
pull Bot
pushed a commit
to bhardwajRahul/code-review-graph
that referenced
this pull request
Sep 17, 2026
Untrack docs/superpowers/ and .serena/, drop the private scratch-file list from .gitignore, de-duplicate GEMINI.md, point the CI badge at the default branch, and rename the PR-numbered test modules after the behaviour they pin. - docs/superpowers/specs/: two dated internal design specs were tracked even though .gitignore already lists docs/superpowers/. Untracked with git rm -r --cached; the ignore rule now holds. The older 2026-07-17 plan and spec files under that directory were already removed from the tree. - .serena/: 160 lines of untouched vendor boilerplate for one contributor's tooling. Added .serena/ next to .codex/ under "Local tool configuration" and untracked it, matching how .claude/, .codex/ and .qoder/ are handled. - GEMINI.md was a byte-identical copy of .github/copilot-instructions.md. It is now a short pointer to AGENTS.md and CLAUDE.md. Nothing reads it expecting full content: the GEMINI.md references in skills.py and test_skills.py are about files written into a target repo, under tmp_path. - .gitignore: the "One-off docs" section named about a dozen private scratch files. Replaced with a single scratch/ entry. None of those lines excluded build output, so nothing was kept. - README.md: the CI badge was pinned to ?branch=main while the default branch is staging. Now points at staging. - tests/: 21 modules named after their originating PR are renamed to the behaviour they cover, via git mv, with the PR number moved into the module docstring. Overlapping modules are folded: tirth8205#831/tirth8205#845/tirth8205#866 into test_js_module_resolution.py, tirth8205#830/tirth8205#833 into test_go_receiver_resolution.py, tirth8205#824/tirth8205#862 into test_kotlin_import_comments.py. The one non-JS test in the tirth8205#866 module moved to test_affected_flows_limits.py. - Updated the references: CLAUDE.md's "Regressions by pull request" line, and the self-referencing filename in the stale-SDK scan (was test_pr856_edges.py, now test_genai_packaging.py). CI workflow files and tests/test_documentation.py do not name any of the renamed files. Collected tests: 3370 before, 3370 after. Full suite passes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Summary
Fixes #832.
Go methods declared on generic receiver types were emitted as top-level
functions because the receiver parser did not unwrap
generic_typenodes.The fix unwraps generic and pointer receiver nodes to their base type
identifier, preserving method ownership for both
T[P]and*T[P]receivers.Validation
uv run --extra dev pytest -q— 2399 passed, 5 skipped, 2 xpasseduv run --extra dev ruff check code_review_graph/parser.py tests/test_multilang.pyinternal/addrs/graph.go: all 11DirectedGraph[T]methods now haveparent_name='DirectedGraph'.Repository-wide Ruff still reports unrelated pre-existing violations in other
test files.