refactor(scip): single-pass SCIP architecture#189
Merged
Conversation
… source stage ScipSourceStage now populates enrichment metadata (resolved_type_signature, resolved_return_type, definition_uri, definition_path) inline during its single pass over the SCIP index, eliminating the need for a separate ScipEnrichmentStage. Changes: - scip-source.ts: INSERT statements now include enrichment columns; type signatures and definition locations are computed from symbolInfoMap/symbolDefinitions that are already in memory - Removed ScipEnrichmentStage from both build() and update() pipelines - Removed ScipEnrichmentStage from barrel exports (stages/index.ts, src/index.ts) - ScipSourceStage now sets context.scipCoveredLanguages so LspEnrichmentStage skips SCIP-covered languages (previously set by ScipEnrichmentStage) - Updated doc comments across pipeline.ts, index.ts, and scip-source.ts The scip-enrichment.ts stage file is retained on disk for backward compatibility but is no longer wired into the pipeline.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #189 +/- ##
==========================================
- Coverage 87.88% 87.76% -0.12%
==========================================
Files 77 76 -1
Lines 8575 8525 -50
Branches 2697 2695 -2
==========================================
- Hits 7536 7482 -54
- Misses 1039 1043 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add tests verifying that ScipSourceStage populates enrichment columns (resolved_type_signature, resolved_return_type, definition_uri, definition_path, definition_line) inline for: - symbols (with signature extraction and return type parsing) - call refs (with callee definition metadata) - type refs (with type definition location) - relationships (with target definition location) Also verifies scipCoveredLanguages is set on the context.
…ScipIndexerStage - Delete src/indexer/stages/scip-enrichment.ts and its test file entirely. This stage was dead code — enrichment is now handled inline by the single SCIP indexer pass. - Rename ScipSourceStage → ScipIndexerStage (file: scip-source.ts → scip-indexer.ts) to reflect its role as the single SCIP indexer stage. SourceIndexStage then enriches SCIP-sourced files with tree-sitter metrics (complexity, nesting, params) before storage. - Update all imports, exports, doc comments, log prefixes, pipeline instantiations, and test references.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Merges the SCIP enrichment stage into the SCIP source stage so that all SCIP data is computed in a single pass.
Problem
The SCIP pipeline previously ran in two stages:
resolved_type_signature,resolved_return_type,definition_uri, anddefinition_pathThis was redundant: both stages loaded the same SCIP protobuf data, and the source stage already had all the information needed to populate enrichment columns.
Solution
ScipSourceStagenow populates enrichment metadata inline during its single pass:resolved_type_signature,resolved_return_type,definition_uri,definition_pathcomputed fromsymbolInfoMap(already in memory)symbolDefinitions+symbol- **symbol_refs**: same enrichment columns computed from de- **symb_uri/path/movedScipEnrichmentStagefrom both pipeline constructions | |src/indexer/stages/index.ts| Removed barrel export | |src/index.ts| Removed public API|src ||
src/indexer/pipeline.ts| Updated doc comments ||
tests/index.test.ts| Remove|tests/index.test.ts| Remove|tests/index.test.ts| Remove|tests/index.test.ts| Remove|tests/index.test.ts| Remove|tests/index.test.ts\e-helpers.test.ts(97 tests)scip-enrichment-stage.test.ts(9 tests — still works as standalone module)index.test.ts(14 tests — public API)indexer/index.test.ts(53 tests — integration)pipeline.test.ts(9 tests)