Skip to content

feat: integrate spar (AADL→WIT) and witness (MC/DC coverage)#467

Merged
avrabe merged 2 commits into
mainfrom
feat/integrate-spar-witness
May 21, 2026
Merged

feat: integrate spar (AADL→WIT) and witness (MC/DC coverage)#467
avrabe merged 2 commits into
mainfrom
feat/integrate-spar-witness

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 20, 2026

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; see
docs/certification-pipeline.md for 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 wit emits one .wit per AADL process
as a tree artifact.

  • checksums/tools/spar.json, tool_registry.bzl URL pattern
  • spar_toolchain.bzl + spar_toolchain_type, spar module extension
  • wasm/private/aadl_wit_library.bzl, exported from wasm/defs.bzl
  • examples/spar_example — AADL building-control model → generated WIT

Validated: //examples/spar_example:building_control_wit builds; spar
0.9.3 downloads checksum-verified and produces a real wit/tcp.wit.
Note: with --format wit, spar still also emits Rust scaffolding into the
output 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.bzl URL pattern
  • witness_toolchain.bzl + witness_toolchain_type, witness module extension
  • wasm/private/wasm_module_coverage.bzl, exported from wasm/defs.bzl
  • 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. Note: witness operates on core modules, not components — its input
is meld's MeldFusedInfo (the same provider synth_compile consumes). The
demo 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).

synth is intentionally not included — it has no published releases yet
(rivet DD-003).

🤖 Generated with Claude Code

@avrabe avrabe force-pushed the feat/integrate-spar-witness branch from 78e63e5 to 945fa97 Compare May 21, 2026 03:21
avrabe and others added 2 commits May 21, 2026 05:48
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>
@avrabe avrabe force-pushed the feat/integrate-spar-witness branch from 945fa97 to 87479b1 Compare May 21, 2026 03:51
@avrabe avrabe merged commit 59d44d8 into main May 21, 2026
28 checks passed
@avrabe avrabe deleted the feat/integrate-spar-witness branch May 21, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant