Repository navigation
v6.4.2
Ark v6.4.2 - Go Semantic Accuracy Phase 2 — Method Resolution Fidelity
This release significantly improves Ark's Go semantic resolution accuracy, expanding method reference support while preserving strict resolution soundness.
Across five fixed Go corpora and 92,323 independently evaluated references, overall reference recall improved from 92.69% to 99.32%, with zero incorrect Exact or Strong resolutions and zero incorrect OutsideRepository classifications.
Highlights
Go Method Resolution
Ark now resolves a much broader range of Go method references using declared type information rather than relying on method names alone.
Key improvements include:
Receiver chain resolution — Resolves methods through function return types, struct fields, package variables, element types, and chained expressions.
Method values and expressions — Supports
value.Method,Type.Method,(*Type).Method, and instantiated generic receivers.Promoted methods — Resolves methods inherited through embedded types, respecting Go's promotion depth, shadowing, and ambiguity rules.
Interface methods — Recognizes interface method declarations and resolves statically selected interface methods without incorrectly attributing them to concrete implementations.
Generics — Resolves methods on instantiated generic receiver types to their original declarations.
Cross-package resolution — Improves method identity and reference resolution across package boundaries.
Conservative fallback — Ambiguous or insufficiently typed references remain candidates or unresolved rather than being incorrectly classified as Strong.
Accuracy Improvements
Measured against an independent go/types oracle:
On the fixed common reference set:
6,122 additional correctly resolved references
Zero previously correct resolutions lost
Zero incorrect Exact resolutions
Zero incorrect Strong resolutions
Zero incorrect OutsideRepository classifications
Interface method resolution also reached 84.40% recall across 1,019 newly eligible references.
These measurements use fixed corpora and independent compiler-based reference oracles. Category-specific figures are reported on comparable reference sets.
Reference Identity and Soundness
Reference IDs now incorporate the full source span, including the ending position.
Previously, distinct references sharing the same starting position could generate identical IDs, potentially associating one reference with another reference's resolution result.
This release:
Fixes reference ID collisions caused by overlapping source expressions.
Enforces reference ID uniqueness during index construction.
Reports
reference_id_collisiondiagnostics when duplicate IDs are encountered.Preserves deterministic reference IDs across repeated indexing and cache restoration under equivalent conditions.
Strengthens reference identity and MCP contract regression tests across supported languages.
Compatibility Note
The id values returned by find_references will change across all supported languages.
These IDs are opaque reference identifiers, not persistent public identifiers. They should not be stored or assumed stable across Ark versions.
The response field structure and ID format remain unchanged.
Validation
The implementation was validated with:
Independent
go/typesoracle comparisons across five Go corpora.92,323 fixed, comparable reference cases.
Go method semantic test matrices covering receiver types, promotion, interfaces, generics, scope, and ambiguity.
Unit tests, race detector tests,
go vet, and staticcheck.Deterministic corpus and cache consistency checks.
Negative tests and mutation testing.
Cross-language reference identity and MCP contract regression tests.
Independent reviews focused on Go semantics, soundness, compatibility, and performance.
Performance
The additional semantic analysis introduces some overhead:
Cold indexing: approximately 5–7% slower in the measured corpora.
Cache restoration: approximately 18–32% slower.
Warm indexing remains largely unchanged.
These costs are primarily associated with additional reference evidence and resolution processing. Future optimizations will target these paths without weakening semantic correctness.
Known Limitations
The following cases remain conservatively unresolved or are not yet fully supported:
Methods selected through type parameter constraints.
Some chains involving external types or functions.
Certain interface-return chains and type-switch bindings.
Method values are not yet included in
find_referencesoutput, even when their resolutions are available internally.
Ark continues to prioritize soundness over speculative resolution.
This release moves Ark closer to compiler-informed Go code intelligence, delivering substantially higher reference recall without sacrificing resolution correctness.