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

52 lines
8.0 KiB
Markdown

# Represent build contexts and publish results against their exact inputs
Task ID: T-MODEL-005
Role: astra_implementer
Status: READY
## 1. Context and baseline
Work in /home/faumaray/Projects/VoidLanguageServer on feat/implement-roadmap (ca04975 with authorized foundation changes). T-PLAN-002 established the model order. T-PREFLIGHT-004 requires stable disk identity, owning translation units, ordered lookup evidence and readiness per operation. There is no existing build-model implementation. Read current files before writing.
## 2. Objective and deliverables
Implement the provider-neutral value model, selection and revision/publication boundary for roadmap 05. Supply native Void::Testing tests and the interfaces providers 06/07 should consume. Return a brief interface outline early so root can prepare provider contracts.
## 3. Scope and non-goals
Own only the new shared C++ build model and its focused tests. The root owns both build systems, session, provider adapters and cross-component wiring. Exclude processes, schema fabrication, compiler objects, database persistence and filesystem scans. Providers supply validated records and immutable data or specific unknowns.
## 4. Files to inspect
Inspect docs/roadmap/05-build-contexts.md, 06-native-vbs-tooling.md, 07-compilation-database.md, 09-semantic-workers.md, 16-navigation-rename.md and T-PREFLIGHT-004. Read include/Void/LanguageServer/Documents/{DocumentSnapshot,DocumentStore}.hpp and Workspace/{Trust,Configuration}.hpp. The document worker confirmed DocumentSnapshot::same_input_as(const DocumentSnapshot&) for overlay versus stable disk inputs. Verify the final signature before compiling integration. Read tests/FramingTests.cpp for native VOID_TEST style.
## 5. Write ownership and coordination
Write scope: include/Void/LanguageServer/Build/Model.hpp; src/Build/Model.cpp; tests/build/ModelTests.cpp
Other workers share this checkout. Create these NEW paths only, with scratch outputs under a unique build/model-005 directory. Never change branch, generated project state, others' work, or shared build files. Root registers targets and tests.
## 6. Implementation or investigation approach
Implement immutable generation records and deterministic selection among all candidates for a source/owning TU. Preserve provider/target/profile and host-description versus target roles. Prefer verified explicit per-file override, then editor selection, then a documented deterministic fallback; keep a missing explicit override visible with typed unresolved status. Preserve structured override values suitable for the configuration owner; avoid writes during a model lookup. Keep original argument tokens/command distinct from analyzed tokens, provenance, cwd, selected toolchain/stdlib/environment identity, source mappings, missing metadata, prerequisite and artifact lifetime. Distinguish known-empty from unknown facts. Keep selection identity monotonic for A→B→A. Check equality of full values or canonical identities with collision-safe comparison; never derive identity by joining unescaped argv strings.
## 7. Interfaces and data contracts
NEW Build model (exact C++ naming is local discretion) represents a retained generation, context alternatives, workspace/session identity and selection revision. Inputs bind the actual owning TU, source language and source mapping even when the requested document is a header. AnalysisRevision captures the document and dependency origins/content, relevant overlay/lookup epoch, workspace/provider/generation, context/selection, configuration, trust and backend/protocol. Use retained DocumentSnapshot::same_input_as or an equivalently stable key. Disk rereads with identical path/content and overlay epoch are equal. A reopened overlay with the same text is different. Bind ordered include/import search misses or a conservative monotonic invalidation epoch covering changes to all lookup roots. Readiness is operation-specific. Diagnostic/status data may be degraded with evidence; authoritative rename needs proven provenance, editability and complete affected contexts. Define any required unknown input as explicit. Avoid pretending external trust or filesystem events are synchronized unless the caller has supplied the corresponding state transition.
## 8. Dependencies and integration
Keep publication verification and installation in a single sequenced transition, with cancellation/issuance and request identity. Concurrent stale completions cannot replace a newer result or remain visible after invalidation. Deliver a small backend-neutral immutable publication/token boundary that preserves validated data without callbacks that can re-enter under locks. Explicitly document how the owner supplies current input/revocation transitions. No AST pointers or global process authority. The Documents worker owns the snapshot contract. The trust owner supplies an opaque monotonic authority generation. Root links sources in VBS and comparison CMake after handoff. Providers 06 and 07 start only after this shared API is frozen.
## 9. Edge cases security and performance
Reject invalid or duplicate context keys, unrelated roots and missing input identities before authoritative use. Preserve unsorted/duplicate original command tokens as meaningful data. Bound publication bookkeeping to active requests or discard completed/cancelled work; avoid retaining every historical result unboundedly. Keep immutable generations alive while in use. Selection/configuration/trust generations cannot be reused on an ABA transition. Do not copy full source content just to compare inputs.
## 10. Acceptance criteria
1. Select two targets/profiles with conflicting defines for one source/header and retain all alternatives. Test explicit, missing and cleared override, deterministic reorder, host context and owning-TU differences.
2. Show unchanged reread can complete, same-text reopen and negative lookup invalidation reject old results, import/mapping/env changes distinguish inputs, and retention keeps the original generation alive.
3. Test cancellation/revocation and A→B→A between issue and completion, reverse completion/overlapping requests, atomic invalidation of current results, and bounds or retirement of outstanding tickets.
4. Assert incomplete metadata permits only the represented diagnostic/status capabilities and denies authoritative rename. Return all original test names and independent actual results.
## 11. Verification commands and evidence
Use git status --short --branch, read selected sources and check graph coverage where indexed. Run dev cpp-gcc -c g++ -std=c++26 -freflection -Iinclude -Ibuild/voidlibrary/current/include -fsyntax-only src/Build/Model.cpp tests/build/ModelTests.cpp. For executing tests use the tested local native libraries under build/native-validation/profiles/debug or comparison build/bootstrap; inspect real paths/symbols before linking. Coordinate with root if the final Documents implementation is required for runtime tests. Report actual runner --list, case count/exit and exact link/run commands. Run dev cpp -c clang-format --dry-run --Werror on the three owned C++ files.
## 12. Constraints and stop conditions
Stop and notify root for an incompatible Documents API, cross-owner writes, unresolvable historical input semantics, or two failed trials of the same repair. Preserve useful independent implementation and tests. Never silently reduce authoritative coverage or couple the model to a candidate compiler.
## 13. Authorization and decisions
The user approved all plans on a separate branch and GPT-6.2 family at Max, including generic runtime for the stricter effort setting. This difficult shared correctness boundary is assigned to Astra. No staging, commits, remote writes or sibling changes. No children and no independent user messages.
## 14. Return format
T-MODEL-005 DONE/PARTIAL/BLOCKED, exclusive paths changed, concise interfaces for providers, decisions about equality/readiness and caller obligations, executed commands, case names/counts/results, open integration prerequisites or defects. Root owns integration and independent review.