docs: add VoidBuildSystem handbook
This commit is contained in:
1 parent
1f9a5d5804
commit
00e14bae98
19 files changed
+3240
No files matched your search
@@ -0,0 +1,138 @@
|
||||
---
|
||||
title: Quality, Benchmarks and Known Limits
|
||||
description: Test suites, contract checks, fuzzing, benchmarks, platform status and the gaps to plan around in 1.0.0
|
||||
section: Quality & Status
|
||||
badge: status
|
||||
order: 1
|
||||
tags: [quality, testing, fuzzing, benchmarks, platforms, gaps, limitations, status]
|
||||
updated: 2026-12-06
|
||||
---
|
||||
|
||||
# Quality, Benchmarks and Known Limits
|
||||
|
||||
This page is deliberately conservative: it separates what is exercised from what is implemented, and records the gaps that matter when adopting or extending VBS 1.0.0.
|
||||
|
||||
## Test layers
|
||||
|
||||
| Layer | Entry point | What it proves |
|
||||
| --- | --- | --- |
|
||||
| Declaration SDK | `vbs_sdk_tests` | Target/profile records, visibility, handle lifetime, UTF-8 JSON |
|
||||
| Core engine | `vbs_core_tests` | SHA-256, process supervision, profiles, snapshots, state/CAS, end-to-end build |
|
||||
| v1 integration | `vbs_v1_tests` | CompDB, providers, packages, install, modules, daemon, signing, IDE, workspaces |
|
||||
| Registry | `vbs_registry_tests` | HTTP API, RBAC, CSRF, CAS, remote cache, workers, live CLI E2E |
|
||||
| Self-host | `vbs_selfhost_tests` | Native self-host, `VOID_TEST` generation, bit-identical rebuilds |
|
||||
| SDK registration | `vbs_sdk_registration` | Self-registering cases and named execution |
|
||||
| CLI contracts | `vbs_cli_contract` | Help, subcommands, repeatable flags, error contracts |
|
||||
| Description contracts | `vbs_description_contract` | Four profile/compiler contexts and describe errors |
|
||||
|
||||
The CMake bootstrap exposes these as eight CTest entries. The self-hosted description declares the same suite executables as `project.test(...)` targets, so `vbs test` runs them without CMake.
|
||||
|
||||
```sh
|
||||
dev cpp-gcc -c ctest --test-dir build --output-on-failure
|
||||
build/bin/vbs test --build-dir build/vbs-stage2 --profile release --jobs 8
|
||||
```
|
||||
|
||||
The integration suites create temporary projects, compile real binaries, start real registry servers on loopback, run CLI processes, and assert outputs and exit codes. A passing test run is the acceptance signal; a design document is not.
|
||||
|
||||
## What the suite exercises
|
||||
|
||||
- Native C/C++ builds, static/shared/object/header-only targets, custom actions, assembly, shaders.
|
||||
- Profiles, inheritance, cycles, sanitizer compatibility, LTO and unity lowering.
|
||||
- Snapshots, mutation detection, symlinks, header shadowing, state recovery and GC.
|
||||
- GCC 16 and Clang 23 modules, partitions, header units, cross-target BMIs.
|
||||
- CMake/Meson providers, bounded native translation, custom commands, mixed C/C++ and C++20 modules.
|
||||
- TOML parsing, solver oracle, lock CAS, archive safety, install/relocation, CMake bridge.
|
||||
- Registry RBAC, immutability, CSRF, XSS-safe UI, ETag/304, ranges, binary variants, yank.
|
||||
- Remote cache round trips, worker leases/queue/execution, parallel workers.
|
||||
- Daemon lifecycle and all request families.
|
||||
- Signing primitives, trusted-key policy, lockfile signature round trips.
|
||||
- Workspace member builds, shared lock/CAS, `--changed-since` selection.
|
||||
- IDE compdb projection, ticket races, editor presets, File API replies, plugin assets.
|
||||
- JUnit, CDash, coverage, test labels/resources/fixtures.
|
||||
|
||||
## What is not covered or not proven
|
||||
|
||||
:::callout{type="warning" title="Treat these as unverified until you reproduce them"}
|
||||
- **PCH**: lowering exists, but there is no capability probe and no end-to-end PCH test.
|
||||
- **MemorySanitizer / LeakSanitizer**: flags exist, but only ASan/UBSan/TSan are probed; MSan/LSan requests can fail at the compiler.
|
||||
- **Native Windows host**: partial `_WIN32` backends exist, but `host_supported()` reports Linux only, the daemon and registry are not built on Windows, and CI only cross-builds and runs under Wine.
|
||||
- **Wine-hosted suite**: SDK/core only, marked non-blocking; `vbs_v1_tests` and `vbs_selfhost_tests` do not run under Wine.
|
||||
- **Daemon metadata requests** for projects that link provider-imported targets: they lower without imports and can fail.
|
||||
- **Conan as a `vbs build` source dependency**: the adapter exists, but standalone `.conan(...)` materialization is not wired.
|
||||
- **Single-file incremental rebuilds**: action keys include the whole snapshot id; only a true no-op is fully cached.
|
||||
- **Streaming downloads**: package and registry responses are buffered in memory in 1.0.0.
|
||||
- **CMake bridge package deps**: registry package sources cannot be materialized through the bridge.
|
||||
- **Remote execution sandboxing**: none; action specs run with worker privileges.
|
||||
- **Registry backup completeness**: the C++ backup helper omits binary blobs and the action cache.
|
||||
:::
|
||||
|
||||
## Fuzzing
|
||||
|
||||
Two harnesses exist:
|
||||
|
||||
1. **Deterministic mutation harness** (`CoreEngineTests.fuzz_mutated_inputs_never_crash_parsers`): fixed-seed xorshift mutations, truncation, overwrite runs and junk insertion over TOML, JSON, lockfile and tar seeds; seed sanity checks prevent a vacuous run.
|
||||
2. **Clang/libFuzzer target** (`fuzz/fuzz_parsers.cpp`, `fuzz/run.sh`): JSON, SemVer range and strict SemVer entry points, with a seeded corpus and ASan/UBSan.
|
||||
|
||||
The fuzz target covers header-only parsers. TOML, lockfile and tar stay in the deterministic mutation harness because their implementations are not header-only. Run:
|
||||
|
||||
```sh
|
||||
dev cpp -c fuzz/run.sh
|
||||
```
|
||||
|
||||
A clean fuzz run is evidence for crash resistance, not a proof of correctness.
|
||||
|
||||
## Benchmarks
|
||||
|
||||
`vbs_benchmarks --files N` measures engine operations. `benchmarks/compare.sh` generates a project and times VBS against CMake/Ninja and Meson for cold and warm builds.
|
||||
|
||||
```sh
|
||||
build/bin/vbs_benchmarks --files 15
|
||||
benchmarks/compare.sh 20
|
||||
```
|
||||
|
||||
Benchmark numbers are environment-specific and have moved with optimization waves; measure on your own hardware and toolchain. The documented performance target is warm-build latency (descriptor identity caching, parallel snapshot hashing, stat-validated state), not a cross-tool marketing claim. Large-repo scaling and per-file incremental reuse remain open.
|
||||
|
||||
## Platform status
|
||||
|
||||
| Host / target | Status |
|
||||
| --- | --- |
|
||||
| Linux x86_64 host | Supported and exercised |
|
||||
| Linux aarch64 host | Architecture-aware probes exist; not exercised in CI |
|
||||
| Windows x86_64/aarch64 target from Linux | Supported via MinGW-w64; tests require Wine |
|
||||
| Native Windows host | Partial port; not a supported host in 1.0.0 |
|
||||
| macOS host/target | Deferred; backends are not implemented |
|
||||
| Registry service | POSIX only |
|
||||
| Daemon | POSIX only |
|
||||
|
||||
Cross-target builds emit PE artifacts (`.exe`, `.dll`). Static archives keep the `lib<name>.a` convention. Wine tests resolve the literal `wine` executable; `wine64` is not tried.
|
||||
|
||||
## Security and trust boundaries
|
||||
|
||||
- `build.cpp` is compiled native code with user privileges. Snapshots and process isolation are not a sandbox.
|
||||
- Remote cache records and worker action specs are trusted input. A worker executes arbitrary commands from the registry.
|
||||
- Registry private packages are hidden from anonymous access but readable by any authenticated `read` principal.
|
||||
- Registry sessions, workers, leases and queues are in-memory and lost on restart.
|
||||
- Bearer tokens are runtime-only and never written to locks or action records.
|
||||
- Package signatures are verified by consumers, not by the registry. Installer signatures cover a canonical digest message.
|
||||
- The registry has no built-in TLS, rate limiting or login throttling; deploy it behind a trusted proxy.
|
||||
|
||||
## Documentation status
|
||||
|
||||
This handbook documents **VoidBuildSystem 1.0.0** at the `v1.0.0` tag. The repository's `docs/roadmap/` contains historical design plans and some statements that lag the implementation (for example, features listed as planned that are now implemented, or pin hashes from earlier waves). When the handbook and a roadmap page disagree, prefer the code and the current tests, then update the page.
|
||||
|
||||
## Adoption checklist
|
||||
|
||||
:::steps
|
||||
@@step[Verify the toolchain]
|
||||
Run `vbs doctor` on every host and target combination you depend on.
|
||||
@@step[Pin and lock]
|
||||
Commit `vbs.lock`; use `--locked` in CI; decide whether to require trusted keys.
|
||||
@@step[Prove the round trip]
|
||||
Build, test, install, unpack the archive, and run the installed product from a clean prefix.
|
||||
@@step[Check the edges]
|
||||
Exercise the specific feature you rely on: PCH, Conan, daemon metadata, Wine tests or registry backup.
|
||||
@@step[Measure]
|
||||
Run the benchmark on your project before making performance claims.
|
||||
:::
|
||||
|
||||
If a limitation above blocks adoption, treat it as a tracked gap rather than a configuration mistake. The design intentionally fails explicitly instead of approximating behavior.
|
||||
Reference in new issue
Block a user