Files
Language-Server/docs/agent-workflow/tasks/T-NATIVE-001.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

75 lines
9.0 KiB
Markdown

# Build, test and install the server with native VoidBuildSystem
Task ID: T-NATIVE-001
Role: sol_implementer
Status: READY
## 1. Context and baseline
Baseline /home/faumaray/Projects/VoidLanguageServer, feat/implement-roadmap at ca04975. The working tree includes the root CLI repair and user-owned foundations authorized for continuation. D-021 follows VoidLibrary main, tested at 7d7d23e. D-025 makes VBS primary. Root built a working VBS 6c225c2 seed from committed sources under build/tools/vbs-6c225-bin. A native Void::Testing test passed with all five dependency modules and a rejecting cmake at the front of PATH.
## 2. Objective and deliverables
Supply a usable, ordinary native VBS description for the server and its real tests. Provide an explicit dependency preparation/update path for upstream main and a separate local source override. Validate debug build/test and staged installation. Root will integrate the build of subsequent features.
## 3. Scope and non-goals
Native declaration, dependency management, real test registration and resolution of the built vls executable. Preserve the existing CMake bootstrap as a comparison build. Root owns README, application code, native tooling consumption and sibling repositories.
## 4. Files to inspect
Inspect CMakeLists.txt, cmake/VoidDependency.cmake, tests/CMakeLists.txt, tests/Registration.cmake and the five existing *Tests/Capabilities translation units. Inspect build/tools/vbs-6c225-src/{build.cpp,include/Void/Build.hpp,recipes/VoidLibrary/VoidLibraryRecipe.cpp}, build/bootstrap/_deps/voidlibrary-src/{cmake/VoidTesting.cmake,include/Void/Testing/Test.hpp}. T-PLAN-002 and the fresh preflight are binding.
## 5. Write ownership and coordination
Write scope: build.cpp; build.profiles.cpp; tools/prepare-voidlibrary; tests/FramingTests.cpp; tests/JsonTests.cpp; tests/LifecycleTests.cpp; tests/JsonCapabilities.cpp; tests/ProcessTests.cpp; tests/TestExecutable.hpp; tests/NativeRegistration.cpp; tests/CMakeLists.txt; .gitignore
These are exclusive only until handoff. Existing dirty cmake/VoidDependency.cmake is outside your scope. Do not change branches or stage, commit or push. The VBS tool generates runtime .vbs and vbs.lock. Ignore only generated root state and respect existing files/links. Build and install exclusively under build/native-validation and build/native-install. Other agents share the checkout. Keep schema, docs and all other source files with their owners.
## 6. Implementation or investigation approach
Use project.static_library/executable/test and the explicit C++26 and reflection settings. Link the actual Void modules through .native_builder on a path dependency. Use the built-in debug/release profiles if adequate. Populate a managed checkout of main by explicit preparation; select immutable revision for each build, retain real checkout provenance, fail clearly if missing. Never execute network/git inside build.cpp. Honor an explicit VLS_VOID_SOURCE_DIR development override. Distinguish source provenance for updates and overrides and prevent accidental modifications to arbitrary directories or the sibling checkout. Keep preparation short and use verified tools. Native VOID_TEST(suite,name) preserves existing names/assertions without a CMake scanner. Retain CMake test registration. Native subprocess tests must launch the sibling vls from the same output/profile. Add a native registration witness that checks the three inventories and executes the named body; never accept an empty suite. Use public native target edges and installation APIs.
## 7. Interfaces and data contracts
Existing targets vls_protocol, vls, vls_unit_tests, vls_json_capabilities and vls_process_tests. New build.cpp exports void build(Void::Build::Project&). Use native runtime location of the test executable (Linux supported) if the CMake VLS_EXECUTABLE definition is absent. NEW tools/prepare-voidlibrary documents its own usage and leaves the managed source usable by ordinary VBS commands. Preserve every test's suite/name and assertion semantics. Future suites must be addable without hardcoded machine paths.
## 8. Dependencies and integration
After preflight, you are sole owner of the native descriptor and changes to the five test declarations. Root will wait before wiring other components into build.cpp or adjusting test expectations. Existing bootstrap source linter/CTest and the VBS seed run in dev cpp-gcc. Tests added elsewhere by foundation tasks will be integrated by root. Return source paths and registration changes for the reviewer.
## 9. Edge cases security and performance
Main updates must preserve existing managed checkout consistency if offline, interrupted or concurrent. Prefer atomic publication of a complete source tree or an equivalent documented failure-safe preparation. A user-supplied override is read-only. Never copy an arbitrary sibling working tree or untracked files. Reject invalid override paths or wrong sources. Do not execute target metadata or add a CMake executable action. Preserve user-owned compile_commands.json. Test artifacts, dependencies and installs belong under this project's ignored build tree.
## 10. Acceptance criteria
1. Clean native run builds VLS dependency and test objects without invoking CMake or reusing CMake-built project libraries.
2. Actual native inventories contain at least the original 22+6+9 names without duplicates, and the named exact_frame_limits body executes. Preserve behavior for failed cases and empty inventories.
3. Native process tests launch this profile's actual vls. Help/version/stdio behave as before. Native install produces a working bin/vls.
4. Explicit local override and managed upstream-main paths are distinguishable. Existing CMake comparison remains green. Confirm which checks were observed and which root still needs to run.
## 11. Verification commands and evidence
From repo root the proven seed is build/tools/vbs-6c225-bin/bin/vbs. Use dev cpp-gcc -c with the executable and `test --project . --build-dir <absolute build/native-validation> --profile debug --jobs 4`. Use install --help to verify syntax and stage under build/native-install. For no-CMake proof put build/vbs-native-probe/trap at the front of PATH within dev cpp-gcc. Root demonstrated the same flags on two probes. List the resulting three test binaries with --list --no-color and run one with --filter '^FramingTests.exact_frame_limits$'. Compare original suite lists when present under build/bootstrap/tests. CMake comparison command: dev cpp-gcc -c ctest --test-dir build/bootstrap --output-on-failure after rebuilding. Format changed C++ files with dev cpp -c clang-format.
## 12. Constraints and stop conditions
Stop on unowned edits, a required VBS/Library patch, a request for global installation or two failures of the same repair. Capture command, stderr and a distinguishing hypothesis. If isolation is unclear, ask root before modifying another path. No cleanup outside unique owned scratch.
## 13. Authorization and decisions
D-021, D-022, D-024, D-025, D-026 and D-027. User authorized the full roadmap, branch, native builder and GPT-6.2 Sol with Max after escalation. Dispatch only after root supplies the preflight verdict. Interpret a passed subset accurately.
## 14. Return format
Return T-NATIVE-001 DONE/PARTIAL/BLOCKED, files changed, usable commands, test IDs and counts, fetched/override revisions, observed exit statuses, artifact locations and remaining defects. No child agents or independent messages to the user.
The resumed working tree now includes two additional root-owned ordinary tests
in tests/JsonCapabilities.cpp. Convert them along with the original declarations.
Current inventories are 22/8/9 (39 cases). T-REVIEW-003 found an upstream numeric
precision and range defect; preserve these failures and their exit status until
fixed. Native parity compares real case outcomes across both builds and requires
all original 37 to pass. Use `--list` to discover the exact working-tree baseline.
T-PREFLIGHT-004 correction, accepted by root. VBS snapshots path dependencies
recursively and chooses a dependency's build.cpp over its native Void recipe.
Hand VBS an immutable, project-owned source generation prepared from allowlisted
tracked build inputs only. Apply this to both upstream main and explicit local
overrides. Include real tracked C++ headers and the compiled sources for the
module closure; retain the src/Core directory used for recipe detection. Reject
a new tracked root build.cpp pending review and exclude untracked files/links,
dotfiles and unrelated paths. Do not point .path() at an external working tree.
Keep selected path, revision and relevant dirty/content identity in provenance.
An explicit local override should capture tracked source edits coherently or
reject a changing input cleanly. Publication is atomic. A build keeps its
resolved immutable generation even when another preparation selects a new one.
Check with benign untracked canaries, a tracked descriptor fixture and a failed
refresh that leaves the prior generation usable. These checks use isolated
fixtures. Make the managed generation path discoverable for root's integration.