Documentation
¶
Overview ¶
@index Language-specific dispatch hooks used by call edge resolution.
@index Edge resolution helpers that attach parsed relationships to stored graph node IDs.
Index ¶
- func FilterResolved(edges []model.Edge) []model.Edge
- func ImportsFromTarget(edge model.Edge) (string, bool)
- func IsLikelyExternalImportEdge(edge model.Edge) bool
- func IsLikelyExternalImportPath(path string) bool
- func Resolve(ctx context.Context, lookup NodeLookup, edges []model.Edge) ([]model.Edge, error)
- func ResolveWithOptions(ctx context.Context, lookup NodeLookup, edges []model.Edge, ...) ([]model.Edge, error)
- type FilterResolvedDiagnostics
- type FilterResolvedSample
- type NodeLookup
- type ResolveOptions
- type UnresolvedEdgeFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterResolved ¶
FilterResolved returns only edges that have both persisted endpoints. @intent prevent unresolved syntax candidates from occupying fingerprints before they become traversable
func ImportsFromTarget ¶
ImportsFromTarget extracts the import path from an imports_from fingerprint. @intent provide a stable parser for import-edge-specific diagnostics and filtering.
func IsLikelyExternalImportEdge ¶
IsLikelyExternalImportEdge reports whether an imports_from edge likely points to an external module that is intentionally expected to remain unresolved. @intent classify import edges that are not expected to have local resolution targets.
func IsLikelyExternalImportPath ¶
IsLikelyExternalImportPath returns true when an import path is most likely an external dependency (stdlib, third-party package, or alias-style module import) rather than a local repository path that should usually resolve during normal builds. @intent keep unresolved-edge noise focused on internal graph-coverage gaps.
func Resolve ¶
Resolve fills FromNodeID and ToNodeID for parsed edges when a unique local endpoint can be inferred from stored node positions and names. @intent convert syntax-level edge fingerprints into traversable graph edges.
func ResolveWithOptions ¶
func ResolveWithOptions(ctx context.Context, lookup NodeLookup, edges []model.Edge, options ResolveOptions) ([]model.Edge, error)
ResolveWithOptions resolves edges with optional lossy call-resolution strategies. @intent preserve current strict resolution by default while supporting fallback mode for CI noise reduction.
Types ¶
type FilterResolvedDiagnostics ¶
type FilterResolvedDiagnostics struct {
DroppedCount int
ByKind map[model.EdgeKind]int
ByFile map[string]int
ByReason map[string]int
Samples []FilterResolvedSample
}
FilterResolvedDiagnostics summarizes edges dropped because one or both endpoints remain unresolved. @intent surface enough aggregate context to debug why parsed edges did not become traversable graph edges.
func FilterResolvedWithDiagnostics ¶
func FilterResolvedWithDiagnostics(edges []model.Edge) ([]model.Edge, FilterResolvedDiagnostics)
FilterResolvedWithDiagnostics returns resolved edges plus a summary of dropped unresolved edges. @intent preserve current filtering semantics while exposing actionable diagnostics for build/update debugging.
func FilterResolvedWithDiagnosticsFiltered ¶
func FilterResolvedWithDiagnosticsFiltered(edges []model.Edge, filterUnresolved UnresolvedEdgeFilter) ([]model.Edge, FilterResolvedDiagnostics)
FilterResolvedWithDiagnosticsFiltered returns resolved edges plus diagnostics while letting callers suppress selected unresolved edges from the reported summary. @intent keep edge filtering behavior stable while controlling noise from known-unresolvable patterns.
type FilterResolvedSample ¶
type FilterResolvedSample struct {
Kind model.EdgeKind
FilePath string
Fingerprint string
Reason string
}
FilterResolvedSample captures one dropped edge example for debugging unresolved persistence candidates. @intent retain a bounded set of representative dropped edges so operators can inspect fingerprints without flooding logs.
type NodeLookup ¶
type NodeLookup interface {
GetNodesByIDs(ctx context.Context, ids []uint) ([]model.Node, error)
GetNodesByFiles(ctx context.Context, filePaths []string) (map[string][]model.Node, error)
GetNodesByQualifiedNames(ctx context.Context, names []string) (map[string][]model.Node, error)
}
NodeLookup provides the node reads needed to resolve parsed edge endpoints. @intent keep edge endpoint resolution independent of the concrete graph store.
type ResolveOptions ¶
type ResolveOptions struct {
FallbackCalls bool
}
ResolveOptions controls additional, lossy call-resolution behavior. @intent allow callers to trade strictness for coverage in low-confidence call cases.
type UnresolvedEdgeFilter ¶
UnresolvedEdgeFilter returns true when a dropped unresolved edge should be omitted from diagnostics aggregation while still being dropped from the returned edge list. @intent allow callers to suppress noisy unresolved-edge classes (e.g., expected external imports).