feat(provenance,daemon): add Ed25519 signing primitives and bounded daemon describe op
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 3s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 9s

This commit is contained in:
faumaray committed 2026-12-03 17:30:12 +03:00
1 parent 0bde74f739
commit 21babb8c31
16 files changed
+1232 -20

No files matched your search

+4 -4
View File
@@ -2,7 +2,7 @@
Updated: 2026-12-03
Branch: main
Stage: VERIFIED — Plans 01–19 + Plan 20 Slices 1–2C + Track A + Track B (B1–B3) + Track E1 + `vbs ide` & `build.cpp` CompDB integration + Track D1/D2 + Track E2 + Track D3 SBOM (Docker GCC 16) + Track E3 daemon core + Track C1 Linux platform split complete
Stage: VERIFIED — Plans 01–19 + Plan 20 Slices 1–2C + Track A + Track B (B1–B3) + Track E1 + `vbs ide` & `build.cpp` CompDB integration + Track D1/D2 + Track E2 + Track D3 SBOM (Docker GCC 16) + Track D3 Ed25519 signing primitives (OpenSSL-gated) + Track E3 daemon core & bounded describe + Track C1 Linux platform split complete
## Completed delivery waves
@@ -67,17 +67,17 @@ Stage: VERIFIED — Plans 01–19 + Plan 20 Slices 1–2C + Track A + Track B (B
- **Wave 13 (Track D3 SBOM Provenance)**:
- Added `include/Void/Build/Provenance/Sbom.hpp` + `src/Provenance/Sbom.cpp` with deterministic SPDX 2.3 and CycloneDX 1.5 JSON generation from lockfile packages and `BuildGraph` target outputs (content-derived namespace/serial and epoch timestamp).
- Wired `vbs build|test --sbom FILE --sbom-format spdx|cyclonedx` in `src/Main.cpp`, writing per-profile files when multiple profiles are selected.
- Ed25519 package/binary signing remains blocked on an upstream `Void::Crypto` primitive, filed as [Void/Library#36](https://git.faumaray.com/Void/Library/issues/36) and tracked as `VL-014`.
- Added `include/Void/Build/Provenance/Signing.hpp` + `src/Provenance/Signing.cpp` + `tests/SigningTests.cpp`: Ed25519 detached-signature primitives (owner-only `0600` seed generation, public-key derivation, canonical `vbs-package-v1` message, sign/verify) capability-gated on `Void::Crypto`'s OpenSSL backend. Without OpenSSL every operation fails closed with an explicit unsupported error; signature enforcement in `vbs publish`/`vbs build --locked` and the OpenSSL-backed round-trip run remain planned.
- **Docker verification**: `FullV1Tests.sbom_spdx_and_cyclonedx_are_deterministic_and_valid_json` plus a CLI `--sbom` assertion in the workspace test; full CTest suite passes.
- **Wave 14 (Track E3 Unix-Socket Daemon Core, Track C1 Linux Platform Backend Split, & CMake 4.5 Feature-Carrier Translation Fix)**:
- Implemented `Void::Build::Daemon` in `include/Void/Build/Daemon/Daemon.hpp` and `src/Daemon/Daemon.cpp`: a bounded single-threaded Unix-domain-socket daemon that holds a warm `StateStore` and project `InotifyWatcher`, serves strict newline-delimited JSON requests (`ping`, `status`, `gc`, `recover`, `shutdown`), probes and replaces stale sockets, binds with `0600` permissions, recovers watcher overflow via rescan, and removes only its own socket (device/inode checked). Wired `vbs daemon run|status|stop|gc|recover` into `src/Main.cpp` and added `tests/DaemonTests.cpp` (`VOID_TEST(Daemon, ...)`) plus CLI contracts.
- Implemented `Void::Build::Daemon` in `include/Void/Build/Daemon/Daemon.hpp` and `src/Daemon/Daemon.cpp`: a bounded single-threaded Unix-domain-socket daemon that holds a warm `StateStore` and project `InotifyWatcher`, serves strict newline-delimited JSON requests (`ping`, `status`, `gc`, `recover`, `describe`, `shutdown`) with bounded `describe` graph summaries (`target_names` ≤ 128 entries × 200 bytes, `profile` ≤ 128 bytes, 10 s evaluation timeout), probes and replaces stale sockets, binds with `0600` permissions, recovers watcher overflow via rescan, and removes only its own socket (device/inode checked). Wired `vbs daemon run|status|stop|gc|recover|describe` into `src/Main.cpp` and added `tests/DaemonTests.cpp` (`VOID_TEST(Daemon, ...)`) plus CLI contracts.
- Split OS-specific platform implementations into `src/Platform/Linux/` and added `include/Void/Build/Platform/Host.hpp` (`HostOs`, `host_os()`, `host_supported()`); macOS/Windows backends remain planned Track C2/C3 scope.
- Fixed bounded CMake translation for CMake 4.5's synthesized `@cmake_cxx_std@(synth_N)` `INTERFACE_LIBRARY` feature carriers in `src/Provider/Translator.cpp`: their standard flag is already lowered from compile groups, so they are skipped instead of reported as untranslated dependency edges. Restored `FullV1Tests.track_b3_foreign_cmake_cxx20_modules_native_translation` on CMake 4.5.
## 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 done; upstream Ed25519 available in pin but needs an OpenSSL-enabled verification environment), Track E3 (daemon core done; build-serving requests and external editor plugins 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 and Ed25519 primitives done; OpenSSL-backed round-trip verification and `vbs publish`/`vbs build --locked` enforcement remain), Track E3 (daemon core and bounded `describe` done; build-serving requests and external editor plugins remain), and Track E4 (`Void::Net`/`Void::Sqlite` alignment) remain planned scope.
## Environment notes & upstream boundaries
+3 -3
View File
@@ -19,6 +19,6 @@ Base HEAD: `fe0d1a6`
| Wave 10 (Track B [B1–B3] + First-Class `vbs ide` Integration) | Native C driver (`CStandard`) & mixed C/C++ CMake/Meson translation (`PerFileOption`); bounded `build.ninja` `CUSTOM_COMMAND` translation (`CustomAction`); foreign CMake `CXX_MODULES` `fileSets` & cross-target `module_bmis` + Clang `default_include_dirs`; `build.cpp` SDK CompDB indexing + `vbs ide generate\|query` | COMPLETE & VERIFIED | `include/Void/Build.hpp`, `Driver.{hpp,cpp}`, `ModuleScanner.{hpp,cpp}`, `Graph.{hpp,cpp}`, `CompDb.{hpp,cpp}`, `Provider.cpp`, `Translator.{hpp,cpp}`, `Watcher.cpp`, `Main.cpp`, `tests/{FullV1Tests.cpp,CliContracts.cmake}`, docs |
| Wave 11 (Track D1–D2) | Shared HTTP CAS action cache (`/api/v1/cas/{blobs,actions}`, bearer auth, digest verification, portable action keys, `--remote-cache`) + parallel snapshot revalidation hashing | COMPLETE & VERIFIED (Docker GCC 16.0.1, pinned VoidLibrary, 8/8 CTest suites; D1 cross-build-dir 100% cache hit; D2 5,001-file warm no-op 374 ms) | `include/Void/Build/State/RemoteCache.hpp`, `src/State/RemoteCache.cpp`, `StateStore.{hpp,cpp}`, `Scheduler.cpp`, `Snapshot.cpp`, `registry/service/RegistryService.cpp`, `src/Main.cpp`, `tests/RegistryTests.cpp`, docs |
| Wave 12 (Track E2 Workspaces) | `workspace.cpp` member declaration/evaluation, shared root `vbs.lock` + `build/.vbs` CAS, `workspace_dependency()` cross-member native linking, `--member` and `--changed-since` selection | COMPLETE & VERIFIED (Docker GCC 16.0.1, 8/8 CTest suites; 3-member fixture with unified lockfile) | `include/Void/Build.hpp`, `src/Build.cpp`, `Config/Frontend.{hpp,cpp}`, `src/Main.cpp`, `src/Package/Fetch.cpp`, `tests/FullV1Tests.cpp`, docs |
| Wave 13 (Track D3 SBOM) | Deterministic SPDX 2.3 / CycloneDX 1.5 SBOM from `vbs.lock` packages + `BuildGraph` outputs; `vbs build\|test --sbom FILE --sbom-format spdx\|cyclonedx`; Ed25519 signing blocked upstream | SBOM COMPLETE & VERIFIED (Docker GCC 16, 8/8 CTest suites); signing pending [Void/Library#36](https://git.faumaray.com/Void/Library/issues/36) | `include/Void/Build/Provenance/Sbom.hpp`, `src/Provenance/Sbom.cpp`, `src/Main.cpp`, `tests/FullV1Tests.cpp`, docs |
| Wave 14 (Track E3 daemon core + Track C1 platform split) | Unix-socket `vbs daemon` holding warm `StateStore`/`InotifyWatcher` with `ping/status/gc/recover/shutdown`, CLI + tests; `src/Platform/Linux/` backend split with `HostOs` boundary; CMake 4.5 `@cmake_cxx_std@` feature-carrier translation fix | COMPLETE & VERIFIED (GCC 16.2, pinned VoidLibrary `3e25405`, 8/8 CTest suites) | `include/Void/Build/Daemon/Daemon.hpp`, `src/Daemon/Daemon.cpp`, `tests/DaemonTests.cpp`, `include/Void/Build/Platform/Host.hpp`, `src/Platform/Linux/`, `src/Main.cpp`, `src/Provider/Translator.cpp`, `tests/CliContracts.cmake`, docs |
| Future (Plan 20 Slice 3 / Tracks C, D3 signing, E3 daemon build serving, E4, live `conan`) | Live `conan` CLI verification; macOS/Windows/cross-compile; signed provenance; `vbs daemon`, `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 13 (Track D3 SBOM + Ed25519 signing primitives) | Deterministic SPDX 2.3 / CycloneDX 1.5 SBOM from `vbs.lock` packages + `BuildGraph` outputs; `vbs build\|test --sbom FILE --sbom-format spdx\|cyclonedx`; Ed25519 detached-signature primitives (`Void::Build::Provenance::Signing`: 0600 seed generation, public-key derivation, canonical package message, sign/verify) capability-gated on `Void::Crypto`'s OpenSSL backend | SBOM COMPLETE & VERIFIED (Docker GCC 16, 8/8 CTest suites); signing primitives IMPLEMENTED & VERIFIED in `dev cpp-gcc` (OpenSSL-gated: 4/4 `SigningTests`; OpenSSL-backed round-trip pending an OpenSSL-enabled environment) | `include/Void/Build/Provenance/Sbom.hpp`, `src/Provenance/Sbom.cpp`, `include/Void/Build/Provenance/Signing.hpp`, `src/Provenance/Signing.cpp`, `tests/SigningTests.cpp`, `src/Main.cpp`, `tests/FullV1Tests.cpp`, docs |
| Wave 14 (Track E3 daemon core + bounded `describe` + Track C1 platform split) | Unix-socket `vbs daemon` holding warm `StateStore`/`InotifyWatcher` with `ping/status/gc/recover/describe/shutdown`, CLI + tests; bounded `describe` graph summary (`target_names` ≤ 128 × 200 bytes, `profile` ≤ 128 bytes, 10 s eval timeout); `src/Platform/Linux/` backend split with `HostOs` boundary; CMake 4.5 `@cmake_cxx_std@` feature-carrier translation fix | COMPLETE & VERIFIED (GCC 16.2, pinned VoidLibrary `3e25405`, 8/8 CTest suites; `Daemon` suite 6/6 under `dev cpp-gcc`; live `vbs daemon describe` CLI round-trip verified in `vbs_cli_contract`) | `include/Void/Build/Daemon/Daemon.hpp`, `src/Daemon/Daemon.cpp`, `tests/DaemonTests.cpp`, `include/Void/Build/Platform/Host.hpp`, `src/Platform/Linux/`, `src/Main.cpp`, `src/Provider/Translator.cpp`, `tests/CliContracts.cmake`, docs |
| Future (Plan 20 Slice 3 / Tracks C, D3 signature enforcement, E3 daemon build serving, E4, live `conan`) | Live `conan` CLI verification; macOS/Windows/cross-compile; `vbs publish`/`vbs build --locked` signature enforcement; daemon build serving; `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) |
+54 -6
View File
@@ -1,6 +1,6 @@
# Verification record
Updated: 2026-11-27
Updated: 2026-12-03
Working directory: `/home/faumaray/Projects/VoidBuildSystem`
All checks below were executed after the final C++ edits and formatting pass. Planned/non-executed items are separated explicitly under **Limits and Unrun Checks**.
@@ -187,9 +187,8 @@ inputs are byte-equal.
and verifies the emitted file contains CycloneDX.
- Full suite: **8 / 8 CTest suites passed** in 471.56 s.
Ed25519 package/binary signing is **not** implemented: `Void::Crypto` has no Ed25519 primitive.
It is requested upstream as [Void/Library#36](https://git.faumaray.com/Void/Library/issues/36)
(`VL-014`) rather than faked with a weaker scheme.
Ed25519 package/binary signing primitives are now implemented in `Void::Build::Provenance::Signing`
(see the signing verification section below); package/binary signature enforcement remains planned.
## Track E3 Daemon Core & Track C1 Platform Split (2026-12-03, `dev cpp-gcc`)
@@ -219,11 +218,60 @@ dev cpp-gcc -c ctest --test-dir build/bootstrap --output-on-failure
fix; it failed deterministically before it.
- `clang-format --dry-run --Werror` passes on all new/changed C++ files.
## Track D3 Ed25519 Signing Primitives & Track E3 Daemon `describe` (2026-12-03, `dev cpp-gcc`)
Environment: GCC 16.2.0, CMake 4.5.0, Ninja 1.13.2, VoidLibrary pin
`3e254055e081a104f08df68dde39711bc7813518` exported read-only to `/tmp/opencode/vl-pin`. This
build has `VOID_CRYPTO_HAS_OPENSSL=0`, so `Void::Crypto::has_openssl_backend()` is false.
```sh
dev cpp-gcc -c cmake -S . -B build/bootstrap -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
dev cpp-gcc -c cmake --build build/bootstrap -j 8
build/bootstrap/bin/vbs_v1_tests --suite Signing --no-color
dev cpp-gcc -c build/bootstrap/bin/vbs_v1_tests --suite Daemon --no-color
dev cpp-gcc -c ctest --test-dir build/bootstrap -R vbs_cli_contract --output-on-failure
```
- Build: exit 0; all targets including `bin/vbs` and `bin/vbs_v1_tests` compile and link.
- `Signing` suite: **4 / 4 passed** in 0.3 ms (canonical message, seed round-trip/tamper/rejections,
malformed hex/seed files, backend gating). The crypto round-trip case self-skips while
`signing_available() == false`.
- External signing harness (`/tmp/opencode/signing-verify/verify.cpp`, linked against
`libVoidBuild_Core.a`): **0 failures, 4 skipped, exit 0**. The canonical message is deterministic
and changes on a 1-byte archive-digest or version tamper;
`generate_signing_seed`/`public_key_from_seed`/`sign_package`/`verify_package` return
`ErrorKind::unsupported` with `Ed25519 package signing requires the OpenSSL backend of
Void::Crypto` instead of crashing; truncated/oversized signatures and public keys, missing seed
files, and directory seed paths are rejected as errors. Skipped (OpenSSL unavailable): fixed-seed
RFC 8032 round-trip, signature 1-byte tamper, wrong key, non-hex key/signature.
- `Daemon` suite under `dev cpp-gcc`: **6 / 6 passed** in 6.53 s, including
`describe_evaluates_project_graph` (2224.5 ms), `describe_empty_project_reports_zero_targets`
(2080.0 ms), `describe_bounds_target_names_for_large_projects` (2186.1 ms), and
`describe_rejects_workspace_root` (16.4 ms).
- The same `Daemon` suite run outside the dev shell: 3 / 6, because `g++` is absent from `PATH`
(`describe: host compiler 'g++' not found in PATH for compiling build.cpp`). Daemon tests must
run under `dev cpp-gcc`.
- `vbs_cli_contract`: **PASSED** (7.44 s) including the live `vbs daemon run` → `vbs daemon describe`
→ `vbs daemon stop` round-trip over the Unix socket. The describe client uses a 15 s timeout
because graph evaluation takes ~2 s; the daemon bounds evaluation at 10 s.
- Full default CTest after integration: **8 / 8 passed** in 211.36 s (`vbs_v1_tests` 87.35 s,
`vbs_selfhost_tests` 93.22 s, `vbs_cli_contract` 7.44 s).
- **OpenSSL-backed signing verification** (separate `build/openssl` configure with
`OPENSSL_ROOT_DIR` pointing at the Nix OpenSSL 3.5.9 dev/lib outputs): build exit 0, and
`build/openssl/bin/vbs_v1_tests --suite Signing --no-color` reports **4 / 4 passed** with the
real Ed25519 backend (seed round-trip, sign/verify, uppercase hex, digest/signature/wrong-key
rejection, malformed hex and seed files). The same suite on the default no-OpenSSL build is
**4 / 4 passed** via the capability-gated path, where the crypto round-trip self-skips and the
explicit unsupported-backend error is asserted.
- Bounds verified by `DaemonTests`: `target_names` capped at 128 entries (project with 140 targets)
and 200 bytes per name; `profile` rejects empty, non-string, and > 128-byte values; `compiler`
rejects non-string and unknown values; workspace roots are rejected.
## 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).
2. **Conan2 live installation**: `conan` is absent in `dev cpp-gcc`; automated testing verified explicit missing-prerequisite failure (`FullV1Tests.cpp`). Live `conan` container verification (Track B3) remains unrun.
3. **Optional external VoidLibrary modules (`Void::Net`, `Void::Sqlite`)**: `Boost`, `OpenSSL`, and `SQLite3` are not installed in `dev cpp-gcc`, so VBS continues using its pure-C++/POSIX loopback HTTP adapters (`HttpServer`, `RegistryClient`) and journaled atomic CAS store (`StateStore`), while retaining optional `Void::Sqlite` CMake detection.
4. **CI workflow & Web UI browser**: [.github/workflows/ci.yml](../../.github/workflows/ci.yml) has not been executed on remote GitHub Actions runners, and `registry/web/` was verified via HTTP/header/static-serving/API/XSS/CSRF tests without a headless browser runner.
5. **Remaining Post-v1 Roadmap ([21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md) & [20-future-translation-platforms.md](../roadmap/20-future-translation-platforms.md))**: Live `conan` container verification, Track C (Windows/MSVC, macOS/Apple Clang, dual-profile cross-compilation), Track D1/D2 acceptance scenarios (unit/integration suites pass in Docker; see above), Track D3 (SBOM/signatures), Track E2 (`workspace.cpp`), Track E3 (daemon core is done; build-serving requests and external editor plugins remain), and Track E4 (`Void::Net`/`Void::Sqlite` alignment) remain planned scope.
6. **Track D3 signing / Track C ports**: the pinned VoidLibrary exposes Ed25519 in `Void::Crypto`, but it requires the OpenSSL backend, which is not available in `dev cpp-gcc`; macOS/Windows platform backends are also unverified because no such hosts are available. Both remain unrun rather than claimed.
5. **Remaining Post-v1 Roadmap ([21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md) & [20-future-translation-platforms.md](../roadmap/20-future-translation-platforms.md))**: Live `conan` container verification, Track C (Windows/MSVC, macOS/Apple Clang, dual-profile cross-compilation), Track D1/D2 acceptance scenarios (unit/integration suites pass in Docker; see above), Track D3 (SBOM/signatures), Track E2 (`workspace.cpp`), Track E3 (daemon core and bounded `describe` are done; build-serving requests and external editor plugins remain), and Track E4 (`Void::Net`/`Void::Sqlite` alignment) remain planned scope.
6. **Track D3 signing / Track C ports**: the Ed25519 primitives are implemented and pass both the no-OpenSSL gating tests and the OpenSSL-backed round-trip (verified against Nix OpenSSL 3.5.9 in `build/openssl`); `vbs publish`/`vbs build --locked` signature enforcement is not wired yet. macOS/Windows platform backends are unverified because no such hosts are available. These remain unrun rather than claimed.