Documentation
¶
Overview ¶
@index Full graph build pipeline: spool, batch persistence, and edge resolution.
@index Filesystem walking, per-file parsing, and unreadable-file accounting.
@index Existing-graph file-state loading and change/force detection.
@index Graph building service that orchestrates parsing, persistence, and search indexing.
@index Language package discovery and package-level semantic edge maintenance.
@index Parse-result cache identity and serialization for repeatable full builds.
@index Disk-backed spool records used to bound memory during build and update.
@index Unresolved-edge index compatibility identity for safe semi-naive updates.
@index Incremental update pipeline: spool replay, deletions, and affected-node tracking.
Index ¶
- func CheckParseFileSize(relPath string, size int64, maxFileBytes int64) error
- func CheckTotalParsedBytes(relPath string, current int64, next int64, maxTotalBytes int64) error
- func ExistingGraphFiles(ctx context.Context, graphStore ingest.GraphStore) ([]string, error)
- type BuildOptions
- type BuildResolveOperationTiming
- type BuildResolveTiming
- type BuildStats
- type BuildTiming
- type CrossRefSyncer
- type IncrementalSyncer
- type Parser
- type Service
- type UnreadableFilesError
- type UpdateOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckParseFileSize ¶
@intent reject individual files that exceed the configured per-file parse budget before loading them into memory.
func CheckTotalParsedBytes ¶
@intent stop one build or update pass once cumulative parsed bytes would exceed the configured safety limit.
func ExistingGraphFiles ¶
ExistingGraphFiles returns namespace-scoped graph file paths currently stored. @intent share deletion-scope discovery across CLI and MCP incremental updates
Types ¶
type BuildOptions ¶
type BuildOptions struct {
Dir string
NoRecursive bool
ExcludePatterns []string
IncludePaths []string
MaxFileBytes int64
MaxTotalParsedBytes int64
SkipSearchRebuild bool
FallbackCalls bool
}
BuildOptions configures one graph build run. @intent 빌드 대상 경로와 탐색 범위를 호출자에서 제어하게 한다.
type BuildResolveOperationTiming ¶
BuildResolveOperationTiming reports one resolver operation's call count and elapsed time. @intent show which edge-resolution store operation dominates a full build without changing resolution behavior.
type BuildResolveTiming ¶
type BuildResolveTiming struct {
Resolver BuildResolveOperationTiming
NodesByIDs BuildResolveOperationTiming
NodesByFiles BuildResolveOperationTiming
NodesByQualifiedNames BuildResolveOperationTiming
ImportFileNodes BuildResolveOperationTiming
EdgesToNodes BuildResolveOperationTiming
UpsertEdges BuildResolveOperationTiming
}
BuildResolveTiming breaks edge resolution into resolver, store-read, and edge-write operations. @intent expose actionable evidence for optimizing the remaining full-build bottleneck.
type BuildStats ¶
type BuildStats struct {
TotalFiles int
TotalNodes int
TotalEdges int
Unresolved resolve.FilterResolvedDiagnostics
Timing BuildTiming
}
BuildStats reports how much content a build processed. @intent CLI와 호출자가 빌드 결과 규모를 사용자에게 보여줄 수 있게 한다.
type BuildTiming ¶
type BuildTiming struct {
ParseMS int64
ParseCacheHits int
ParseCacheMisses int
PersistNodesMS int64
ResolveEdgesMS int64
SearchRebuildMS int64
TotalMS int64
Resolve BuildResolveTiming
}
BuildTiming reports elapsed milliseconds for the major full-build stages. @intent expose actionable stage-level evidence so large-build regressions can be diagnosed without guessing.
type CrossRefSyncer ¶
CrossRefSyncer rebuilds cross-namespace reference state after an ingest commit. @intent let build/update trigger cross-ref materialization without depending on its implementation.
type IncrementalSyncer ¶
type IncrementalSyncer = ingestapp.IncrementalSyncer
IncrementalSyncer defines the sync operation Service.Update delegates to. @intent keep filesystem/build policy in service while preserving the existing incremental engine
type Parser ¶
Parser defines the minimum parser behavior required by graph builds. @intent let CLI, MCP, and tests share the same build policy with their parser implementations
type Service ¶
type Service struct {
Store ingestapp.GraphStore
UnitOfWork ingestapp.UnitOfWork
Search ingestapp.SearchWriter
ParseCache ingestapp.ParseCache
Walkers map[string]Parser
Parsers map[string]Parser
CrossRefs CrossRefSyncer
Logger *slog.Logger
// contains filtered or unexported fields
}
Service orchestrates graph building and search document refresh. @intent 파싱 결과 저장과 검색 인덱스 재구성을 하나의 서비스로 묶는다.
func (*Service) Build ¶
func (s *Service) Build(ctx context.Context, opts BuildOptions) (BuildStats, error)
Build walks source files, stores parsed graph data, and rebuilds search docs. @intent perform a full graph build from the specified directory. @sideEffect 파일 시스템을 읽고 그래프 저장소·DB·검색 인덱스를 갱신한다.
type UnreadableFilesError ¶
type UnreadableFilesError struct {
Files []string
}
UnreadableFilesError signals that the update path encountered files it could not stat or read while FailOnUnreadable was enabled. @intent give webhook/server callers a structured failure they can surface instead of silent partial sync
func (*UnreadableFilesError) Error ¶
func (e *UnreadableFilesError) Error() string
Error formats the unreadable file failure with a count and a representative sample path. @intent give operators a stable, single-line summary they can grep instead of dumping every path.
type UpdateOptions ¶
type UpdateOptions struct {
BuildOptions
Syncer IncrementalSyncer
Replace bool
FailOnUnreadable bool
}
UpdateOptions configures one incremental graph sync run. @intent reuse Service traversal and parse limit policy for CLI and MCP updates