External-call placeholders in a Python-only repo are labeled language "go"
Describe the bug
I tried gortex on a Python-only repo (631 .py files, no Go at all), and gortex query stats lists Go as a language:
By language:
go 867
py 31
python 31430
...
The "go" nodes are the external-call placeholders: 572 function nodes such as dep::collections.Counter::Counter and dep::concurrent.futures.ThreadPoolExecutor::ThreadPoolExecutor, plus 295 module nodes with ids like <repo>::module::go:threading. They also turn up in search, for example gortex query symbol ThreadPoolExecutor returns <repo>::module::go:threading.
From reading the source at c7abb9b, it looks like it comes from attributeGoExternalCalls in internal/resolver/external_call_attribution.go:
materializeGoExternalSeensetsLanguage: "go",Meta["ecosystem"] = "go"and a"go:"+importPathmodule id for every placeholder (lines 166 and 199).splitGoExternalTargetaccepts anydep::,external::orstdlib::target, and the Python resolver emits the same prefixes, so Python externals get picked up by the Go pass.- The pass is gated on
graphHasLanguage("go"). I couldn't work out what first makes that true on a store that only holds this one Python repo, so I may be missing something there.
To Reproduce
git clone https://github.com/Nauro-AI/nauro && cd nauro && git checkout 060874cgortex daemon start --detach && gortex track .gortex query stats
Expected behavior
Python externals keep the caller's language (or the Go pass skips non-Go callers), so a Python-only repo shows no Go.
Environment:
- OS: macOS 26 (arm64)
- Go version: n/a (Homebrew cask; binary built with go1.27.3)
- Gortex version: v0.64.11+c7abb9b
Additional context
Two smaller things I noticed while looking, happy to split them out if that's easier:
- Python shows up twice in the stats, as
pyandpython. Thepynodes are builtin stubs like<repo>::builtin::py::dict::items;builtin_stub_nodes.go:59copies the family code from the stub id, while the parser usespython. - About 250 of the "go" placeholders are the repo's own modules (e.g.
dep::nauro.sync.generation_refresh::unlink), which reminded me of #824. Calls through a package__init__re-export (from nauro_core import operationsthenoperations.check_decision(...)) end up on thesedep::stubs, soquery callersmisses them. That's with no Python LSP installed, so pyright may already cover it.
Thanks for gortex, it's been fun to dig into.