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

7.4 KiB

Read selected native VoidBuildSystem editor generations

Task ID: T-PROVIDER-VBS-006 Role: sol_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 passive VBS v1 generation observation against current real producer output. Make explicit what today's emitter supplies and what the proposed richer export still requires.

3. Scope and non-goals

v1 input consumer and its tests only. No invoking VBS, description/graph execution, alias shortcuts, lockfile mutation or changes to producer, state machine or CLI.

4. Files to inspect

See .vbs/editor_selection.json, build/native-validation/profiles/debug/editor/status.json and its referenced immutable compile_commands under this workspace only. Read source of committed producer build/tools/vbs-6c225-src/src/Editor/CompDb.cpp (sanitize_profile_dir, emit/status/select logic), T-PLAN-006, roadmap 06 and Build/Model.hpp.

5. Write ownership and coordination

Write scope: src/Build/VbsProvider.cpp; tests/build/VbsProviderTests.cpp Root owns public header, session, test wiring and shared model.

6. Implementation or investigation approach

Read bounded selection, profile status, immutable DB via scoped file reader. Validate schema_version, ticket, selected tuple, generation component and producer-sanitized profile component, status/profile/entry_count/path consistency; preserve readiness warnings. Use derive-and-verify exact profiles//editor/generations//compile_commands.json underneath an authorized root, never directly trust arbitrary producer pointers or aliases. Empty/reserved ticket can have no generation or retain previous tuple. Valid selected-generation observations recheck both pointers, DB and response dependencies before installation. A stale/invalid status may retain old id/path and omit count. Report explicit stale/missing/invalid/unsupported/ambiguous outcomes. Relative locators follow known producer-cwd or exact authorized build-root association and verified suffix; do not guess server cwd/selector parent or append build prefix twice. Forbid path traversal and misleading suffix-only checks when a supplied absolute or relative pointer actually conflicts. Same ticket may point at a new generation. No nonexistent target/host/MAP/module/retention facts; keep originals.

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 profile, optional 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 contexts, vector dependencies and string revision. ProviderObservation has string provider, optional<uint64_t> selection_ticket, optional profile, Generation generation, vector issues and vector inputs; fresh is a generation without blocking issues (row limitations stay in context). observe_vbs(scope, selector_path, optional), observe_compdb(scope, database_path, optional) 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

Call import_commands for rows. Root owns latest workspace publication, stale history, CLI/config. Produce only per-observation evidence including ticket/profile, selection+status+db+response file identities; when a coherent healthy read yields a generation keep generation identity sufficiently scoped to profile/build root/compdb/response bytes. Failure data keeps selector authority. Preserve record/observation limits.

9. Edge cases security and performance

T-PREFLIGHT-007 cleared this slice. The actual shared header is include/Void/LanguageServer/Build/Providers.hpp, including FilePurpose::native_database, shared immutable bytes and a distinct warnings list. Reject "." and ".." profile components; require original status.profile equality even if two spelling variants share a slug. Validate the producer's 16 lowercase hex digits and separately bind its database bytes. The preimage of its generation identity includes unavailable producer information. Synthetic fixtures under private temp only. Include two profiles, idle reservation, stale explicit selection, same-ticket change, mismatched profile, corrupt/dangling immutable reference, alias disagreement, failed/readiness state and no process launch. Preserve valid empty DB as zero rows where producer reports that. Use exact null/missing type handling and unsigned ticket conversion with range failure instead of casts.

10. Acceptance criteria

Nonempty VbsProvider suite covers native state transitions and paths above, including repeated-row alternatives, warning retention, manual invalid current with no alias fallback, absolute+relative forms. Demonstrate passive read on a real VLS-generated native generation after root integration. No claims of complete resolved export/artifact lifetime without a real emitter.

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

Stop if any required field cannot be determined from the real producer or a change to a sibling repo would be required. Missing rich metadata is a visible limitation, not reason to abort v1 status.

13. Authorization and decisions

Native first-class priority D-025; user authorized C++/VoidLibrary implementation on the separate branch only. Reuse helpers rather than run the producer.

14. Return format

T-PROVIDER-VBS-006 DONE/PARTIAL/BLOCKED, producer fields, supported path rules, actual tests, evidence gaps and integration contract.