feat: integrate spar (AADL→WIT) and witness (MC/DC coverage)#467
Merged
Conversation
78e63e5 to
945fa97
Compare
Adds spar (pulseengine/spar v0.9.3) as a first-class toolchain and rule.
spar generates WIT interfaces from AADL v2.3 architecture models — the front
of the PulseEngine certification pipeline (see docs/certification-pipeline.md).
- checksums/tools/spar.json — JSON registry entry, 5 platforms, verified SHA256
- toolchains/tool_registry.bzl — spar URL pattern (archive: spar-v{version}-{triple})
- toolchains/spar_toolchain.bzl + toolchains/BUILD.bazel — spar_toolchain_type
- wasm/extensions.bzl — spar module extension
- MODULE.bazel — register the spar toolchain
- wasm/private/aadl_wit_library.bzl — the aadl_wit_library rule: runs
`spar codegen --format wit`, emits the generated WIT as a tree artifact
- wasm/defs.bzl — export aadl_wit_library
- examples/spar_example — AADL building-control model -> generated WIT
Validated: //examples/spar_example:building_control_wit builds — spar 0.9.3
downloads checksum-verified, codegen produces wit/tcp.wit from the model.
Part of the tool-integration track (rivet DD-003); witness is next.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds witness (pulseengine/witness v0.22.0) as a first-class toolchain and rule. witness measures MC/DC-style branch coverage of WebAssembly core modules — the verification stage of the PulseEngine certification pipeline. - checksums/tools/witness.json — JSON registry entry, 5 platforms, verified SHA256 - toolchains/tool_registry.bzl — witness URL pattern - toolchains/witness_toolchain.bzl + toolchains/BUILD.bazel — witness_toolchain_type - wasm/extensions.bzl — witness module extension - MODULE.bazel — register the witness toolchain - wasm/private/wasm_module_coverage.bzl — the wasm_module_coverage rule: a three-stage witness pipeline (instrument -> run -> lcov). Consumes a core module; accepts meld_fuse's MeldFusedInfo provider or a plain .wasm. - wasm/defs.bzl — export wasm_module_coverage - examples/witness_example — coverage of a minimal core module Validated: //examples/witness_example:coverage_demo_coverage builds — witness 0.22.0 downloads checksum-verified, and instrument/run/lcov all execute (4 actions). The demo module carries no DWARF, so its LCOV report is structural only; a DWARF-bearing subject is needed for source-level MC/DC data (noted in the example). witness operates on core modules, not components — meld_fuse is the bridge that produces its input. Part of the tool-integration track (rivet DD-003). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
945fa97 to
87479b1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Integrates two PulseEngine pipeline tools as first-class hermetic Bazel
rules, following the JSON-registry download pattern. This is the
tool-integration track recorded as rivet
DD-003; seedocs/certification-pipeline.mdfor where these sit in the pipeline.spar —
aadl_wit_library(commit 1)Generates WIT interfaces from an AADL v2.3 architecture model — the front of
the pipeline.
spar codegen --format witemits one.witper AADLprocessas a tree artifact.
checksums/tools/spar.json,tool_registry.bzlURL patternspar_toolchain.bzl+spar_toolchain_type,sparmodule extensionwasm/private/aadl_wit_library.bzl, exported fromwasm/defs.bzlexamples/spar_example— AADL building-control model → generated WITValidated:
//examples/spar_example:building_control_witbuilds; spar0.9.3 downloads checksum-verified and produces a real
wit/tcp.wit.Note: with
--format wit, spar still also emits Rust scaffolding into theoutput dir — captured harmlessly by the tree artifact; strict WIT-only output
is a possible spar-flag follow-up.
witness —
wasm_module_coverage(commit 2)Measures MC/DC-style branch coverage of a WASM core module — the
verification stage. Runs a three-stage pipeline:
instrument → run → lcov.checksums/tools/witness.json,tool_registry.bzlURL patternwitness_toolchain.bzl+witness_toolchain_type,witnessmodule extensionwasm/private/wasm_module_coverage.bzl, exported fromwasm/defs.bzlexamples/witness_example— coverage of a minimal core moduleValidated:
//examples/witness_example:coverage_demo_coveragebuilds;witness 0.22.0 downloads checksum-verified and instrument/run/lcov all
execute. Note: witness operates on core modules, not components — its input
is meld's
MeldFusedInfo(the same providersynth_compileconsumes). Thedemo module has no DWARF, so its LCOV report is structural only; meaningful
source-level MC/DC needs a debug-info subject (noted in the example).
synthis intentionally not included — it has no published releases yet(rivet
DD-003).🤖 Generated with Claude Code