feat(profiles): per-dependency overrides, toolchain pin and profile CLI (G3)
VoidBuildSystem CI / 1 · Requirements (push) Successful in 5s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 2m50s
VoidBuildSystem CI / 2A · Linux build (coverage) (push) Successful in 3m29s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 4m7s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 1m53s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Successful in 4m22s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 3m22s
VoidBuildSystem CI / 3A · Linux test (coverage) (push) Failing after 1m57s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Successful in 2m0s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Successful in 19s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Successful in 18s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Failing after 7m8s
VoidBuildSystem CI / 3A · Linux test (debug) (push) Failing after 7m24s
VoidBuildSystem CI / 4A2 · VBS installers (linux target) (push) Skipped
VoidBuildSystem CI / 4A2 · VBS installers (windows target) (push) Skipped
VoidBuildSystem CI / 5 · Release (push) Skipped

- Dependency::profile(name, DependencyProfileOptions) records per-profile
  compile/link options, defines, LTO and sanitizers. The native provider
  applies the matching override to the dependency's own ProfileContext and
  hashes the overrides into the provider input hash, so changing them
  invalidates cached dependency builds.
- vbs-toolchain.toml pins compiler, minimum version, C/C++ standards and
  sysroot (optional strict); it is loaded once and checked after every
  toolchain probe. Drift warns by default and fails with
  --locked-toolchain or strict = true; malformed pins fail with the TOML
  diagnostic.
- vbs profile list|show|diff lists declared profiles with parents, prints
  a resolved profile (flags, standards, LTO, sanitizers, sysroot) or the
  fields that differ between two.

Verified: dependency_profile_overrides_apply_to_native_builds (a define
from the override is required by the dependency source),
toolchain_pin_detects_and_enforces_drift and
profile_commands_list_show_and_diff pass; vbs_core_tests 8/8; CLI
contracts pass; clang-format clean.
This commit is contained in:
faumaray committed 2026-12-06 20:09:50 +03:00
1 parent f03524628b
commit 3b5d28d7b0
13 files changed
+702 -4

No files matched your search

+2
View File
@@ -401,6 +401,8 @@ Stage: VERIFIED — Plans 01–19 + Plan 20 Slices 1–2C + Track A + Track B (B
## Remaining future scope
- **Wave 151 (Profiles and toolchain pinning, G3)**: `Dependency::profile(name, DependencyProfileOptions)` stores per-profile compile/link options, defines, LTO and sanitizers; the native provider applies the matching override to the dependency's own `ProfileContext` and includes the overrides in the provider input hash, so changing them invalidates cached dependency builds. `vbs-toolchain.toml` pins compiler, minimum version, C/C++ standards and sysroot (with a `strict` field); it is loaded once per build and checked after every toolchain probe, warning on drift or failing with `--locked-toolchain` (or `strict = true`). `vbs profile list|show|diff` lists declared profiles with parents, prints one resolved profile, or reports the fields that differ between two. Verified by `FullV1Tests.dependency_profile_overrides_apply_to_native_builds`, `toolchain_pin_detects_and_enforces_drift` and `profile_commands_list_show_and_diff`.
- **Wave 150 (Real feature flags, G2)**: `Project::feature(name, default_on)` (or `FeatureDescription`), `Target::require_feature(name)` (renamed because `requires` is a C++20 keyword), and `Dependency::when(feature)` for optional dependencies. `--features a,b` / `--no-default-features` on build/test/run/explain/deps (or `VBS_FEATURE`-style CLI only) perform additive unification: defaults (unless disabled) + features required by targets + requested features; enabled features add `VBS_FEATURE_<NAME>` compile definitions to every target (so action keys and the cache are feature-aware) and the descriptor JSON/`vbs metadata` expose declared features with their enabled state. Optional dependencies are filtered before resolution, so the lock contains only active ones; `vbs explain --show-features` prints the unified set with reasons (default/requested/required by target). Verified by `FullV1Tests.features_unify_defines_and_invalidate_action_keys` and `FullV1Tests.optional_dependencies_follow_feature_selection`.
- **Wave 149 (Trust layer, G5 start)**: `vbs attest create|verify` produces and verifies DSSE-wrapped in-toto Statement v1 / SLSA provenance v1 attestations (subjects, build definition with project/profile/targets/lock revision, internal parameters, run details) signed with the existing Ed25519 primitives; verification requires a trusted key, checks the DSSE PAE signature and requires every supplied artifact digest to be covered. `vbs audit --advisories OSV.json` matches OSV records (introduced/fixed/last_affected/limit ranges and exact versions) against `vbs.lock` packages with a severity threshold and JSON output; `vbs doctor` reports the signing backend. Unsignable hosts fail closed. Verified by `FullV1Tests.attest_create_and_verify_detects_tampering` (valid, wrong artifact, tampered payload, untrusted key, missing keys) and `FullV1Tests.audit_matches_osv_advisories_against_lock` (affected/fixed versions, severity thresholds, JSON).
+1
View File
@@ -150,4 +150,5 @@ Base HEAD: `fe0d1a6`
| Wave 148 (Hermetic sandboxing) | `Sandbox::sandbox_supported`, `Sandbox::apply_sandbox`, hidden `vbs __sandbox-exec` wrapper, `--sandbox=off|warn|strict`/`VBS_SANDBOX`, project read-only + build root writable + system/toolchain roots read-only, doctor reporting, CI strict smoke step | COMPLETE & VERIFIED (GCC 16.2; `sandbox_strict_allows_project_builds_and_hides_outside_files` passes: strict build succeeds and an action reading an outside file fails; CLI contracts pass) | `include/Void/Build/Sandbox/Sandbox.hpp`, `src/Sandbox/Linux/NamespaceSandbox.cpp`, `include/Void/Build/Execution/Scheduler.hpp`, `src/Execution/Scheduler.cpp`, `src/Main.cpp`, `.gitea/workflows/ci.yml`, `tests/{FullV1Tests,CliContracts}`, docs |
| Wave 149 (Trust layer) | `vbs attest create\|verify` (DSSE + in-toto Statement v1 + SLSA provenance v1, Ed25519 over the PAE, trusted-key and subject-digest enforcement), `vbs audit --advisories OSV.json` (introduced/fixed/last_affected/limit ranges, severity threshold, JSON), signing availability in `vbs doctor` | COMPLETE & VERIFIED (GCC 16.2; `attest_create_and_verify_detects_tampering` and `audit_matches_osv_advisories_against_lock` pass; CLI contracts pass) | `include/Void/Build/Provenance/Attestation.hpp`, `src/Provenance/Attestation.cpp`, `include/Void/Build/Package/Audit.hpp`, `src/Package/Audit.cpp`, `src/Main.cpp`, `tests/{FullV1Tests,CliContracts}`, docs |
| Wave 150 (Feature flags) | `Project::feature`, `Target::require_feature`, `Dependency::when`, additive unification, `--features`/`--no-default-features`, `VBS_FEATURE_*` defines, feature-aware action keys, optional dependency filtering, `explain --show-features`, metadata feature list | COMPLETE & VERIFIED (GCC 16.2; `features_unify_defines_and_invalidate_action_keys` and `optional_dependencies_follow_feature_selection` pass; CLI contracts pass) | `include/Void/Build.hpp`, `sdk/Build.cpp`, `include/Void/Build/Graph/Graph.hpp`, `src/Graph/Graph.cpp`, `src/Main.cpp`, `tests/{FullV1Tests,CliContracts}`, docs |
| Wave 151 (Profiles + toolchain pinning) | `Dependency::profile` overrides for native dependency builds (hash-aware), `vbs-toolchain.toml` pin + drift detection (`--locked-toolchain`, `strict`), `vbs profile list\|show\|diff` | COMPLETE & VERIFIED (GCC 16.2; the three G3 tests pass; CLI contracts pass) | `include/Void/Build.hpp`, `sdk/Build.cpp`, `src/Graph/Graph.cpp`, `src/Provider/Provider.cpp`, `include/Void/Build/Toolchain/Pin.hpp`, `src/Toolchain/Pin.cpp`, `src/Main.cpp`, `tests/{FullV1Tests,CliContracts}`, docs |
| Future (Plans 23–24) | Gap closure and superiority tracks | PLANNED (see the plans for per-track acceptance gates) | [23-remaining-upgrade-plan.md](../roadmap/23-remaining-upgrade-plan.md), [24-superiority-tracks.md](../roadmap/24-superiority-tracks.md) |
+8
View File
@@ -217,6 +217,14 @@ to additive preprocessor-visible configuration and documents the rule.
### G3 — Profiles, per-package overrides and toolchain pinning *(M)*
**Status: implemented (Wave 151).** `Dependency::profile(name, DependencyProfileOptions)`
(compile/link options, defines, LTO, sanitizers) is applied by the native provider to the
dependency's own `ProfileContext` and included in the provider input hash; `vbs-toolchain.toml`
pins compiler/minimum version/C and C++ standards/sysroot and is checked after probing (warn, or
fail with `--locked-toolchain` or `strict = true`); `vbs profile list|show|diff` covers
inheritance inspection and resolved flags. Foreign providers (CMake/Meson) still receive only
their options map; mapping per-profile overrides onto their build types is future work.
**Beats:** Cargo (per-package profile overrides), CMake/Meson (no per-package profiles).
**Work items.**