Files
faumaray ca04975d54 bootstrap
Signed-off-by: faumaray <faumaray@gmail.com>
2026-11-25 02:11:19 +03:00

3.3 KiB

16 — Navigation, references and guarded rename

Status: PLANNED; no implementation claim 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:

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.