Skip to content

Platform validation evidence ​

scripts/validate_platform.py is the repeatable end-to-end validation harness for platform-sensitive behavior. It exercises direct and CMake builds, a Unicode path containing spaces, incremental rebuilds, cached toolchain verification, doctor metadata, coverage reports when host GCC/Clang coverage tools exist, process-tree termination, and optional deep paths.

Run it from a source checkout after installing the declared runtime dependencies:

bash
python -m pip install -e .
python scripts/validate_platform.py --cold-cache --deep-path --timeout 300 --output report.json

--cold-cache uses an isolated empty CLAP cache, so the first direct run includes the pinned toolchain download and cold compiler-runtime cache population. --deep-path creates a project path longer than 270 characters. On Windows, creating that path requires operating-system long-path support; if the OS cannot create it, the harness records an environment skip rather than blaming CLAP. When the path can be created, CLAP is invoked from a short working directory with deep source/output paths, matching the documented supported Windows workflow.

One-liner installer validation (0.60.0) ​

On 2026-12-03 the rustup-style Windows installer was validated end-to-end on a bare Windows Server 2022 AMD64 machine by the native platform agent, with any pre-existing pip-installed clap copies removed first so nothing could mask the result:

  • irm https://bratan-corp.github.io/clap/install.ps1 | iex downloaded the release portable zip, extracted it to %LOCALAPPDATA%\Programs\clap (layout clap.exe + python\ verified), wrote the user PATH entry in the registry, and printed clap 0.60.0 — all without touching system Python, because there is none in the zip's world.
  • In a fresh shell with PATH rebuilt exactly as a new terminal would see it, Get-Command clap resolved to the portable copy, clap init hello plus clap run printed Hello from CLAP with no Visual Studio or MinGW anywhere on the machine.
  • The curated registry worked from the portable install: clap add doctest pinned sha256 44faa038e9c3… and vendored, clap add stb-truetype pinned sha256 428cfe93520f… — the newer registry entries included.

The same round independently confirmed the clap init --template test discovery papercut on Windows (bare clap test could not see tests/), which drove the 0.61.0 error hint and the 0.62.0 auto-discovery fix. The POSIX installer (install.sh) was validated end-to-end in sterile ubuntu:24.04 containers on both supported paths (pipx-present and pip-only), each run finishing at a working clap run hello-world.

macOS pkg-config dependency shapes ​

On macOS arm64 with CLAP 0.48.1 and a temporary pkgconf 3.0.11 install, three dependency shapes passed end to end (clap lock, clap deps, clap build, clap run all exit 0; pkgconf was removed afterwards):

ShapeVersionProgram output
openssl4.0.3OpenSSL 4.0.3 29 Sep 2026
sqlite33.51.0sqlite 3.51.0
libpng1.6.59libpng 1.6.59

clap deps reported each shape as ok with the resolved version; pkg-config cflags/libs flowed through to the compile and link lines without manual flags.

PyPI 0.48.0 release validation ​

Published clap-compiler==0.48.0 was validated on 2026-12-03 by the Windows and macOS platform agents against the live PyPI artifact.

On Windows Server 2022 AMD64 all five checks passed: fresh-venv install with clap --version printing clap 0.48.0, clap init plus clap run printing Hello from CLAP, doctest success, atomic vendor archive extraction of the nlohmann tarball (vendored 53 files, sha256 verified) with a compile against the vendored include tree, and a clap run --watch rebuild smoke. The CI-built portable zip — the first one produced and attached automatically by the release workflow — passed on a stripped PATH without system Python: clap.exe --version printed clap 0.48.0 and a fresh project ran end to end (zip 54.2 MB, layout clap.exe + python\ + ninja.exe correct).

On macOS arm64 all five checks passed with the same shape. This round also caught a real user-facing defect in the vendor success hint (the printed -I flag pointed at the extraction root, which cannot satisfy includes for real archive layouts) — fixed in 0.48.1 by scanning the extracted tree for conventional include roots, proving the validation loop finds bugs rather than rubber-stamping releases.

PyPI 0.47.0 release validation ​

Published clap-compiler==0.47.0 was installed with pip --no-cache-dir in clean virtual environments on 2026-12-03. The release workflow verified exact GitHub/PyPI artifact hashes before publication.

On Windows Server 2022 AMD64, install passed, clap --version printed clap 0.47.0, fresh clap init plus clap run printed Hello from CLAP. The archive vendoring workflow passed end to end: clap vendor …/json.tar.xz --sha256 d6c65aca… printed vendored 53 files into …\vendor\json (110988 bytes downloaded, sha256 verified), and a main.cpp using #include <nlohmann/json.hpp> with j = answer compiled and printed json answer: 42 via clap run main.cpp -I vendor/json/single_include. The release portable zip (54.2 MB) passed on a stripped PATH without system Python: clap.exe --version printed clap 0.47.0 and a demo project printed Hello from CLAP. The doctest template passed: clap init --template doctest plus clap test ran 2/2 test cases with the pinned header from cache, [doctest] Status: SUCCESS!.

On macOS arm64, install passed in 41.8s including the one-time private Zig bootstrap. Archive vendoring passed in 0.83s with the identical verified output, the nlohmann compile printed json answer: 42 in 12.4s, the doctest template passed 2/2, and a clap run --watch smoke test rebuilt and restarted within 1.3s of a source edit, printing Change detected; restarting...; SIGINT stopped the watch cleanly with no leftover processes.

On Linux x86_64 the maintainer VM install passed with the same clap 0.47.0/Hello from CLAP flow. No defects were found on any platform.

PyPI 0.43.0 release validation ​

Published clap-compiler==0.43.0 was installed with pip --no-cache-dir in clean virtual environments on 2026-12-02. The release workflow had already verified exact GitHub/PyPI artifact hashes.

On Windows Server 2022 AMD64 with Python 3.13.12, install passed in 7.2s, clap --version printed clap 0.43.0, fresh clap init plus clap run --offline printed Hello from CLAP in 4.02s wall time, and clap test tests -j 2 passed 2/2 in 0.658s. A default-Ninja syntax-error build printed the real compiler diagnostics with source/caret output rather than only Build failed; no orphaned compiler processes remained. An isolated-cache first-run approximation passed in 53.57s, including 28.93s of pinned toolchain download/verification and 24.48s of cold compilation. This was the existing validation VM, not an independent fresh VM.

On macOS arm64 with Python 3.9.6, install passed in 22.477s, clap --version printed clap 0.43.0, clap run --offline printed Hello from CLAP in 8.373s, and clap test tests -j 2 passed 2/2. Human and JSON modes printed/exposed the real compiler diagnostic for a syntax error. Controlled toolchain checks showed consistent labels: empty-cache offline mode selected system clang in both modes, while a populated private cache selected Zig in both modes; the earlier one-off mismatch did not reproduce and its exact cause is undetermined. No defects were found in 0.43.0.

The restored scripts/clean-machine-demo.ps1 itself was run on the existing Windows VM from the clap-clean-machine-demo branch and exited 0 end to end after creating a temporary venv, installing 0.43.0, using isolated empty CLAP/Zig caches, bootstrapping pinned Zig, and running the demo projects.

PyPI 0.42.0 release validation ​

Published clap-compiler==0.42.0 was installed with pip --no-cache-dir in clean virtual environments on 2026-12-02. The release workflow had already verified exact GitHub/PyPI artifact hashes.

On Windows Server 2022 AMD64 with Python 3.13.12, install passed in 11.263s, clap --version printed clap 0.42.0 in 0.143s, clap init passed in 0.119s, and clap run --json printed Hello from CLAP in 5.433s wall time (JSON total 5.306s). The new direct-test directory mode passed with -j 2: two independent executables passed in 0.967s wall time.

On macOS arm64 with Python 3.9.6, install passed, clap --version printed clap 0.42.0 in 0.146s, clap init passed in 0.081s, and an offline Apple Clang run printed Hello from CLAP in 1.271s wall time. clap test tests -j 2 passed both tests; the first run took 12.169s while a warm repeat in JSON mode took 0.287s. No defects were found on either platform.

Parallel direct-test validation ​

Parallel direct tests were validated locally on Linux x86_64 on 2026-12-02 with two independent C test binaries that each slept for one second. clap test test_one.c test_two.c --offline --system --json -j 2 completed in about 1.13 seconds wall time, demonstrating overlap rather than sequential two-second execution, and both test cases retained deterministic source order in the JSON report. The feature is explicitly opt-in because independent test binaries may still share external files or resources.

pkg-config zlib validation ​

The examples/pkg-config-zlib direct dependency workflow was validated on 2026-12-02 against the main-branch content that is now tagged v0.44.0 (pre-rewrite commit references were invalidated by the history cleanup; the validated content is unchanged).

On Windows Server 2022 with Python 3.13.12, a machine without pkg-config failed fast in clap lock/clap run. After a non-destructive Scoop pkg-config installation plus a locally built pkg-config-visible zlib 1.3.1, clap lock wrote exact cflags/libs, clap run printed zlib 1.3.1 roundtrip: 24 -> 32 bytes, clap deps reported ok, and a deliberately mismatched zlib.pc version produced the exact lock mismatch error until restored. The validation exposed missing-executable error/action wording gaps rather than flag-resolution defects.

On macOS arm64, pkg-config was initially absent; clap lock, clap build, and clap run failed fast while clap deps reported zlib unavailable. With Homebrew pkgconf temporarily installed, the macOS SDK's system zlib 1.2.12 pkg-config file was visible. Lock, build, run (zlib 1.2.12 roundtrip: 24 -> 32 bytes), deps, deliberate lock mismatch detection, and lock refresh all passed; pkgconf was removed afterward. The validation exposed the same missing-executable guidance gap and an overstated no-op progress label.

npm wrapper validation ​

The unpublished npm packaging draft was packed locally with Node 24/npm 11 on 2026-12-02. The maintainer-side preparation step downloaded the pinned PyPI wheel and verified SHA-256 9e2c5d146732253bf0644f5444d3298233ec5ee337c7cad5314930a993b77df1. The generated tarball contained the wheel, installed successfully into a fresh npm project, extracted the wheel during postinstall, printed clap 0.41.0, and compiled a smoke main.c successfully with --system --offline. This validates the wrapper mechanics only; the package has not been published to npm.

ARM64 cross-profile validation ​

The linux-arm64 and windows-arm64 profiles were validated locally on Linux x86_64 with the pinned Zig 0.17.1 toolchain on 2026-12-02. Both profiles compiled successfully offline. file identified the outputs as an ELF 64-bit ARM aarch64 executable and a PE32+ Aarch64 Windows executable respectively. These are compile/link validation results, not runtime execution results on ARM64 hosts.

vcpkg manifest-mode validation ​

The examples/vcpkg-manifest-fmt project was validated end-to-end on 2026-12-02. On macOS arm64 the first run exposed the external vcpkg prerequisite that pkg-config was missing; after temporarily installing pkgconf, the exact clap test . --vcpkg-root ... --vcpkg-triplet arm64-osx --json flow passed in about 11 seconds. vcpkg installed fmt:arm64-osx into build/vcpkg_installed, CLAP injected the vcpkg CMake toolchain and used private Zig as the outer CMake compiler, CTest passed 1/1, and the binary printed fmt manifest example: 42.

On Windows Server 2022 the same manifest flow correctly entered vcpkg manifest mode but stopped with vcpkg’s exact error that triplet x64-windows requires a valid Visual Studio instance. This is an external vcpkg/MSVC prerequisite rather than a hidden CLAP failure; the error was propagated clearly in structured output. Consequently the example documentation and clap deps guidance now state these prerequisites explicitly instead of implying that vcpkg manifest mode is zero-setup on every platform.

AUR package validation ​

The AUR draft was validated in a clean archlinux:latest Docker container on 2026-12-02. After installing Arch build/runtime dependencies, makepkg -f --nodeps built the pinned 0.42.0 source archive, pacman -U installed the resulting package, clap --version printed clap 0.42.0, and an offline system-GCC compile/run printed aur-ok in about 0.22s of measured CLAP time. This validates the draft in Arch tooling; it is still not submitted to or published in the AUR. The 0.43.0 pin update was revalidated in the same clean container flow after the validation harness was corrected to install the declared Python build backend dependencies explicitly.

Snap packaging validation status ​

The Snap draft has static version/hash consistency coverage, but no claimed native Snapcraft validation yet. Current Snapcraft for core24 is distributed primarily as a snap and requires a working snapd-capable host; the legacy Ubuntu 22.04 snapcraft apt package is too old for the draft. Docker on this maintainer VM does not provide snapd semantics by itself. Until a suitable Snapcraft environment is validated, packaging/snap/snapcraft.yaml remains an unvalidated draft rather than evidence of a working Snap package.

Nix package validation ​

The Nix draft was validated in a clean nixos/nix:latest Docker container on 2026-12-02. Initial validation exposed two real draft defects: top-level CMake/Ninja buildInputs activated an irrelevant CMake configure phase, and the Python runtime dependency checker could not reconcile exact pip helper-wheel pins with distro CMake/Ninja packaging. After correction, nix-build completed, clap --version printed clap 0.42.0, doctor output contained Nix store paths for CMake and Ninja, and a private-Zig compile/run smoke printed nix-ok. This validates the draft in real Nix tooling; it is still not submitted to or published in nixpkgs. The 0.43.0 pin update was revalidated in the same clean container flow after the harness was corrected to pass the expected version from the host because the minimal Nix image lacks sed.

Chocolatey draft validation ​

The Chocolatey package was validated on Windows Server 2022 with real Chocolatey 2.7.5 on 2026-12-02. The initial manual-shim version installed successfully with all dependencies, passed hash verification, clap --version, a private-Zig hello-world compile in 3.9s, doctor detection of Chocolatey CMake/Ninja, and uninstall. Review of that run led to a cleaner implementation using Install-BinFile/Uninstall-BinFile plus tools\clap.cmd. The corrected package was then packed and installed end-to-end: the generated clap.exe shim resolved the payload correctly, clap --version printed clap 0.42.0, a compile smoke printed choco194-ok, and uninstall removed the shim artifact. Tagged-release publication is automated through .github/workflows/release.yml once the CHOCOLATEY_API_KEY Actions environment secret is configured.

Scoop manifest validation ​

The initial Scoop draft was validated on Windows Server 2022 with Scoop 0.6.0 on 2026-12-02. Installation, hash verification, launcher generation, shim creation, clap --version, a warm-cache direct hello-world build, and uninstall all passed. Native validation also exposed a real packaging defect: extracting the wheel bypasses pip dependency installation, so CMake and Ninja were absent. The corrected draft declares Scoop cmake and ninja dependencies instead of relying on missing pip-installed Python wheels. Revalidation passed install, version, doctor detection of CMake/Ninja, a CMake+CTest scenario in 1.38s, and uninstall cleanup. The 0.43.0 wheel-based manifest was then validated both as a direct manifest and end-to-end through the live public bucket: scoop bucket add claptest https://github.com/BRATAN-CORP/scoop-clap, scoop install claptest/clap-compiler, clap --version (clap 0.43.0), a cold-cache hello-world compile, uninstall, and bucket cleanup all passed. The public bucket is therefore current-release coverage, not merely a local draft.

Windows GCC/MinGW coverage validation ​

Windows coverage reporting was validated on 2026-12-02 against the main-branch content now tagged v0.44.0 on Windows Server 2022 with Python 3.13.12, MinGW-Builds GCC 16.2.0, and gcov 16.2.0. clap test branchy.c --system --compiler gcc --coverage-report coverage-out --coverage-fail-under 1 --json exited 0 in 0.254s; the report contained .gcov, coverage-summary.json, coverage.xml, index.html, and text output with line rate 0.8889 and branch rate 0.75 on the branch fixture. The pinned-Zig control still failed fast in 0.218s with the explicit unsupported-toolchain error. During validation, the Chocolatey mingw package reported success but did not deploy usable compiler binaries on that VM; the successful toolchain came from Scoop's winlibs MinGW package. This is packaging-environment evidence, not a CLAP defect.

Homebrew formula validation ​

The Homebrew draft was validated on macOS arm64 with Homebrew 7 on 2026-12-02. Initial validation exposed real draft defects: the formula missed include Language::Python::Virtualenv, used deprecated formula lookup style, and manually invoked a pip executable that is absent because Homebrew creates virtualenvs with --without-pip. After correction, the exact draft passed ruby -c, brew audit --strict, brew install --build-from-source, brew test, and manual smoke checks: clap --version printed clap 0.41.0 and clap completion bash emitted the expected bash completion. The temporary tap and installed dependencies were removed afterward. This validates the local draft behavior; it is still not submitted to or published by Homebrew.

PyPI 0.41.0 release smoke validation ​

These release-validation runs were performed on 2026-12-02 against the published PyPI artifact in clean virtual environments, using pip --no-cache-dir install clap-compiler==0.41.0. They validate the exact artifact users install rather than only a source checkout.

CheckmacOS arm64, Python 3.9Windows Server 2022, Python 3.13
clap --versionclap 0.41.0 in 0.367sclap 0.41.0 in 0.13s
fresh clap initpassed in 0.067spassed in 0.12s
fresh clap runpassed in 21.956s isolated cold cachepassed in 3.95s with warm Zig runtime cache
completion generationbash/zsh/fish passedbash/zsh/fish passed
coverage behaviorClang coverage passed in 0.984s; index.html, XML, JSON, text, and .gcov writtenpinned-Zig coverage failed fast in 0.19s with the documented unsupported-toolchain error
leftover compiler processesnone reportedzero orphaned zig/ninja/clang processes

The macOS cold run decomposes into toolchain preparation 15.414s, compile 6.467s, run 0.003s, total 21.884s in structured timing. The macOS coverage summary reported line rate 1.0 and branch rate 0.5 on the small branch fixture. These are single-machine smoke results, not performance guarantees.

Baseline single-run results ​

These are single validation runs recorded on 2026-12-02 with the platform-validation harness as of the v0.44.0 tag. They are evidence of real platform behavior, not performance guarantees or statistically rigorous benchmarks.

ScenarioLinux x86_64, Python 3.10macOS arm64, Python 3.9Windows Server 2022, Python 3.13
cold-cache direct run16.871s13.841s55.560s
incremental no-op build0.116s0.185s0.210s
toolchain verify0.398s0.336s1.240s
CMake + CTest0.627s0.796s1.100s
coverage report0.249s0.169sskipped: no GCC/gcov
deep-path direct run0.137s warm-cache run0.306sskipped: OS long paths disabled
process-tree terminationpassedpassedpassed

All non-skipped scenarios passed in these runs. The Windows cold-cache direct time includes both the pinned Zig download and first cold compile; subsequent no-op builds are subsecond because the runtime and project caches are warm.

Phase-level warm-cache timings ​

The harness also preserves the structured timing object emitted by CLAP for successful direct and CMake scenarios. The following single-run phase timings were recorded with --offline --deep-path as of the v0.44.0 tag; unlike the cold-cache table above, these runs used already installed toolchains. Wall-clock elapsed time additionally includes Python startup, JSON rendering, and harness process management.

Scenario / phaseLinux x86_64, GCCmacOS arm64, Apple ClangWindows Server 2022, Zig
direct toolchain selection0.008s0.016s0.059s
direct compile+link0.052s0.077s0.198s
direct executable run0.001s0.003s0.018s
no-op direct compile check0.005s0.005s0.007s
CMake toolchain selection0.007s0.015s0.058s
CMake configure0.314s0.269s0.573s
CMake build0.049s0.076s0.205s
CTest run0.005s0.013s0.046s

These numbers are regression signals, not benchmarks. Large changes in compile on the no-op scenario, unexpected growth in configure time, or a persistent gap between phase time and wall-clock time are the useful signals.

Generated release automation — end-to-end proof (2026-12-03) ​

clap init --ci output validated in vivo in a scratch org repository: project scaffolded with --template cpp --ci (which pins setup-clap@v0.69.0), pushed, tagged. First run exposed a structural bug — the generated workflow triggered on push: branches: [main] only, so the tag-gated release job could never fire (zero release runs on the v0.1.0 tag push). After the template fix (tags: ['v*']), the v0.2.0 tag push ran the release job green: cross-compiled linux-x86_64-musl.tar.gz, linux-arm64-musl.tar.gz, windows-x86_64.zip plus checksums.txt attached to the GitHub release automatically. Artifact-level verification: the windows zip contains a single demo.exe with valid PE magic. Evidence repo: BRATAN-CORP/clap-ci-proof (private).

2026-12-04 — full-registry Windows cross-compile sweep (48/48) + aarch64-linux runtime proof ​

After verify_registry.py learned CLAP_REGISTRY_TARGET (see the registry validation section), the entire curated registry was swept against x86_64-windows on Linux x86_64 with the pinned Zig toolchain:

48/48 pins compile-verify (target x86_64-windows) (1 skipped)

Every one of the 48 portable pins — including mbedtls (111 objects, needs windows:bcrypt in addition to ws2_32, a defect this sweep caught and the pin now carries), sqlite amalgamation, mongoose (ws2_32), zip, zlib, all stb libraries — compiles and links for Windows from a Linux host. The single skip is linenoise, which honestly declares platforms = ["linux", "macos"] because termios.h does not exist on Windows; the sweep reports it as skipped rather than a failure. Contracts requiring POSIX runtime execution are compile-only in this mode; the library semantics remain validated natively.

The same day, aarch64-linux runtime execution was proven end-to-end (not just compile/link): --target aarch64-linux built a hello-world binary with the pinned zig toolchain on x86_64 Linux and clap run executed it transparently through qemu-aarch64-user, printing the program's output on the host. aarch64-windows and aarch64-macos targets also compile and link (execution not claimable — no Windows/macOS host here).

2026-12-04 — full-registry sweep at 61 pins ​

Every portable pin compile-verified for x86_64-windows from this Linux host after the cpp-httplib/tinyxml2 wave: 60/60 pass, one honest skip (linenoise is POSIX-only and says so itself through the platforms key). Native: 61/61 pass. The cpp-httplib entry in the verifier is a real in-process HTTP round-trip, not a compile check — networking pins are proven by traffic, not by linking alone.

2026-12-05 — semantic contracts verified cross-platform ​

The six pins that gained real verifier contracts (sqlite, cjson, parson, tiny-regex, cglm, uthash) were re-run against x86_64-windows from this Linux host: 6/6 pass — the in-memory SQL round-trip, both JSON parses, the regex match, the vector math, and the hash round-trip all compile and link for Windows, not just natively.

2026-12-05 — full-registry sweep at 65 pins, semantic contracts included ​

First sweep after the semantic-contract wave: every contract — the sqlite SQL round-trip, the qoi lossless round-trip, the hand-crafted WAV parse, the embedded-PNG decode, the collision tests — runs as part of the verification, not just compilation. Native: 65/65 pass. Windows cross-compile from this Linux host: 64/64 pass, one honest skip (linenoise, POSIX-only by its own platforms key).

2026-12-04 — full-registry sweep at 71 pins, semantic contracts included ​

Sweep after the 0.96.0 wave (fast-obj, par-shapes, tomlplusplus, handmademath). Native on this Linux x86_64 host: 71/71 pass — every contract executes real library semantics (the fast-obj OBJ round-trip, the par_shapes sphere tessellation, the toml++ document parse, the HandmadeMath vector math) rather than compiling an empty main. Windows cross-compile from the same host: 70/70 pass, one honest skip (linenoise declares platforms = ["linux", "macos"] because termios.h does not exist on Windows).