Files
Language-Server/docs/agent-workflow/tasks/T-REPAIR-PROVIDER-007.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

50 lines
7.6 KiB
Markdown

# Fix source ownership, independent metadata grants and exact VBS file locators
Task ID: T-REPAIR-PROVIDER-007
Role: astra_implementer
Status: READY
## 1. Context and baseline
Reviewer T-REVIEW-PROVIDER-007 reproduced three defects in actual installed/stdin queries on feat/implement-roadmap ca04975. Full integrated provider suite passes 36/36 but misses these. Existing provider preflight covered these ownership/scope boundaries; this is a correction under the approved design. User requests GPT-6.2 family Max and native VBS primary.
## 2. Objective and deliverables
Complete the remaining importer source path/driver response findings. Root has already corrected independent optional grant failure and VBS trailing slash handling and owns their tests. Implement observable regressions and test through actual session/model. Do not suppress legitimate contexts by dropping entire otherwise valid databases.
## 3. Scope and non-goals
Passive provider/model code and focused tests. No active compiler process invocation, no shared build wiring or docs, no changes to sibling producer. Preserve strict symlink policy for metadata acquisition and positive/negative evidence checks.
## 4. Files to inspect
Read original T-PROVIDER-{IO-007,ROWS-007,VBS-006,SESSION-007}, current src/Build/{ProviderFile,CommandImport,VbsProvider,Model}.cpp, include/Void/LanguageServer/Build/{Model,Providers}.hpp, src/WorkspaceSession.cpp, tests/providers/{CommandImportTests,ProviderFileTests,VbsProviderTests}.cpp, tests/workspace/ProviderSessionTests.cpp. Inspect actual Model.cpp prepare_context/BuildGeneration source indices and Documents URI physical identity. Root moved tests/build to tests/providers to support native snapshots.
## 5. Write ownership and coordination
Write scope: src/Build/ProviderFile.cpp; src/Build/CommandImport.cpp; src/Build/VbsProvider.cpp; src/Build/CompdbProvider.cpp; src/Build/Model.cpp; include/Void/LanguageServer/Build/Model.hpp; include/Void/LanguageServer/Build/Providers.hpp; src/WorkspaceSession.cpp; tests/providers/CommandImportTests.cpp; tests/providers/ProviderFileTests.cpp; tests/providers/VbsProviderTests.cpp; tests/workspace/ProviderSessionTests.cpp
Root has finished its corrections to ProviderFile.cpp and VbsProvider.cpp and releases these to you. Preserve those changes. Do not duplicate their tests. Use configuration/session/input-current propagation only where needed for the importer. All other files including CLI, process tests, both shared builds and docs are root/other owned. Minimize changes and coordinate if a new file is essential. Private build/provider-repair-007 for proof, no staging/commits/branches/network/external messages/further agents.
## 6. Implementation or investigation approach
For row.file `link/../x.cpp` with `link -> real/sub` and BOTH root/x.cpp and root/real/x.cpp, lexical normalization can publish false ownership. Preserve exact provenance; resolve crossing symlink parent components with trusted scoped metadata only and stable binding/revalidation, or represent uncertain TU as unselectable and retain context data. A model's necessary mapping for key.owning_tu cannot itself manufacture authority; if a resolution is withheld, all model lookups must respect that state. Direct normal rows, genuine missing generated TUs without path ambiguity and intentional equivalent links should not silently bind another file. Positively support simple symlink TU and physical identity when provable; revalidate alias change before installing, bound path work and avoid reading source contents or probing outside workspace authority. Include separate `directory` parent-step case. No fake source mappings or invented tool identities.
## 7. Interfaces and data contracts
Grant isolation: bind workspace root as mandatory; external exact metadata/build root failures attach to their own grants for the entire settings grant lifetime. Do not repin redirected names automatically on re-add/configure, and do not let unused external compdb/selector/build grants invalidate independently valid VBS or ordinary metadata. Only proven absent native selector may fall through to compdb. Retain real scope limiter, typed independent errors and immutable anchors. Reconsider reuse_provider_scope tests that previously required all grants simultaneously; check returned error for requested route and ordinary route remains available. VbsProvider::locator must distinguish directory names from file pointers, rejecting terminal '/', '/.' or '..' before normalization for both selected_compdb_path and status.compdb_path. Legitimate build directory spellings remain accepted.
## 8. Dependencies and integration
Root owns final validation/both shared descriptor files/stdin tests plus independent review. Reviewer still reading and may issue additional related requests; contact root before broadening. No change to normal producer wire. Existing new tests under tests/providers are the actual paths.
## 9. Edge cases security and performance
Prevent opposite failure: do not accidentally permit auto fallback on an unavailable external selector, reopen a newly created external parent, or reinterpret a non-direct/native generation alias. Negative lookups and prior/current generations scoped. Limit file descriptors/storage and work, ensure failed/retargeted path cannot restore prior physical mapping. Distinguish inode/path alias safely where practical.
## 10. Acceptance criteria
Additional verified checked-driver regressions from the independent reviewer: POSIX double-quoted -I"inc\\q" must preserve an ordinary backslash like typed argv; a missing @later.rsp that then appears invalidates prior partial observation; a workspace lexical -I directory symlink actually leading outside cannot yield typed search authority. Retain bounded negative response evidence through provider+session publication, distinguish missing vs denied, handle retargeting. Extend focused tests for all three.
Prove ambiguous link/../ path does not select innocent root/x.cpp, real/alias result positive if evidence is retained else documented unavailable for ambiguous route; simple stable alias maps appropriate physical TU; changing path during delayed publication cannot make old generation authoritative. Unavailable exact compdb parent + valid native stays ready both explicit and auto; native selector exact parent failure never falls through; directory replacement remains fail-closed for affected route across readd. Selector and status file ending slash/dot refused. Existing VBS, compdb, row, model, session regressions preserved.
## 11. Verification commands and evidence
Use dev cpp-gcc -c g++ -std=c++26 -freflection -Iinclude -Ibuild/voidlibrary/current/include -fsyntax-only for changed C++ files, focused runner linked with current sources into private build/provider-repair-007 or coordinate with root to use root-run CMake/VBS. Use dev cpp -c clang-format --dry-run --Werror scoped. Return enough details/root build-ready signal promptly. Record commands/actual exit; require real nonzero cases.
## 12. Constraints and stop conditions
Stop for scope expansion/new authority or incorrect model-wide assumptions. After two failed repairs give root distinguishing evidence and adjusted hypothesis. Do not demote user features to hide an unsupported alias; preserve honest status.
## 13. Authorization and decisions
Explicit implementation approval D-022, native priority D-025, confirmed family/Max D-027. Previously independent reviewer gave concrete real failures; root handles final review and release decisions.
## 14. Return format
T-REPAIR-PROVIDER-007 DONE/PARTIAL/BLOCKED, files, three disposition proofs, test evidence, missed edges and requirements for root tests. Send early stable APIs/build-ready notices.