You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Go: multiple init() per package collapse onto one QN — bodies and registration edges silently dropped #1910
Status: fix open — PR #1915 (file-stem+line #-suffix QNs for Go init, #495 pattern; stacked on #1913). Post-fix: init nodes 7 → 29, matching source exactly (source count: 29).
Version
codebase-memory-mcp 0.10.8 (also reproduced on a source build @ d706c33)
Platform
macOS (Apple Silicon)
Install channel
Built from source
Binary variant
standard
What happened, and what did you expect?
Go allows any number of func init() per package (several per file included); all run at program start. Every one gets the same QN (proj.pkg.init), so the upsert keeps one node per package and silently drops the rest with their bodies.
Measured: an event-source package registering each decoder in its own file's init() — 21 init functions collapsed into 1 node; repo-wide 29 in source, 7 in the graph. The registration topology (which decoder handles which event) is invisible; the surviving node's edges are a blend of merged bodies.
Rust cfg twins already fold a #-suffix into the QN (rust_cfg_qualified_name); GoogleTest macros derive unique names (#1266). Same move: proj.pkg.init#a.go:L5, mirrored on the call-scope side. Nothing joins on the plain QN — calling init explicitly is illegal in Go — so no resolution path is affected.
Related: #1909, #1911 (same silent-upsert-collapse family); tracked in #1932.
Confirmations
I searched existing issues and this is not a duplicate.
My reproduction uses shareable code (a dummy snippet or a public OSS repository), not proprietary code.
Thank you for the multi-init fixture and measured recovery in #1915. The proposed identity change remains subject to review; I have no new verification to add. Sorry for the delay; this is waiting on maintainer follow-up, and I’ll follow up soon.
Fixed on main by #1915 (merge commit 9faa3e5): multiple init() functions in one Go package now each get their own qualified name per file, so their bodies and registration edges are no longer dropped. After updating, please re-index the project once. Thank you, Ilya, for the report and the fix!
Activity
fix(extract): give each Go init() its own QN
fix(pipeline): bind field_type_hint by owning QN segment, not substring
fix(pipeline): bind field_type_hint by owning QN segment, not substring
fix(pipeline): bind field_type_hint by owning QN segment, not substring
fix(pipeline): bind field_type_hint by owning QN segment, not substring
DeusData commentedon Oct 25, 2026
Thank you for the multi-init fixture and measured recovery in #1915. The proposed identity change remains subject to review; I have no new verification to add. Sorry for the delay; this is waiting on maintainer follow-up, and I’ll follow up soon.
fix(lsp): name Go init() callers per file in the Go LSP
DeusData commentedon Oct 31, 2026
Fixed on main by #1915 (merge commit 9faa3e5): multiple init() functions in one Go package now each get their own qualified name per file, so their bodies and registration edges are no longer dropped. After updating, please re-index the project once. Thank you, Ilya, for the report and the fix!
fix(extract): give each Go init() its own QN