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.
52 lines
7.0 KiB
Markdown
52 lines
7.0 KiB
Markdown
# Prepare immutable VoidLibrary source generations for the native VBS recipe
|
|
|
|
Task ID: T-NATIVE-PREP
|
|
Role: astra_implementer
|
|
Status: READY
|
|
|
|
## 1. Context and baseline
|
|
/home/faumaray/Projects/VoidLanguageServer on feat/implement-roadmap at ca04975, shared checkout. T-NATIVE-001 Sol terminated on provider HTTP 429 before writing files. T-PLAN-002 is complete. T-PREFLIGHT-004 cleared the native build subject to restricting VBS path input to prepared tracked sources. Root now owns build.cpp and the test migration. This separate assignment owns only the more demanding dependency acquisition/publishing boundary.
|
|
|
|
## 2. Objective and deliverables
|
|
Implement tools/prepare-voidlibrary to prepare VoidLibrary main or an explicitly selected local checkout as a coherent, immutable source generation. The normal VBS descriptor reads build/voidlibrary/current, a symlink to build/voidlibrary/sources/<64-lowercase-hex-digest>. Give root usable commands and verify source-only safety and update behavior.
|
|
|
|
## 3. Scope and non-goals
|
|
Dependency preparation, provenance and its targeted integration checks. Root implements native compile/install/test targets. No changes to VBS/VoidLibrary source, checkout or configuration. Keep the implementation small, understandable and Linux-compatible. A short Python stdlib or shell utility is appropriate for explicit developer preparation.
|
|
|
|
## 4. Files to inspect
|
|
Read docs/agent-workflow/tasks/T-NATIVE-001.md including T-PREFLIGHT-004 correction. Inspect build/tools/vbs-6c225-src/src/Package/Fetch.cpp:145, src/Provider/Provider.cpp:1046 and recipes/VoidLibrary/VoidLibraryRecipe.cpp. VBS recognizes a prepared VoidLibrary by include/Void and src/Core, and chooses a root build.cpp over the native recipe. Existing main 7d7d23e. No broad scans of live sibling or ignored state.
|
|
|
|
## 5. Write ownership and coordination
|
|
Write scope: tools/prepare-voidlibrary; tests/native/Preparation.py
|
|
Your sole production-owned file is the preparation tool. Optional named test file covers meaningful update/race/provenance behavior. Ignore scratch under build/preparation-check. Root owns build.cpp, registry and all other files. No staging/commits/branch changes in this repo or any existing repo. No interaction with global configuration or project-side compdb.
|
|
|
|
## 6. Implementation or investigation approach
|
|
Resolve official https://git.faumaray.com/Void/VoidLibrary.git main explicitly, never a committed SHA. Support VLS_VOID_SOURCE_DIR (or --source plus the same env) for local checkout. Use only allowlisted tracked C++ headers/source files needed by the native module closure. Cover current five modules, Crypto/Text for reviewed foundations and transitive modules in the recipe; keep src/Core present. Exclude untracked inputs, root build descriptors, hidden/secrets, unrelated paths, gitlinks and symlink escapes. Reject a tracked root build.cpp before invoking any dependency-provided behavior. Avoid invoking project filters/hooks/scripts or following malicious local-tracked source symlinks. Local tracked edits may be captured coherently or explicit instability refused. For clean primary source use immutable Git objects or equivalent. Stage only inside an owned temporary directory. Validate complete source, record revision/content identity and source path/kind in metadata, publish the full generation and then atomically switch current. A failed preparation leaves the previous source in place; duplicate/concurrent calls preserve complete generations. Do not delete old generations still in use. Diagnostic errors must avoid exposing arbitrary file contents.
|
|
|
|
## 7. Interfaces and data contracts
|
|
Fixed interface between workers: native build.cpp canonicalizes build/voidlibrary/current and verifies its parent is the real build/voidlibrary/sources. Each generation includes include/Void/Data/StrictJson.hpp and src/Core/, excludes build.cpp. Sources directory name is content/provenance-addressed. Write one bounded UTF-8 metadata file at generation root named provenance.json with at least revision, source kind (main/local), source path for local, dirty flag and content identity. Communicate a concrete example and exact CLI. Keep preparation outside VBS; descriptor performs no Git/network operations.
|
|
|
|
## 8. Dependencies and integration
|
|
Fresh reviewer accepted native target/install work when this guard is included. Root works on those targets concurrently. Local origin is a user-selected dev override, upstream main default always resolves the official remote. Tests under T-REVIEW-003 intentionally expose two separate JSON faults; no dependency parser/code edits.
|
|
|
|
## 9. Edge cases security and performance
|
|
VBS recursively snapshots path deps. Never hand it the external live directory. Benign untracked canary and untracked descriptor must not appear in the published generation. A tracked descriptor must be rejected. Avoid plain recursive copy. Preserve old generation on interrupted/offline fetch, distinct local changes, and failed validation. Use a narrow trust boundary around the tool's own cache and path selection. Test fixtures must never write to existing checkout Git state or local secrets.
|
|
|
|
## 10. Acceptance criteria
|
|
1. Real upstream main and explicit local preparation each yield an inspectable immutable source tree and SHA/dirty provenance.
|
|
2. CMake/VBS-ready source directories and needed modules are present. No extra descriptor/canary, no symlink excursion, no source mutation.
|
|
3. Repeated/failed/concurrent preparations preserve a previously captured generation and atomically publish a complete current target.
|
|
4. Report executable path and command so root can run native VLS build now.
|
|
|
|
## 11. Verification commands and evidence
|
|
From repo root compare git ls-remote --exit-code https://git.faumaray.com/Void/VoidLibrary.git refs/heads/main, and git -C build/bootstrap/_deps/voidlibrary-src rev-parse HEAD. Root observed both 7d7d23e. Run the newly implemented CLI in its documented default and explicit override modes, and a focused fixture test isolated in /tmp or build/preparation-check. To avoid cross-worker races, alert root when build/voidlibrary/current is ready before toggling it; run adversarial fixture tests in a separate temporary repo view/store. Root runs integrated VBS and CMake tests. Do not pin or stage anything.
|
|
|
|
## 12. Constraints and stop conditions
|
|
Stop before sibling changes, source installer execution or dropping required controls. If two repair cycles fail for the same check, return evidence for a revised hypothesis. No global changes or worker spawns.
|
|
|
|
## 13. Authorization and decisions
|
|
D-021 and D-025 require unpinned main with native VBS. D-022/D-026 authorize this branch and full implementation. D-027 authorizes GPT-6.2 Astra at Max for difficult implementation, including this reviewed dependency handoff. This is a separate high-risk assignment split from the failed Sol task; root owns the remaining integration.
|
|
|
|
## 14. Return format
|
|
Return T-NATIVE-PREP DONE/PARTIAL/BLOCKED, files, CLI/path interface, verified source generations, checks/exit codes, unrun checks and integration notes. Notify root as soon as the first valid generation is available. No independent user messages.
|