Files
Language-Server/docs/roadmap/16-navigation-rename.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

38 lines
3.5 KiB
Markdown

# 16 — Navigation, references and guarded rename
Status: A bounded navigation and guarded-rename library with a registered suite is implemented and wired to references/prepareRename/rename. Client buffer-transaction application, cross-context rename coverage and live editor integration remain open.
Requirements: R-013,R-014,R-015,R-020
Dependencies: 03,05,09,12,15; guarded application requires22/23 client contracts.
## Ownership and boundaries
Proposed Astra for rename coverage/transaction contract, Sol for bounded navigation adapters. NEW src/features/navigation/, src/features/rename/, tests/navigation/, tests/rename/.
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
Navigation resolves semantic identity within the selected context and may expose clearly labeled generated origins. Rename covers all declared workspace roots and affected provider-exported contexts, including inactive profiles/targets; it does not promise unknown external-consumer coverage. Only reliable editable origins may receive edits.
## Implementation sequence
1. Implement declaration/definition and reference queries through compiler identities plus index completeness. Preserve overload/module/context distinctions and generated/source origin navigation.
2. For rename, compute affected bindings/contexts, analyze missing coverage on demand and check conflicts, visibility and spelling changes. Reject incomplete/stale context or synthesized names without deterministic editable spelling.
3. Have supported clients materialize affected closed files as editor buffers, synchronize the complete version vector, then recompute edits. Preserve document versions/content preconditions in the final transaction.
4. Apply only through tested transactional BUFFER behavior and recheck preconditions at application. Refuse multi-file rename where the client cannot guarantee this; file saving remains an editor operation.
## Failure behavior and constraints
Do not return an apparently complete reference set when coverage is unknown. Conflicting bindings across contexts, macro ambiguity, generated-string names or external read-only targets reject unsafe edits. Late edits invalidate the transaction; no unversioned closed-file fallback or filesystem-atomic claim.
## Acceptance scenarios
1. Navigate overloaded/template/module/reflection symbols across Library/VBS boundaries and distinguish genuinely empty from incomplete references.
2. Use shared headers with conflicting profile bindings, incomplete index, generated names and readonly origins; verify explicit refusal.
3. Race edits between preparation/response/apply, inject buffer-transaction failure and verify no partial edits in both Neovim and VS Code integrations.
## Verification and integration
Proposed NEW CTest label: `navigation-rename`. Once implemented, register a nonzero suite and run:
```sh
dev cpp-gcc -c ctest --test-dir build/bootstrap -L navigation-rename --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.
Invalidate outstanding rename transactions whenever source/context/backend changes. Disable rename independently of navigation if client transaction guarantees regress; never undo unrelated user edits during rollback.