Initial development contract, base 0591fc7. Target: the Go 1.23 language subset described
below, using the pinned tree-sitter grammar. Parser availability does not establish
whole-language support. Indexing never runs Go, downloads modules or invokes a compiler.
- Index
.gofiles: package functions, named types, interfaces and declared methods. Map named concrete types to the existingclasskind; interfaces retaininterface. Preserve receiver-qualified method names, source byte spans and exported status (initial Unicode uppercase letter), including declarations split across files. - Record actual callsites including
goanddefer. Count grouped parameters and variadic arguments. Do not turn a type conversion or function value into a constructor. Package initializers use the file's module owner for calls and references. Calls in function literals remain in their enclosing function or module with conservative shadowing; the enclosing caller is containment, not proof of immediate execution. - Package identity includes source directory and declared package name. Same spelling
in another package or another language does not provide a fallback target.
Production files cannot resolve to declarations found only in
_test.gofiles. - Persist Go extraction provenance in namespaced
observations; reuse the existing symbols, calls, import and reference tables. No destructive DB migration is needed.
- Resolve unique package-level functions across files of the same package. Resolve
local-module imports (explicit aliases or the target's declared package name) only
within the caller's nearest
go.modboundary. Imported names must be exported. - Resolve directly declared methods on unambiguous concrete receiver parameters or
explicitly typed outer-body local variables. Direct outer-body
varand:=declarations can also retain the type written in aT{}or&T{}initializer, including parentheses, comments, imported types and one-to-one initializer lists. Addressable value variables may call pointer receiver methods. Interface receivers, promoted embedded methods, method expressions, type aliases, unresolved/generic receiver types and inferred return types abstain. - Local receiver hints remain conservative across the whole function. A name used
before its declaration or anywhere in that declaration's initializers cannot take
the new local type: those uses may refer to an outer binding. Omit that name's hint
for the whole owner, including for explicit local types. Control-header, implicit
switch/select case blocks and nested declarations supply blockers, not receiver hints.
This also applies to explicit types and grouped
vardeclarations. Package-level variables, copies of other variables and arbitrary initializer expressions supply no new receiver inference. Method values remain references, not invocations. - Local bindings and type parameters shadow package names. Conservative whole-function shadowing can omit valid calls before/after a nested binding; package-initializer literals similarly use conservative file-module shadowing. Neither may invent edges. Function-valued variables and unresolved receiver chains remain dynamic/unresolved. Explicit generic calls may resolve a named function, never an indexed function value. Static function-value references are kept separately from invocations. Ambiguous conversion/call syntax can remain an unresolved callsite; it never becomes a constructor. Call-head names and receivers longer than the 160-character diagnostic fields stay unresolved; their clipped text cannot select another symbol.
- Build constraints and OS/architecture suffixes are not evaluated. Such files remain
searchable but neither their calls nor declarations supply resolved targets.
The same applies to dot/underscore filenames, cgo and
go:linknamefiles. Partial syntax and ambiguous declarations also abstain. No same-name interface-to- implementation guesses or package-wide low-confidence fallback. go.modandgo.workare inert, bounded configuration inputs. Changes invalidate freshness and re-resolve imports even when.gocontents are unchanged. Nested, invalid or symlinked module files form boundaries; they cannot inherit an outer module. Module/workspace files in ancestors of selected Go sources participate even if Git ignores them. Freshness fingerprints include bounded presence/status markers for unreadable, symlinked and oversized boundaries; these markers are not source-file contents. Workspace selection, cross-module dependencies,replace, vendoring and GOPATH resolution are outside this increment. Workspace mode abstains on imported targets.
FTS5/search, source windows, impact and test-plan queries use the existing interfaces.
Conventional Test/Benchmark/Fuzz/Example functions in _test.go are discovery candidates,
not proof of execution. Go arity/type diagnostics remain the compiler's responsibility.
The existing Python/PHP checks are not extended with guessed Go diagnostics.
Require positive and negative cases for package isolation, aliases, export rules, receiver/interface distinctions, shadowing, generics/conversions, build constraints, test variants, module changes/boundaries and mixed languages. Cover hostile imports, engine-copy isolation, cache invalidation, incremental/full equivalence and rollback. Receiver-literal regressions also preserve explicit interface types, predeclaration and initializer scopes, control headers, nested bindings, method values and changed initializer types; native observations must keep these synthetic programs valid. Keep existing language suites and recorded oracle green on identical frozen inputs.
Native probes use a checksum-verified temporary Go toolchain and trusted synthetic fixtures, with module downloads disabled; record its exact version separately. Inspect a bounded real standard-library package as an additional source case. Neither native observations nor a successful parse prove complete Go semantics.
References checked 12 November 2026: Go specification, blocks and declaration scopes, module layout, go.mod reference.
Recorded observations run without Go in the normal Python suite. To explicitly rerun the bundled, trusted native programs with an installed compiler:
.venv/bin/python -I tools/oracle_matrix.py --language go --rerun --go /path/to/go --output /tmp/go-oracle.jsonThe post-1.7.0 capture contains 7,034 indexed Go sources, of which 65 have
root_node.has_error. The individual upstream package
tree-sitter-go 0.25.0
provides MIT-licensed, compiled macOS arm64 and Linux wheels for Python 3.10+,
and loads with tree-sitter 0.25.2 without runtime downloads. However, its trees
are identical to the pinned language pack on all 7,034 sources; the same 65
paths remain partial. It is therefore not added as a dependency.
The table assigns one primary observed cause per file. Some test files also contain other deliberately invalid cases. These groups describe parser output, not compiler acceptance or a claim that every partial file is valid Go. In particular, malformed test inputs and annotated templates should not all become successful parses. This investigation does not widen the Go 1.23 resolver subset.
| Primary cause | Files |
|---|---|
| Negative test fixtures with expected-error annotations | 44 |
| Method declarations with their own type parameters | 6 |
Expression arguments to new, such as new(42) |
7 |
| Implicit semicolon at end of file | 4 |
| Consecutive labels | 1 |
| Method expression on an anonymous struct type | 1 |
Coverage template with « / » annotations |
1 |
| Intentionally non-Go text in parser test data | 1 |
| Total | 65 |
For the four EOF cases, has_error is true without a visible ERROR or missing
node. Appending a newline in a diagnostic memory buffer makes them parse without
errors. The actual indexed source bytes are never rewritten. Ten minimal Go
inputs, including one complete control, also produce identical trees with the
language pack and the individual wheel. No Go compiler or SDK source was run.
All paths below are relative to the SDK's src/ directory:
Negative test fixtures (44):
cmd/compile/internal/syntax/testdata/issue20789.gocmd/compile/internal/syntax/testdata/issue23385.gocmd/compile/internal/syntax/testdata/issue23434.gocmd/compile/internal/syntax/testdata/issue31092.gocmd/compile/internal/syntax/testdata/issue43527.gocmd/compile/internal/syntax/testdata/issue43674.gocmd/compile/internal/syntax/testdata/issue46558.gocmd/compile/internal/syntax/testdata/issue47704.gocmd/compile/internal/syntax/testdata/issue48382.gocmd/compile/internal/syntax/testdata/issue49205.gocmd/compile/internal/syntax/testdata/issue49482.gocmd/compile/internal/syntax/testdata/issue52391.gocmd/compile/internal/syntax/testdata/issue56022.gocmd/compile/internal/syntax/testdata/issue60599.gocmd/compile/internal/syntax/testdata/issue65790.gocmd/compile/internal/syntax/testdata/issue68589.gocmd/compile/internal/syntax/testdata/issue70957.gocmd/compile/internal/syntax/testdata/sample.gocmd/compile/internal/syntax/testdata/smoketest.gocmd/compile/internal/syntax/testdata/tparams.gocmd/compile/internal/syntax/testdata/typeset.gocmd/compile/internal/types2/testdata/local/issue47996.gocmd/compile/internal/types2/testdata/local/issue68183.gointernal/types/testdata/check/builtins0.gointernal/types/testdata/check/constdecl.gointernal/types/testdata/check/decls0.gointernal/types/testdata/check/expr0.gointernal/types/testdata/check/expr3.gointernal/types/testdata/check/issues0.gointernal/types/testdata/check/stmt0.gointernal/types/testdata/check/typeinst0.gointernal/types/testdata/check/vardecl.gointernal/types/testdata/examples/functions.gointernal/types/testdata/examples/types.gointernal/types/testdata/fixedbugs/issue39634.gointernal/types/testdata/fixedbugs/issue42987.gointernal/types/testdata/fixedbugs/issue43190.gointernal/types/testdata/fixedbugs/issue45635.gointernal/types/testdata/fixedbugs/issue46403.gointernal/types/testdata/fixedbugs/issue48827.gointernal/types/testdata/fixedbugs/issue50427a.gointernal/types/testdata/fixedbugs/issue50427b.gointernal/types/testdata/fixedbugs/issue51658.gointernal/types/testdata/fixedbugs/issue58612.go
Method type parameters (6):
cmd/compile/internal/importer/testdata/genmeth.gogo/internal/gcimporter/testdata/genmeth.gointernal/types/testdata/check/typeparams.gointernal/types/testdata/spec/methods.gomath/rand/v2/rand.goruntime/traceback_test.go
Expression arguments to new (7):
cmd/compile/internal/types2/trie_test.goencoding/json/v2/arshal_test.gogo/types/trie_test.gointernal/types/testdata/check/go1_25.gointernal/types/testdata/fixedbugs/issue75986.gonet/http/internal/http2/server.goruntime/secret/secret_test.go
EOF semicolon (4):
internal/types/testdata/check/cycles5.gointernal/types/testdata/check/decls4.gointernal/types/testdata/fixedbugs/issue48083.gointernal/types/testdata/fixedbugs/issue51607.go
Consecutive labels (1):
internal/types/testdata/check/gotos.go
Anonymous-struct method expression (1):
internal/types/testdata/fixedbugs/issue53358.go
Coverage annotation template (1):
cmd/cover/testdata/ranges/ranges.go
Non-Go parser input (1):
go/parser/testdata/issue42951/not_a_file.go/invalid.go