fix(graph): retain owner identities for generic Go methods - #418
DivyamTalwar wants to merge 1 commit into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: activeloopai/hivemind/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Go extractor now resolves generic receiver types to their base types. Tests cover type-qualified method IDs, ownership edges, call attribution, ordinary receivers, and parenthesized receivers. ChangesGeneric Go receiver resolution
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The generic-receiver change is ready to merge after normal checks; no outstanding issue is established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Fixes #417.
The extractor recognizes
Boxand*Boxreceiver types but notBox[T]or*Box[T]. Same-named methods on different generic types receive colliding bare IDs, lose ownership edges, and can disappear from the graph.Resolve the base type of the existing parser's generic receiver node for both value and pointer receivers. Preserve type-qualified method IDs, method ownership, and call attribution. Native parser tests cover two generic types and non-generic controls.
Version Bump
No release requested. Package versions, dependencies, lockfiles and release workflows are unchanged.
Test plan
The repository-native focused tests report 3 failures and 17 passing controls on unchanged production source; the prepared correction passes all 20 focused tests. The final commit is independently validated by the full Node 22/Linux suite with coverage, typecheck, build, duplication guard and critical-only bundle audit. The workflow enforces zero failed and zero skipped tests.
Exact submitted commit:
dab2b82f95f61c4bcf263e283d385a86aecbae95. Independent Linux job, commands and logs. The checkout is pinned to this commit, not a combined patch branch.The focused tests use isolated files or source fixtures and the real parser/cache/usage code. No customer data, credentials or live model/backend calls are required.
Compatibility and limits
Does not add general method-dispatch inference or support arbitrary unresolved receiver syntax. The shared resolver, TypeScript extraction and graph schema remain unchanged. No performance improvement is claimed.
A clean full macOS suite and native Windows validation are not claimed. Upstream CI approval and maintainer review are separate from this passing independent gate.
Summary by CodeRabbit