feat(package): download and verify prebuilt binary variants
This commit is contained in:
1 parent
118c0dc860
commit
9b405ce772
9 files changed
+199
-3
No files matched your search
@@ -105,9 +105,13 @@ Stage: VERIFIED — Plans 01–19 + Plan 20 Slices 1–2C + Track A + Track B (B
|
||||
- Added the `ide_query` daemon request (`vbs daemon ide query`): it evaluates/lowers the project graph, publishes the profile compilation database (selecting it when no editor selection exists), and returns the IDE metadata JSON (`schema_version`, project/build roots, profile identity, toolchain, compdb path, and per-target sources/outputs) wrapped with `ok`/`op`/`compdb`. The response flattens the query's trailing newline so the socket protocol stays one JSON object per line.
|
||||
- Added `Daemon.ide_query_serves_workspace_targets_and_compdb` (compdb exists on disk, schema/profile/app target present) and a CLI help contract; Daemon suite is now 9 cases.
|
||||
|
||||
- **Wave 22 (Track D3 Binary-Variant Distribution)**:
|
||||
- Added `download_binary_artifact` (`RegistryClient`): fetches an absolute http(s) binary artifact URL and verifies its SHA-256 before the atomic write. Added `materialize_binary_variant` (`BinaryFetchOptions`): selects a compatible variant (trusted-signature checked), reuses `<cache>/binaries/<sha256>` only when the cached digest still matches, and downloads otherwise.
|
||||
- `RegistryTests.binary_variant_distribution_downloads_and_verifies`: a signed variant is downloaded from the live registry package endpoint, byte-for-byte verified, reused from cache after the server stops, and rejected on digest mismatch.
|
||||
|
||||
## 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 and distribution, binary-variant signing, the #52 built-in-backend capability probe, and the VoidLibrary pin bump to `0002e74` done; binary-variant distribution remains), Track E3 (daemon core, bounded `describe`, build-serving, dependency materialization, and daemon-backed IDE metadata done; dedicated external editor extensions 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 and distribution, binary-variant signing and distribution materialization, the #52 built-in-backend capability probe, and the VoidLibrary pin bump to `0002e74` done), Track E3 (daemon core, bounded `describe`, build-serving, dependency materialization, and daemon-backed IDE metadata done; dedicated external editor extensions remain), and Track E4 (`Void::Net`/`Void::Sqlite` alignment) remain planned scope.
|
||||
|
||||
## Environment notes & upstream boundaries
|
||||
|
||||
|
||||
@@ -28,4 +28,5 @@ Base HEAD: `fe0d1a6`
|
||||
| Wave 19 (Track D3 trusted-key distribution) | `Provenance::load_trusted_keys` over `--trusted-key-file`, project `vbs.keys`, and `VBS_TRUSTED_PUBLIC_KEYS`; 64-hex validation/lowercasing/dedup with `file:line` errors; wired into CLI builds and daemon dependency resolution | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; SignatureEnforcement 5/5, Daemon 8/8, full CTest 8/8) | `include/Void/Build/Provenance/TrustedKeys.hpp`, `src/Provenance/TrustedKeys.cpp`, `src/Main.cpp`, `src/Daemon/Daemon.cpp`, `tests/SignatureEnforcementTests.cpp`, build lists, docs |
|
||||
| Wave 20 (Track D3 binary-variant signing) | `sign_message`/`verify_message`, `BinaryVariantMeta` signature fields, canonical `vbs-binary-v1` message + trusted-key policy, `select_compatible_signed_binary` fail-closed selection | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; SignatureEnforcement 7/7, full CTest 8/8) | `include/Void/Build/Provenance/{Signing,Verification}.hpp`, `src/Provenance/{Signing,Verification}.cpp`, `include/Void/Build/Package/{Solver,Fetch}.hpp`, `src/Package/Fetch.cpp`, `tests/SignatureEnforcementTests.cpp`, docs |
|
||||
| Wave 21 (Track E3 daemon-backed editor metadata) | `ide_query` daemon request + `vbs daemon ide query` CLI: lowers the graph, publishes/selects the profile compdb, returns IDE query JSON (workspace/targets/compdb) over the socket | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; Daemon 9/9, full CTest 8/8) | `src/Daemon/Daemon.cpp`, `src/Main.cpp`, `tests/DaemonTests.cpp`, `tests/CliContracts.cmake`, docs |
|
||||
| Future (Plan 20 Slice 3 / Tracks C, D3 binary distribution, E3 editor extensions, 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 22 (Track D3 binary-variant distribution) | `download_binary_artifact` with SHA-256 verification; `materialize_binary_variant` (signed selection, digest-validated cache reuse, download) | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; registry distribution test, full CTest 8/8) | `include/Void/Build/Package/{RegistryClient,Fetch}.hpp`, `src/Package/{RegistryClient,Fetch}.cpp`, `tests/RegistryTests.cpp`, docs |
|
||||
| Future (Plan 20 Slice 3 / Tracks C, E3 editor extensions, 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) |
|
||||
@@ -419,6 +419,21 @@ dev cpp-gcc -c ctest --test-dir build/pinned --output-on-failure
|
||||
`vbs daemon ide query --help` contract: **passed** (7.45 s).
|
||||
- `clang-format --dry-run --Werror` passes on the changed C++ files.
|
||||
|
||||
## Track D3 Binary-Variant Distribution (GCC 16.2, pin `0002e74`, built-in Ed25519)
|
||||
|
||||
```sh
|
||||
dev cpp-gcc -c cmake --build build/pinned --parallel 8
|
||||
dev cpp-gcc -c build/pinned/bin/vbs_registry_tests --filter binary_variant_distribution_downloads_and_verifies --no-color
|
||||
dev cpp-gcc -c ctest --test-dir build/pinned --output-on-failure
|
||||
```
|
||||
|
||||
- Build: exit 0. `RegistryTests.binary_variant_distribution_downloads_and_verifies`: **passed**
|
||||
(529 ms) - a signed binary variant is selected with a trusted key, downloaded from the live
|
||||
registry package endpoint, written to `<cache>/binaries/<sha256>` with byte-for-byte equality,
|
||||
reused from cache after the registry stops, and rejected when the expected digest is tampered.
|
||||
- Full CTest: **8 / 8 passed** in 200.71 s (`vbs_registry_tests` 11.39 s).
|
||||
- `clang-format --dry-run --Werror` passes on the changed C++ files.
|
||||
|
||||
## 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).
|
||||
|
||||
Reference in new issue
Block a user