feat(daemon): materialize project dependencies for daemon build requests
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 3s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 58s

This commit is contained in:
faumaray committed 2026-12-03 19:32:06 +03:00
1 parent 42172a24f8
commit f5c0c9f09d
12 files changed
+580 -287

No files matched your search

+5 -1
View File
@@ -89,9 +89,13 @@ Stage: VERIFIED — Plans 01–19 + Plan 20 Slices 1–2C + Track A + Track B (B
- Verified against upstream `main` exported to `/tmp/opencode/vl-main` **without OpenSSL**: `Signing` 4/4 (the crypto round-trip actually runs, 151.8 ms) and `SignatureEnforcement` 3/3.
- The VoidLibrary pin was then bumped to `0002e74a7da94a756f55a4a5574d20b77736c185` (upstream `main`, containing #52) in [CMakeLists.txt](../../CMakeLists.txt) and [build.cpp](../../build.cpp), with the pin assertions in `tests/DescribeContracts.cmake` and `tests/ExampleContexts.cpp` updated.
- **Wave 18 (Track E3 Daemon-Side Dependency Materialization)**:
- Extracted the CLI's dependency resolution/materialization pipeline into the reusable library API `Package::resolve_and_materialize_dependencies` (`include/Void/Build/Package/Resolver.hpp`, `src/Package/Resolver.cpp`) with explicit `ResolveOptions` (project/build root, pinned lock, offline/upgrade, trusted keys, registry URL/auth); `src/Main.cpp` is now a thin adapter over it.
- The daemon `build` request now loads TOML dependency manifests, merges declared dependencies, resolves and materializes them (pinned lock + registry environment), imports native/CMake/Meson/Conan provider targets, and lowers the graph with those imported interfaces before executing. Responses report `dependencies`. Added `Daemon.build_materializes_path_dependency` (path dependency materialized, imported, linked, and built over the socket).
## Remaining future scope
- **Post-v1 Expansion Roadmap ([21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md) & [20-future-translation-platforms.md](../roadmap/20-future-translation-platforms.md))**: Live `conan` CLI verification (Track B3), Track C (macOS/Windows ports + dual-profile cross-compilation), Track D3 signing (SBOM, Ed25519 primitives, trusted-key enforcement, the #52 built-in-backend capability probe, and the VoidLibrary pin bump to `0002e74` done; binary-variant signing and key distribution remain), Track E3 (daemon core, bounded `describe` and build-serving done; external editor plugins and dependency materialization inside the daemon remain), and Track E4 (`Void::Net`/`Void::Sqlite` alignment) remain planned scope.
- **Post-v1 Expansion Roadmap ([21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md) & [20-future-translation-platforms.md](../roadmap/20-future-translation-platforms.md))**: Live `conan` CLI verification (Track B3), Track C (macOS/Windows ports + dual-profile cross-compilation), Track D3 signing (SBOM, Ed25519 primitives, trusted-key enforcement, the #52 built-in-backend capability probe, and the VoidLibrary pin bump to `0002e74` done; binary-variant signing and key distribution remain), Track E3 (daemon core, bounded `describe`, build-serving, and dependency materialization done; external editor plugins remain), and Track E4 (`Void::Net`/`Void::Sqlite` alignment) remain planned scope.
## Environment notes & upstream boundaries
+2 -1
View File
@@ -24,4 +24,5 @@ Base HEAD: `fe0d1a6`
| Wave 15 (Track D3 signed-package enforcement) | Optional `signature`/`public_key` in `ReleaseRecord`/`SolvedPackage`/`LockedSourceEntry` + `vbs.lock`; `vbs publish --signing-key`; registry signature metadata storage/serving with hex validation; `vbs build\|test --trusted-public-key` fail-closed enforcement before extraction; `Provenance::verify_trusted_package_signature` trust policy | COMPLETE & VERIFIED (GCC 16.2, pinned VoidLibrary `3e25405`, 8/8 CTest; OpenSSL-enabled Signing 4/4, SignatureEnforcement 3/3, signed registry E2E) | `include/Void/Build/Provenance/Verification.hpp`, `src/Provenance/Verification.cpp`, `include/Void/Build/Package/{Solver,Lockfile,RegistryClient}.hpp`, `src/Package/{Solver,Lockfile,RegistryClient}.cpp`, `registry/`, `src/Main.cpp`, `tests/{SignatureEnforcementTests.cpp,RegistryTests.cpp}`, docs |
| Wave 16 (Track E3 daemon build serving) | In-process daemon `build` request reusing graph lowering + `Execution::execute_graph` against the warm `StateStore`; bounded `profile`/`targets`/`jobs`; `vbs daemon build` CLI; cache-reuse test | COMPLETE & VERIFIED (GCC 16.2; Daemon suite 7/7) | `src/Daemon/Daemon.cpp`, `include/Void/Build/Daemon/Daemon.hpp`, `src/Main.cpp`, `tests/DaemonTests.cpp`, `tests/CliContracts.cmake`, docs |
| Wave 17 (VoidLibrary #52 follow-up + pin bump) | `signing_available()` probes the real Ed25519 capability instead of `has_openssl_backend()`; VoidLibrary pin bumped to `0002e74a7da94a756f55a4a5574d20b77736c185` (contains #52) and pin assertions updated | COMPLETE & VERIFIED (GCC 16.2, fresh remote fetch of the pin, no OpenSSL: Signing 4/4 crypto path, SignatureEnforcement 3/3, full CTest 8/8) | `CMakeLists.txt`, `build.cpp`, `src/Provenance/Signing.cpp`, `include/Void/Build/Provenance/Signing.hpp`, `tests/{SigningTests.cpp,ExampleContexts.cpp,DescribeContracts.cmake}`, docs |
| Future (Plan 20 Slice 3 / Tracks C, D3 binary signing, E3 daemon dependency materialization/editor plugins, E4, live `conan`) | Live `conan` CLI verification; macOS/Windows/cross-compile; binary-variant signing and key distribution; daemon-side dependency materialization and editor plugins; `Void::Net`/`Void::Sqlite` alignment | PLANNED (unimplemented) | [21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md), [20-future-translation-platforms.md](../roadmap/20-future-translation-platforms.md) |
| Wave 18 (Track E3 daemon dependency materialization) | Extracted `Package::resolve_and_materialize_dependencies` (`Resolver.hpp/.cpp`) from the CLI; daemon `build` now merges TOML deps, resolves/materializes with the pinned lock, imports provider targets, lowers with imported interfaces, and reports `dependencies` | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; Daemon 8/8, full CTest 8/8) | `include/Void/Build/Package/Resolver.hpp`, `src/Package/Resolver.cpp`, `src/Main.cpp`, `src/Daemon/Daemon.cpp`, `tests/DaemonTests.cpp`, build lists, docs |
| Future (Plan 20 Slice 3 / Tracks C, D3 binary signing, E3 editor plugins, E4, live `conan`) | Live `conan` CLI verification; macOS/Windows/cross-compile; binary-variant signing and key distribution; daemon-side dependency materialization and editor plugins; `Void::Net`/`Void::Sqlite` alignment | PLANNED (unimplemented) | [21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md), [20-future-translation-platforms.md](../roadmap/20-future-translation-platforms.md) |
+19
View File
@@ -351,6 +351,25 @@ dev cpp-gcc -c ctest --test-dir build/pinned --output-on-failure
`vbs_selfhost_tests` 92.98 s, `vbs_registry_tests` 10.99 s, `vbs_cli_contract` 7.61 s).
- `clang-format --dry-run --Werror` passes on `build.cpp` and `tests/ExampleContexts.cpp`.
## Track E3 Daemon Dependency Materialization (GCC 16.2, pin `0002e74`)
```sh
dev cpp-gcc -c cmake --build build/pinned --parallel 8
dev cpp-gcc -c build/pinned/bin/vbs_v1_tests --suite Daemon --no-color
dev cpp-gcc -c ctest --test-dir build/pinned --output-on-failure
```
- Build: exit 0. Daemon suite: **8 / 8 passed** in 13.11 s, including
`build_materializes_path_dependency`: the daemon loads the project's `build.cpp`, materializes the
declared path dependency through the extracted `Package::resolve_and_materialize_dependencies`,
imports its native provider target, lowers the graph with the imported interface, executes the
compile+link, and reports `dependencies >= 1` with the output binary present.
- Full CTest: **8 / 8 passed** in 197.95 s (`vbs_v1_tests` 74.23 s, `vbs_selfhost_tests` 93.24 s,
`vbs_registry_tests` 10.70 s, `vbs_cli_contract` 7.51 s).
- `clang-format --dry-run --Werror` passes on `src/Daemon/Daemon.cpp`, `src/Main.cpp`,
`src/Package/Resolver.cpp`, `include/Void/Build/Package/Resolver.hpp`, and
`tests/DaemonTests.cpp`.
## Limits and Unrun Checks
1. **HTTPS git fetch**: the host shell is proxy-restricted, but the Docker container could clone `https://git.faumaray.com/Void/VoidLibrary.git`; the pinned commit `3e254055e081a104f08df68dde39711bc7813518` was fetched directly for the verification above. A separate configure against the local `/home/faumaray/Projects/Library` checkout via `VBS_VOID_SOURCE_DIR` also succeeded (development-only override, checkout unmodified).
+1 -1
View File
@@ -73,7 +73,7 @@ flowchart LR
| --- | --- | --- |
| **E1 — Everyday CLI Ergonomics (Implemented in Wave 8)** | `vbs init` project scaffolding, `vbs clean`, `vbs doctor` environment diagnostics, `vbs graph --format dot|json`, and `vbs build --native-foreign`. | End-to-end CLI & integration tests passing in `vbs_cli_contract` and `vbs_v1_tests`. |
| **E2 — Multi-Package Workspaces (`workspace.cpp`)** *(verified in Docker GCC 16)* | Shared root `vbs.lock` and `build/.vbs` CAS, `workspace_dependency()` cross-member native linking, and affected-member selection (`vbs build/test --member <pkg>` / `--changed-since <ref>`). | 3-package workspace fixture (shared library + app + tests) builds/tests with one root lockfile; member selection and `--changed-since` verified in `FullV1Tests.workspace_members_shared_build_and_member_selection`. |
| **E3 — IDE Config/Query & Background Daemon** | `build.cpp`/`build.profiles.cpp`/`build-support/` SDK entries in `compile_commands.json` + `vbs ide generate` (`.clangd`, `.vscode/`, `.zed/`, `.idea/customTargets.xml`) & `vbs ide query` (**Implemented & Verified in Wave 10**); Unix-socket daemon core holding a warm `StateStore` + project `DirectoryWatcher` with `vbs daemon run\|status\|stop\|gc\|recover\|describe` (**Implemented & Verified in Wave 14; bounded `describe` added in the post-v1 daemon follow-up**). `describe` returns a bounded graph summary (`target_names` ≤ 128 entries × 200 bytes, `profile` ≤ 128 bytes, 10 s evaluation timeout); `vbs daemon build` executes the lowered graph in-process against the warm state store with bounded `profile`/`targets`/`jobs` (dependency materialization stays with `vbs build`/`vbs deps`). Dedicated editor extensions remain planned. | `vbs ide` & `build.cpp` syntax-check verified in `FullV1Tests.cpp`; daemon lifecycle/status/gc/shutdown/describe verified in `DaemonTests.cpp` (6/6 under `dev cpp-gcc`); the live `vbs daemon describe` CLI round-trip is verified in `vbs_cli_contract`. |
| **E3 — IDE Config/Query & Background Daemon** | `build.cpp`/`build.profiles.cpp`/`build-support/` SDK entries in `compile_commands.json` + `vbs ide generate` (`.clangd`, `.vscode/`, `.zed/`, `.idea/customTargets.xml`) & `vbs ide query` (**Implemented & Verified in Wave 10**); Unix-socket daemon core holding a warm `StateStore` + project `DirectoryWatcher` with `vbs daemon run\|status\|stop\|gc\|recover\|describe` (**Implemented & Verified in Wave 14; bounded `describe` added in the post-v1 daemon follow-up**). `describe` returns a bounded graph summary (`target_names` ≤ 128 entries × 200 bytes, `profile` ≤ 128 bytes, 10 s evaluation timeout); `vbs daemon build` executes the lowered graph in-process against the warm state store with bounded `profile`/`targets`/`jobs`, including daemon-side dependency resolution/materialization and provider import via `Package::resolve_and_materialize_dependencies`. Dedicated editor extensions remain planned. | `vbs ide` & `build.cpp` syntax-check verified in `FullV1Tests.cpp`; daemon lifecycle/status/gc/shutdown/describe verified in `DaemonTests.cpp` (6/6 under `dev cpp-gcc`); the live `vbs daemon describe` CLI round-trip is verified in `vbs_cli_contract`. |
| **E4 — Transport & Storage Upstream Alignment** | Adopt `Void::Net` (`VL-004`/`VL-005`) and `Void::Sqlite` (`VL-011b`) when lightweight/bundled builds become available in minimal Nix toolchains, reducing VBS transport code further. | All `vbs_registry_tests` and `vbs_core_tests` pass on both minimal and full toolchains. |
---