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.
This commit is contained in:
1 parent
ca04975d54
commit
da8003f6d4
310 files changed
+47552
-480
No files matched your search
@@ -0,0 +1,49 @@
|
||||
# Import compile commands and preserve their provenance
|
||||
|
||||
Task ID: T-PROVIDER-ROWS-007
|
||||
Role: astra_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Shared /home/faumaray/Projects/VoidLanguageServer, feat/implement-roadmap at ca04975, dirty files authorized. Primary native descriptor build.cpp, optional CMake verification, VoidLibrary main 7d7d23e. T-PLAN-006 verified VBS 6c225c2 selector/status/generations and actual compdb rows. Build/Model.hpp, Workspace/{Configuration,Trust}.hpp and Protocol/Json.hpp are implemented. Root owns build/test registration, CLI, session, docs and integration. No shared tree branch switches, Git mutations, sibling writes, child agents or independent user messages.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Implement the shared compilation database row reader used by both VBS and compdb. Emit deterministic one-TU contexts and bounded, compiler-specific response-file handling.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Passive data normalization and classification only. No shell, compiler, actual query, managed aliases or provider publication. No synthetic identities or authoritative missing fields.
|
||||
|
||||
## 4. Files to inspect
|
||||
Read Build/Model.hpp, Workspace/{Configuration,Trust}.hpp, src/Workspace/Trust.cpp, Protocol/Json.hpp, roadmap 07, T-PLAN-006. Read only actual VLS-generated build/bootstrap/compile_commands.json and a generated VBS compdb inside build/native-validation for representative rows. Exact schema primary source https://clang.llvm.org/docs/JSONCompilationDatabase.html.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: src/Build/CommandImport.cpp; tests/build/CommandImportTests.cpp
|
||||
No shared header edits. Root owns Providers.hpp. Coordinate needed support contracts before use.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Bound bytes, rows, tokens, depth, argv expansion and aggregate retained inputs before huge DOM allocations. Consider per-row structural slicing with quoted-string/escape handling and strict Void JSON per complete row; preserve the exact raw row. Reject malformed database structures atomically; keep recognizable but unsupported rows as explicit passive status with unknown semantic argv. Prefer typed arguments over command; malformed supplied arguments must not silently fall back. Linux quoted command tokenizer supports compdb documented double/backslash form and bounded explicit POSIX subset; never evaluate shell substitutions or expand globs/env. Against supplied real, same-root/compiler-purpose driver evidence apply its response grammar and recursive @ expansion relative to invocation cwd, detect cycles by file identity, bound aggregate bytes/tokens/depth, retain response inputs. For no driver leave response/unsafe argv as explicit unknown. Strip verified compile-only -o argument/output from semantic copy, retain original, normalize only understood flags and operands; do not alter forced-include/search semantics. Call existing Trust classifier before exposing runnable-view semantics, preserve all flags including unsupported reasons. No executable lookups based on submitted records.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
NEW namespace Void::LanguageServer::Build. Root owns Providers.hpp. ProviderScope contains WorkspaceIdentity workspace, optional absolute exact_database, exact_selector, build_root, producer_cwd (root-bound launcher grants only) and Workspace::ResourceLimitsConfig limits. enum FilePurpose {selection,status,database,response}; read_provider_file(scope,path,purpose,byte_limit) returns expected<ProviderFile,ProviderIssue>; provider_file_current(scope,file) revalidates identity. ProviderFile has purpose, logical_path, canonical_path, bytes, content_id, stamp; stamp binds admission root, opened object and selected name. ProviderIssue has string code,message and filesystem::path path. DatabaseInput has const ProviderScope& scope, const ProviderFile& database, optional<string> profile, optional<DriverInput> driver; DriverInput holds a workspace/purpose/generation checked Workspace::ToolCheck and Workspace::CompilerDriver, plus known wrapper spellings. import_commands(const DatabaseInput&) returns expected<ImportedCommands,ProviderIssue>; ImportedCommands has vector<BuildContext> contexts, vector<ProviderFile> dependencies and string revision. ProviderObservation has string provider, optional<uint64_t> selection_ticket, optional<string> profile, Generation generation, vector<ProviderIssue> issues and vector<ProviderFile> inputs; fresh is a generation without blocking issues (row limitations stay in context). observe_vbs(scope, selector_path, optional<DriverInput>), observe_compdb(scope, database_path, optional<DriverInput>) return ProviderObservation. Root owns latest sequenced publication and revalidation at install. All reads are passive. Concrete spelling in forthcoming header coordinated by root after preflight.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
ProviderFile implementation arrives concurrently. Reuse only its validated read + revalidation; no separate path IO for metadata or @files. Root wires tests. Use original directory of logical selected database to resolve a relative row directory; subsequent relative row paths use invocation cwd. Test command-only, arguments, and actual VBS repeated flags with -o.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
T-PREFLIGHT-007 amendments. Use the actual Providers.hpp, same_provider_object for recursion-stack identity, and exact logical spelling for each retained observation. Before reading any response file, verify that the raw wrapper/compiler prefix matches the supplied real compiler pin for this root/purpose/driver. A mismatched compiler yields zero response-file reads. After classification require the only normalized TU to equal row.file; strip -o only at a verified option boundary, resolving/checking optional row.output against the same cwd. Reject symlink-sensitive ".."/search operands from semantic promotion. A row for A that compiles B keeps its original evidence and a limitation. Test that case, an unmatched compiler with a benign @response body, repeated legitimate nonrecursive @File, a hard-linked cycle, -o consumed as another option's operand, and repeated flags. Never turn allowlisted rows into independent execution approval.
|
||||
Context alternative identity must survive row reordering, preserve multiplicity of identical rows with ordinal and conflicting options. Bound strings, extension nesting, escaped quotes, response byte amplification, option argument counts, generation memory. Preserve unknown v1 source mappings and edit origins when evidence is missing. Any hash collision requires detection or structurally unambiguous identity. Include raw bytes in original_record, including unsupported extension fields.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
CommandImport suite exercises valid/invalid args/command, relative db/cwd and Unicode, multiple duplicate/conflicting entries, benign shell markers (remain inert), unsupported drivers/options, -o/forced includes, GCC/Clang response quoting and cwd, self and indirect cycles, size/depth/token limits, changed response, wrong-root/purpose driver and stable alternatives across ordering. Successful real CMake and VBS rows can be read without authority with explicit limitations.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Use git status --short --branch, scoped graph coverage plus direct reads, dev cpp-gcc -c g++ -std=c++26 -freflection -Iinclude -Ibuild/voidlibrary/current/include -fsyntax-only on the owned sources and tests, then link/run the actual Void::Testing suite in a private build subdirectory. Use dev cpp -c clang-format --dry-run --Werror on owned C++ paths. List the cases via --list --no-color. Root owns the two shared build trees.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Contact root before introducing a new parser for JSON values, guessing a driver from a basename, changing the Trust classifier or accepting a fallback with hidden semantics. After two failures change hypothesis with root.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
D-022/D-027 and planner review. Compiler-specific normalization is optional only where real driver identity is absent. Never grant execution from this module.
|
||||
|
||||
## 14. Return format
|
||||
T-PROVIDER-ROWS-007 DONE/PARTIAL/BLOCKED, actual accepted/rejected grammars/tests/limits, real row evidence and unresolved integrations.
|
||||
Reference in new issue
Block a user