Files
Language-Server/docs/roadmap/15-index-persistence.md
T
faumaray da8003f6d4 Implement the VLS roadmap on the native VBS build
Native VBS and CMake builds of the server and every registered suite:
protocol and document sync, VBS/compdb providers, stock GCC diagnostics
(including in-process default profile preparation), the stock occurrence
observer and hover/definition, the bounded Scheduler, C++ module graph,
scan and artifact cache with real CMI production, the context-aware
symbol index with schema-2 snapshot migration, navigation and guarded
rename, reflection provenance with splice-origin extraction, index-backed
completion and signature help, live GCC worker control with a registered
DAP suite, and the Neovim and VS Code clients.

VoidLibrary follows main. The private GCC 16.2.0 frontend is reproduced
from the versioned patches and verified stepping reflection/template code
with projected values 17/34 and 41/82.
2026-12-05 14:06:50 +03:00

3.1 KiB

15 — Context-aware symbol index and persistent generations

Status: A bounded context-aware index library with a registered suite is implemented (contexts, overlays, invalidation, generations, persistence, coverage). It is wired to workspace/symbol; migrations, cross-file rename coverage and a persistent backend remain open. Requirements: R-008,R-014,R-015,R-021 Dependencies: 03,05,09,10,12; coordinates16 coverage and11 dependency edges.

Ownership and boundaries

Proposed Astra schema/publication design, Sol bounded storage/query packages. NEW include/vls/index/, src/index/, tests/index/. Root owns migrations/schema. Future assignments must verify the then-current baseline and exact disjoint paths; these proposed scopes do not authorize work in another repository.

Contracts and data flow

Persist symbol identities, declarations/references, context membership, dependency edges, source content identity and provenance. Index generations record backend/schema versions and completeness domains. Valid empty query results differ from incomplete coverage. Use Void::Sqlite only after verifying transactional behavior and dependency packaging.

Implementation sequence

  1. Ingest compiler-produced symbol/reference records for explicit contexts. Separate unsaved document overlay records from committed disk generations and reconcile on save/close.
  2. Build incremental dependency invalidation for edits, added/deleted/renamed sources, include shadowing, provider/context removal and module graph changes.
  3. Publish completed batches transactionally, with crash recovery and bounded readers. Never hold a global storage transaction across compiler execution.
  4. Implement workspace symbol/reference queries, context filtering and completeness reporting. Rebuild incompatible versions into a new generation; account for disk quotas without evicting active readers' data.

Failure behavior and constraints

Corrupt/incompatible storage triggers quarantine/rebuild with visible status. Cancelled or partial indexing never marks coverage complete. A last-good index may support degraded navigation but cannot authorize rename when its coverage is unknown.

Acceptance scenarios

  1. Compare incremental results with clean rebuilds after edits, deletions, context switches and restored-mtime changes.
  2. Crash during ingestion/publication and validate recovery, reader lifetime and schema/backend rejection.
  3. Test same spellings/different bindings, unsaved overlays, generated provenance, completeness queries and disk quota handling.

Verification and integration

Proposed NEW CTest label: index. Once implemented, register a nonzero suite and run:

dev cpp-gcc -c ctest --test-dir build/bootstrap -L index --output-on-failure

This future command is not evidence that the label/tests exist now. Before dispatch, bind the fixtures above to actual targets and record prerequisites/side effects. Require fresh independent review of the implemented contract and affected integrations. Retain previous complete generations during migration, never rewrite incompatible bytes in place. Reverting storage/backend versions may require rebuilding rather than loading older assumptions.