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

115 lines
9.7 KiB
Markdown

# Check native build and document foundation contracts before integration
Task ID: T-PREFLIGHT-004
Role: astra_reviewer
Status: READY
## 1. Context and baseline
/home/faumaray/Projects/VoidLanguageServer, feat/implement-roadmap at ca04975, with existing untracked Protocol/Documents/Workspace files and a small CLI repair. GPT-6.2 Astra at Max under D-027. Scope derives from roadmap 01/02/03/04/05/26. Planner T-PLAN-002 provides the dependency/invariant map appended to this assignment before dispatch.
## 2. Objective and deliverables
Read-only preflight of proposed native build, document, trust, protocol and build identity contracts. Return separate immediate verdicts per slice. Identify contradictions that prevent a worker from implementing the actual scope or undermine the next consumer. Provide precise corrections.
## 3. Scope and non-goals
Contract preflight for the next independently owned packages. The bootstrap numeric review T-REVIEW-003 found real precision/range issues. Preserve the upstream JSON contract and surface any prerequisite separately. Final diff review and compiler gate 08 are separate stages.
## 4. Files to inspect
Read docs/agent-workflow/tasks/T-{PLAN-002,NATIVE-001,DOCS-003,TRUST-004}.md, docs/roadmap/{01-bootstrap-dependencies,02-lsp-protocol-lifecycle,03-documents-positions,04-workspace-configuration-trust,05-build-contexts,26-vbs-self-build-adoption}.md, the actual headers in include/Void/LanguageServer/{Protocol,Documents,Workspace}, their sources and existing src/{Server,main}.cpp, tests/{TestSupport.hpp,Registration.cmake}. See current native seed build/tools/vbs-6c225-{src,bin} and evidence in VERIFICATION.md.
## 5. Write ownership and coordination
Write scope: none
Shared checkout, no edits or branch changes, no writes to dependencies, global config or generated metadata. Root owns docs, integration and fixtures. There is no need to execute arbitrary repository inputs. No children or messages to the user.
## 6. Implementation or investigation approach
Inspect actual interfaces and the planner's proposed evolution. Check native dependency source preparation, clean/offline/update behavior, lock/selection files, the CMake trap, same-profile child executable and registration. Check LSP negotiation, positional boundaries, nonmonotonic versions, malformed known-document payloads, atomic edits/recovery, URI aliases, overlay/disk races, memory budgets. Review configuration provenance, path validation, revocation, tool identity and trust-generation boundaries. Check proposed BuildContext/AnalysisRevision for missing provenance, invalidation or stale publication. A blocking defect in one slice should have a bounded scope.
## 7. Interfaces and data contracts
VBS 6c225c2 supplies ordinary Project targets, path/native_builder and CLI test/install. A native Void::Testing macro probe passed using Configuration, Data, Unicode, System, Testing. Existing LSP server currently advertises empty capabilities. New sync needs actual handlers, immutable snapshots and observable session tests. Cross-component revision should carry document, provider/generation, header/dependency, backend and trust identities. Never expose capabilities before wires and tests exist.
## 8. Dependencies and integration
Root will dispatch only accepted independent slices and serialize shared headers/build/test wiring. Final review uses a fresh reviewer. Check the original user choices D-021 through D-027. These decisions supersede historical bootstrap-only and XHigh notes.
## 9. Edge cases security and performance
Inspect boundedness of text operations/representation, cache and tool provenance, repeated/failed acquisition and no implicit project command execution. Distinguish permission to read metadata from process invocation. Reject stale/partial results and ambiguous authoritative identities.
## 10. Acceptance criteria
1. READY/CHANGES_REQUIRED/INSUFFICIENT_EVIDENCE per immediate slice.
2. Reproducible or reasoned failure scenarios with specific contract amendments and verification hooks.
3. Disjoint ownership and dependency order including which tasks may start immediately after root disposition.
4. Identify any dependent decision that is genuinely required from the user.
## 11. Verification commands and evidence
Use read-only git status --short --branch, git diff ca04975 -- src/main.cpp, source reads and scoped graph coverage. Root observed CTest 4/4 entries, 37 bodies and two clean native probes. Existing probe binaries and artifacts are in build/vbs-native-probe and build/vbs-framework-probe. No rebuild is required for a contract review.
## 12. Constraints and stop conditions
Stop before scope expansion or unauthorized changes. Do not request pre-implementation proof that only the implementation can supply. Distinguish an upstream blocker from independently actionable work. Return the native-only verdict early if other slices take longer.
## 13. Authorization and decisions
Full roadmap authorized. User explicitly prioritizes primary VBS, separate branch and GPT-6.2 family at Max for all assignments. Planning, preflight, integrated tests and fresh final review remain mandatory. Root handles disposition.
## 14. Return format
Return T-PREFLIGHT-004 with a per-slice verdict, P0-P3 findings, exact locations/triggers/remediation/tests, ownership and unresolved prerequisites; no files changed. Do not spawn children.
### T-PLAN-002 output for preflight and root decisions
The planner verified the source and recommends native parity, checked protocol
consolidation, independent document and workspace owners, then LSP synchronization
and the context/revision model. Providers 06/07 follow model freeze.
* Native: atomically prepare a usable generation of upstream main in build/,
retain the old one on failure, and capture its resolved path per build.
Keep CMake out of every VLS action. Use real native targets and VOID_TEST.
Preserve names and discover the running test's sibling vls without PATH/cwd.
Inspect project-side VBS state and preserve pre-existing compdb/links.
Root added two ordinary regressions to JsonCapabilities after T-REVIEW-003,
for 39 cases. The original 37 should still pass. Report upstream failures
from these two in both builds and retain their nonzero exit.
* Protocol: one canonical Protocol facade with legacy vls forwarding. Use
checked StrictJson::serialize, retain maximum header/body/depth limits,
propagate encoding failure before framing. The exact-ID/range gate requires
upstream numeric provenance (R-003). Read-only APIs cannot recover it from
a rounded double. Do not widen this prerequisite to block native or documents.
* Documents: scope URI bindings to an open incarnation. Keep physical paths
separate from client URIs. Ambiguous path-only overlays cannot be authoritative.
Changes/close still identify the open URI after a symlink retarget. Track the
highest observed version independently of last applied; require a newer full
replacement or balanced close/open after desync. Recheck overlays after disk
I/O (including errors and open/close ABA). Read regular files with a bound.
Session encoding is fixed; character beyond line clamps, impossible lines and
split characters fail. Expose optional disk client version and explicit origin.
Root proposes 16 MiB per document, 128 MiB shared snapshot/index admission,
4096 open docs and 4096 changes per notification. Return typed refusal at limits
and measure memory for edits. Pin old snapshot references until released.
* Workspace: launcher explicitly selects an absolute user configuration; no
autodiscovered repository file can grant trust. Permission kinds distinguish
passive read, metadata refresh, compiler use and one explicit project action.
Bind selected spelling, canonical file, digest and generation. Revalidate a
pinned identity before a real launch in its future owner. Release locks before
callbacks. Relative paths resolve against the owning configuration, and
workspace resource preferences cannot increase runtime ceilings.
* Session: a single DocumentStore serves initialized-session notifications.
Advertise just openClose, incremental change and negotiated positionEncoding.
Default to UTF-16 and select the first supported offered encoding. Validate
signed LSP integers and complete notification arrays before applying. Known-URI
failed changes desynchronize. Report bounded stderr diagnostics with silent
notifications. Require a real subprocess transcript where ignoring edits fails.
* Model: BuildContext retains workspace/provider/immutable generation, profile,
target/alternative, host vs target role, original & semantic argv/cwd, compiler/
stdlib/env identities, source mappings, readiness/retention and unknowns.
ContextSelection preserves alternatives and monotonic revision including A-B-A.
AnalysisRevision includes workspace/session, document identity/incarnation,
version/content/revision, context, provider/selection/config/trust generations,
backend and transitive inputs. A publication gate compares and commits atomically
and refuses cancelled/stale/incomplete work. Test identical-text reopen, stale
selection/revocation, changed imports and competing header contexts.
### Review of the amended session and model contracts
The initial verdict accepted native preparation, protocol, documents and trust.
Review only the corrections in T-SESSION-003 and T-MODEL-005, supplied in full.
Validate stable disk versus overlay equality, owning TU, negative lookup evidence,
operation-specific readiness and atomic publication. For the session check LSP
integer bounds, absent versus null ranges, a failed late change and the
observable astral edit transcript. Return READY or a specific remaining
blocking amendment for each. This is a continuation of the read-only review.