VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 4s
- New Provenance::Sbom module generating SPDX 2.3 / CycloneDX 1.5 from lockfile packages + BuildGraph outputs - Wire vbs build|test --sbom FILE --sbom-format spdx|cyclonedx - Register the module in CMake, build.cpp and the self-host recipe - Ed25519 signing requested upstream as Void/Library#36 (VL-014) - Verified in Docker GCC 16: 8/8 CTest suites; deterministic JSON unit test + CLI SBOM assertion
82 lines
18 KiB
Markdown
82 lines
18 KiB
Markdown
# Development state
|
||
|
||
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) complete
|
||
|
||
## Completed delivery waves
|
||
|
||
- **Wave 0 (Naming Alignment & Upstream Tracker)**:
|
||
- Standardized all C++ identifiers and paths on namespace `Void::Build`, umbrella `<Void/Build.hpp>`, PascalCase internal headers (`include/Void/Build/...`), PascalCase sources/types/enum constants, `snake_case` functions/methods, and CMake targets `VoidBuild_Sdk` (`Void::BuildSdk`), `VoidBuild_Core` (`Void::BuildCore`), `VoidBuild_Registry` (`Void::BuildRegistry`).
|
||
- Documented 13 reusable VoidLibrary gaps and swappable local adapters in [VOIDLIBRARY_UPSTREAM_REQUESTS.md](../VOIDLIBRARY_UPSTREAM_REQUESTS.md).
|
||
- **Wave 1 (Plans 01–07 — SDK & Core Native Engine)**:
|
||
- Expanded declaration SDK (`build.cpp`, `build.profiles.cpp`, `include/Void/Build.hpp`, `src/Build.cpp`).
|
||
- Built out-of-process host configuration frontend (`src/Config/Frontend.cpp`), dependency-propagating graph lowering (`src/Graph/Graph.cpp`), GCC/Clang toolchain discovery & capability probing (`src/Toolchain/Driver.cpp`), content-verified immutable snapshots (`src/Snapshot/Snapshot.cpp`), process group supervisor (`src/Platform/ProcessSupervisor.cpp`), isolated file ops (`src/Platform/FileOps.cpp`), CAS durable state store (`src/State/StateStore.cpp`), and parallel DAG scheduler (`src/Execution/Scheduler.cpp`).
|
||
- **Wave 2 (Plans 09–10 — Editor CompDB & Watchers)**:
|
||
- Implemented per-profile `compile_commands.json` projection with monotonic selection tickets, crash recovery, and unrelated root file preservation (`src/Editor/CompDb.cpp`).
|
||
- Implemented recursive Linux `inotify` watcher (`src/Watch/Watcher.cpp`) with overflow rescan and strict `MetadataOnly` boundary vs `FullBuild`.
|
||
- **Wave 3 (Plans 11–15, 18 — Packages, Foreign Providers, Bridge, Install & Self-Hosting)**:
|
||
- Implemented TOML 1.0 parser/merger (`src/Package/Toml.cpp`), PubGrub-style SemVer solver (`src/Package/Solver.cpp`), context-aware atomic CAS `vbs.lock` (`src/Package/Lockfile.cpp`), deterministic PAX/USTAR `.tar` builder & safe extractor (`src/Package/Archive.cpp`), source/binary materialization (`src/Package/Fetch.cpp`).
|
||
- Implemented CMake File API & Meson introspection providers + explicit missing-tool Conan2 adapter (`src/Provider/Provider.cpp`), `cmake/bridge/VbsDeps.cmake` + `vbs bridge` (`src/Bridge/CMakeBridge.cpp`), staged relocatable install/export/uninstall (`src/Install/Installer.cpp`), native `VoidLibrary` recipe (`recipes/VoidLibrary/VoidLibraryRecipe.cpp`), and non-CMake `Void::Testing` generator (`src/SelfHost/TestRegistryGen.cpp`).
|
||
- **Wave 4 (Plans 08, 16–17, 19 — Modern C++, Registry, Web UI, Benchmarks & CI)**:
|
||
- Implemented P1689r5 module scanning & topological collation for GCC 16 and `clang-scan-deps`, header units, and unity batching excluding modules/per-file overrides (`src/Modules/ModuleScanner.cpp`).
|
||
- Implemented `vbs-registry` HTTP/1.1 service (`registry/service/HttpServer.cpp`, `RegistryService.cpp`) with RBAC, salted password hashing, CSRF + HttpOnly SameSite cookies, immutable release 409 conflict checks, yank, redacted audit log, backup/restore, and DOM-safe web UI (`registry/web/`).
|
||
- Implemented `vbs` CLI (`src/Main.cpp`), benchmark harness (`benchmarks/EngineBenchmarks.cpp`), five `Void::Testing` executables, three CMake contract scripts, and `.github/workflows/ci.yml` template.
|
||
- **Wave 5 (Maximal VoidLibrary Reuse + Full Plan 08/11/12/16/18 Integration)**:
|
||
- Adopted `Void::Algorithms::topological_order`, `Void::Encoding::Hex`/`Url`, `Void::Unicode::validate_utf8`, `Void::Str`, `Void::Scope::on_exit`, `Void::Time::Stopwatch`, `Void::Configuration::get_env`/`get_env_or`, `Void::Concurrency::ThreadPool`.
|
||
- Wired Plan 08 end-to-end into `Graph::lower_project_graph` (incompatible sanitizer rejection, unity batching, explicit `ActionKind::HeaderUnit`, GCC `-fmodule-mapper` & Clang two-step `.pcm` -> `.o` + transitive `-fmodule-file=` named modules & partitions) verified on BOTH GCC 16.2.0 and Clang 23.1.3.
|
||
- Added live HTTP/1.1 `Package::RegistryClient` (`src/Package/RegistryClient.cpp`) + `vbs publish` + live `DependencySourceKind::Package` resolution in `vbs deps` / `vbs build` verified end-to-end against `vbs-registry`.
|
||
- Added full native `recipes/SelfHost/VbsSelfHostRecipe.{hpp,cpp}` verified Stage 0 -> Stage 1 (full native `stage1/bin/vbs`, zero CMake) -> Stage 2 (`stage1/bin/vbs test` with trapped `cmake` on `PATH`).
|
||
- **Wave 6 (VoidLibrary `3e254055` Pin Bump, Upstream `VL-001`..`VL-013` Adoption, Real Self-Build, Live Logs & Generated CLI Help)**:
|
||
- Upgraded VoidLibrary pin to `3e254055e081a104f08df68dde39711bc7813518` (`Merge branch 'feat/upstream-vbs-requests' (VL-001..VL-013)`).
|
||
- Replaced local adapters with upstream VoidLibrary implementations across the board: `Void::Crypto` (`VL-007`), `Void::Archive` (`VL-006`), `Void::Data::Toml` (`VL-002`), `Void::Semver::parse_range` (`VL-013`), `Void::FileSystem::FileLock`/`reflink_copy_file`/`set_canonical_mtime`/`atomic_symlink_swap` (`VL-010`), `Void::FileSystem::DirectoryWatcher` (`VL-003`), `Void::Process::spawn`/`communicate_blocking`/`enable_subreaper` (`VL-001`), and `Void::Argparse::Parser` native subcommands + `option_many` + `parse_detailed` (`VL-011`).
|
||
- Eliminated all custom help text and manual `--help`/subcommand/repeatable-flag parsing across `src/Main.cpp`, `src/Describe.cpp`, `registry/service/Main.cpp`, and `benchmarks/EngineBenchmarks.cpp` — 100% auto-generated via `Void::Argparse::Parser`.
|
||
- Upgraded root `build.cpp` to declare the complete `VoidBuildSystem` (`VoidBuildSdk`, `VoidBuildCore`, `GenerateBootstrapConfig`, `vbs`, `VoidBuildRegistry`, `vbs-registry`), fixed snapshot root discovery (`collect_snapshot_inputs`), fixed snapshot remapping of external/build-dir dependency includes in `Graph.cpp`, fixed CMake File API provider `Void::*` alias & header-only `INTERNAL_DEPS` export + transitive link ordering in `Provider.cpp`, and verified real Stage 1 + Stage 2 self-builds of `VoidBuildSystem` via `vbs build`!
|
||
- Wired a live thread-safe `Void::Log` console sink in `src/Main.cpp` (`--verbose`/`-v`, `--quiet`/`-q`) logging every build phase (`Config`, `Toolchain`, `Eval`, `Deps`, `Fetch`, `Provider`, `Snapshot`, `Graph`, per-action `[seq/total] Compile/Archive/Link/Action ...` progress, and `Test`) with elapsed timings.
|
||
- **Wave 7 (Plan 20 Slice 1 Bounded Native CMake Translation, Self-Testing `build.cpp`, `VL-009` `VOID_TEST`, & Warm Cache Hardening)**:
|
||
- Implemented Plan 20 Slice 1 in `include/Void/Build/Provider/Translator.hpp` and `src/Provider/Translator.cpp`: strict CMake File API `codemodel-v2` completeness audit (`audit_cmake_codemodel`), bounded C++ native `Graph::BuildGraph` translation (`translate_cmake_to_native_graph`, executing via VBS's toolchain driver/CAS/depfiles with zero `cmake --build`), and explicit `TranslationPolicy::RequireNative` vs `TranslationPolicy::FallbackToForeignBuild` resolution (`resolve_cmake_with_translation`), verified with equivalence, restored-mtime mutation, and unsupported `add_custom_command`/`UTILITY` fallback tests in `tests/FullV1Tests.cpp`.
|
||
- Added `tests/SelfBuildSmoke.cpp` (`project.test("vbs_self_smoke")`) to root `build.cpp` so both `vbs build` and `vbs test` build and execute a self-test directly on `VoidBuildSystem`.
|
||
- Verified VoidLibrary's upstream `VL-009` `VOID_TEST(suite, name)` self-registering test macro directly with zero CMake and zero scanner across colliding basenames (`alpha/Unit.cpp`, `beta/Unit.cpp`) in `tests/SelfHostTests.cpp`.
|
||
- Hardened warm-build caching in `src/State/StateStore.cpp` (stat-validated in-memory `DatabaseSnapshot` cache across `lookup_action` / `load_db_locked` / `save_db_locked`) and `src/Execution/Scheduler.cpp` (run-scoped thread-safe `RunDigestCache` with output invalidation), reducing 16-file warm no-op latency from `16ms` to `4ms` and 39-action Debug self-test warm verification from `18.82s` to `12.16s`.
|
||
|
||
- **Wave 8 (Plan 20 Slice 2A Bounded Native Meson Translation, Everyday DX CLI, & Post-v1 Expansion Roadmap)**:
|
||
- Implemented Plan 20 Slice 2A in `include/Void/Build/Provider/Translator.hpp` and `src/Provider/Translator.cpp`: configure-only Meson setup (`configure_meson_for_translation`, never `meson compile`), strict `meson-info/intro-targets.json` completeness auditing (`audit_meson_introspection`), internal `build.ninja` link-edge recovery and native `Graph::BuildGraph` lowering (`translate_meson_to_native_graph`), and unified `resolve_meson_with_translation` / `resolve_foreign_with_translation` (`RequireNative` vs `FallbackToForeignBuild`), verified end-to-end with C++ native execution and `custom_target` fallback in `tests/FullV1Tests.cpp`.
|
||
- Wired opt-in `--native-foreign` on `vbs build`/`vbs test` plus four everyday DX subcommands (`vbs init`, `vbs clean`, `vbs doctor`, `vbs graph --format dot|json`) into `Void::Argparse::Parser` in `src/Main.cpp`, verified end-to-end in `tests/FullV1Tests.cpp` and 32 CLI contracts in `tests/CliContracts.cmake`.
|
||
- Authored comprehensive 5-track post-v1 expansion plan in [21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md) (Track A zero-CMake self-host & full `VOID_TEST` suite; Track B extended foreign translation; Track C macOS/Windows/cross-compilation; Track D shared HTTP CAS & supply-chain provenance; Track E workspaces, daemon & DX).
|
||
|
||
- **Wave 9 (Track A — Zero-CMake Self-Hosting, Full `VOID_TEST` Migration, & Bit-Identical Stage 2 == Stage 3 Bootstrap)**:
|
||
- **Track A1 (`builder == "native"`)**: Extended `ProviderRequest` in `include/Void/Build/Provider/Provider.hpp` and implemented `run_native_provider` in `src/Provider/Provider.cpp` handling both pure `build.cpp` subprojects and built-in `VoidLibrary` recipe closure (`VOID_ENABLED_MODULES`), complete with `Log`/`Async`-complete `Testing` closure in `recipes/VoidLibrary/VoidLibraryRecipe.cpp`, reverse-DFS static archive link ordering, `Void::*` target aliasing, `MetadataOnly` cache isolation, and `/proc/self/exe`-first SDK/binary discovery in `src/Main.cpp`. Switched root `build.cpp`'s `VoidLibrary` dependency from `.cmake(...)` to `.native_builder(...)`.
|
||
- **Track A2 (Full `VOID_TEST` `VL-009` Migration & Complete Self-Test `build.cpp`)**: Converted all 40 existing test cases across `tests/{SdkDeclarations,ExampleContexts,CoreEngineTests,FullV1Tests,RegistryTests,SelfHostTests}.cpp` to VoidLibrary's self-registering `VOID_TEST(Suite, name)` macro, removed `VoidTestScanner.cmake` invocation from `CMakeLists.txt` and `tests/CMakeLists.txt`, and declared `vbs_benchmarks` plus all 5 `Void::Testing` executables (`vbs_sdk_tests`, `vbs_core_tests`, `vbs_v1_tests`, `vbs_registry_tests`, `vbs_selfhost_tests`) alongside `vbs_self_smoke` in root `build.cpp` (13 targets total).
|
||
- **Track A3 (Bit-Identical Stage 2 == Stage 3 Bootstrap)**: Removed `$BUILD_DIR` from `GenerateBootstrapConfig` (`binary_dir = ""`), added disjoint `{profile_build_dir, "/vbs-build"}` prefix mapping in `src/Graph/Graph.cpp`, emitted `-frandom-seed=<filename>` on deterministic GCC compiles and `TZ=UTC`/`LC_ALL=C` on links in `src/Toolchain/Driver.cpp`, and verified `sha256(stage2/vbs) == sha256(stage3/vbs)` (`9280ea998492cd3f48833cf87b06d91940c1f465f29f3871289c1e01bcf2e0b3`) plus `libVoidBuildSdk.a` and `libVoidBuildCore.a` bit-for-bit equality with `cmake` trapped on `PATH`.
|
||
- **Wave 10 (Track B [B1–B3] Foreign Translation Expansion + First-Class `vbs ide` & `build.cpp` CompDB Integration)**:
|
||
- **Track B1 (First-Class C Driver & Mixed C/C++ Translation)**: Added `CStandard` (`Default`, `C11`, `C17`, `C23`) across `include/Void/Build.hpp`, `src/Build.cpp`, and `src/Config/Frontend.cpp`; extended `ToolchainCapabilities`/`CompileRequest` in `Driver.hpp`/`Driver.cpp` with `c_compiler` discovery/probing/caching and C lowering; extended `Graph.cpp` & `CompDb.cpp` for C compilation and `c_standard` emission; and upgraded `Translator.cpp` + `Provider.cpp` to pass `-DCMAKE_C_COMPILER`/`CC` and lower multi-compile-group mixed C/C++ CMake and Meson targets cleanly with `PerFileOption`.
|
||
- **Track B2 (Bounded `build.ninja` `CUSTOM_COMMAND` Translation)**: Implemented shared `parse_ninja_custom_graph` & `CustomActionMaterializer` in `src/Provider/Translator.cpp` supporting hermetic CMake `add_custom_command`/`UTILITY` and Meson `custom_target`/`generated_sources` lowered to `TargetKind::CustomAction`, while explicitly rejecting `console` pools, `.util`-only side-effects, out-of-tree writes, in-tree codegen tools, and `run` targets.
|
||
- **Track B3 (Foreign CMake C++20 `CXX_MODULES` & NixOS `clang-scan-deps` Include Discovery)**: Populated `ToolchainCapabilities::default_include_dirs` from Clang `-E -v` so NixOS `clang-scan-deps` resolves standard library headers; added `external_module_bmis` + `ImportedTargetInterface::module_bmis` propagation in `ModuleScanner.{hpp,cpp}`, `Graph.{hpp,cpp}`, `Provider.cpp`, and `Translator.cpp`; lowered CMake `CXX_MODULES` `fileSets` natively on both GCC 16 and Clang 23, including VBS targets importing modules exported by translated CMake libraries.
|
||
- **IDE Integration (`build.cpp` CompDB & `vbs ide generate|query`)**: Added `project_build_descriptor_commands` indexing `build.cpp`/`build.profiles.cpp`/`build-support/` with `<Void/Build.hpp>` include paths in `compile_commands.json`; implemented `vbs ide generate` (non-destructive `.clangd` with GCC flag stripping, `.vscode/{tasks,launch,settings}.json`, `.zed/{tasks,debug}.json`, `.idea/customTargets.xml`) and `vbs ide query` workspace/target JSON output in `CompDb.{hpp,cpp}`, `Watcher.cpp`, `Main.cpp`, `tests/CliContracts.cmake`, and `tests/FullV1Tests.cpp`.
|
||
|
||
- **Wave 11 (Track D1–D2 Shared HTTP Action Cache & Parallel Snapshot Hashing)**:
|
||
- **D1**: Added `include/Void/Build/State/RemoteCache.hpp` + `src/State/RemoteCache.cpp` (bearer-authenticated HTTP CAS client with SHA-256 verification on every read), `StateStore` remote action/blob APIs, `/api/v1/cas/{blobs,actions}` endpoints with RBAC/audit in `vbs-registry`, build-path-independent remote action keys and normalized records in `Scheduler.cpp`, and `vbs build|test --remote-cache` / `--remote-cache-token-env` (plus `VBS_REMOTE_CACHE` / `VBS_REMOTE_CACHE_TOKEN`).
|
||
- **D2**: Snapshot capture revalidation now hashes on a bounded `Void::Concurrency::ThreadPool` for trees of 32+ files.
|
||
- **Docker verification**: built and tested in `voidlibrary-dev` (GCC 16.0.1, pinned VoidLibrary `3e25405`) with `8/8` CTest suites passing. D1 acceptance verified end-to-end: a cold `vbs build` populates the remote CAS, and a second clean build directory reports `0 executed` with the binary running. D2 benchmark on 5,001 files: `warm_noop_ms=374` (5,002 cached, 0 executed), meeting the sub-second gate. Also fixed the self-host recipe source list for `RemoteCache.cpp` and accepted GCC 16's `-lgcc_s_asneeded` system link flag.
|
||
|
||
- **Wave 12 (Track E2 Multi-Package Workspaces)**:
|
||
- Added the workspace SDK (`Void::Build::Workspace`, `workspace(Workspace&)`, `Project::workspace_dependency()`), `workspace.cpp` descriptor discovery/evaluation in `Config::Frontend`, and workspace orchestration in `src/Main.cpp`: each member builds with its own `build.cpp`/profiles while sharing the root `vbs.lock` and `build/.vbs` CAS.
|
||
- Cross-member linking resolves `workspace_dependency("lib").target("core")` to the member's native path provider through `VBS_WORKSPACE_MEMBER_<name>`; `--member <pkg>` and `--changed-since <ref>` select affected members. Member builds do not steal the project-root `compile_commands.json` alias, and path-dependency snapshots exclude generated editor metadata.
|
||
- **Docker verification**: `FullV1Tests.workspace_members_shared_build_and_member_selection` builds a 3-member workspace (shared library + app + test) with a unified root lockfile, runs the app, selects a single member, and selects by changed file; all 8 CTest suites pass.
|
||
|
||
- **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`.
|
||
- **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.
|
||
|
||
## 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 pending), Track E3 (`vbs daemon` local socket server + external editor plugins), and Track E4 (`Void::Net`/`Void::Sqlite` alignment) remain planned scope.
|
||
|
||
## Environment notes & upstream boundaries
|
||
|
||
- External VoidLibrary pin `3e254055e081a104f08df68dde39711bc7813518` is set in [CMakeLists.txt](../../CMakeLists.txt), [cmake/VoidDependency.cmake](../../cmake/VoidDependency.cmake), and [build.cpp](../../build.cpp). VBS never writes to `/home/faumaray/Projects/VoidLibrary`.
|
||
- `Void::Crypto` and `Void::Archive` now build unconditionally with zero external dependencies in `dev cpp-gcc`; only `SQLite3`, `Boost`/`OpenSSL` (`Void::Net`), and `conan` remain optional external prerequisites.
|
||
- See [VERIFICATION.md](VERIFICATION.md) for all observed builds, tests, Clang 23 matrix runs, formatting checks, benchmark results, and real self-build verification.
|