You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These crates are crate-type = ["cdylib"] targeting wasm32-wasip2, depend on wit-bindgen generated bindings, and import wasm_graph_sdk from the private aio-sdks cargo registry. Together this means:
cargo test cannot run them on the host (x86_64-unknown-linux-gnu) — bindings reference WASI component-model symbols that do not link.
cargo llvm-cov cannot produce coverage for them on CI runners.
They are currently excluded from coverage in codecov.yml under ignore: and absent from the rust-tests.yml matrix, leaving real business logic untested.
This is the documented exclusion path called out in .github/instructions/rust-crate-registration.instructions.md ("Coverage Opt-Out"), but the long-term intent is to bring this logic under test.
Proposed Solution
Refactor each WASM operator into two crates following the standard Rust pattern for WASM components:
<operator>-core — pure-Rust library (crate-type = ["rlib"]), no wit-bindgen, no wasm_graph_sdk, no WASI/component-model dependencies. Holds all transformation, parsing, inference orchestration, and validation logic. Fully testable on the host with cargo test and measurable with cargo llvm-cov.
<operator> (existing) — thin cdylib shim that wires wit-bindgen exports to <operator>-core functions and handles only the WASM ABI surface.
Then:
Register each -core crate in .github/workflows/rust-tests.ymlcoverage matrix.
Add each -core crate path to flags.rust.paths in codecov.yml.
Keep the cdylib shim crates listed under codecov.ymlignore: (they remain untestable on the host and their logic is now empty).
Update .github/instructions/rust-crate-registration.instructions.md to reflect that WASM operators follow the split-crate pattern and only the -core half participates in coverage.
Acceptance Criteria
Each of the four operators is split into <operator> (cdylib shim) + <operator>-core (rlib).
<operator>-core crates contain all non-binding logic and have unit tests covering it.
All four -core crates are added to the coverage matrix in .github/workflows/rust-tests.yml, with vuln-scanmatrix.index length updated accordingly.
All four -core crate path globs are added to flags.rust.paths in codecov.yml.
The four cdylib shim entries remain under codecov.ymlignore: (or are converted to a path glob that excludes only the shim subdir if cleaner).
Problem
Four WASM operator crates under
src/500-application/**/operators/**cannot be unit tested or coverage-measured on the host:src/500-application/507-ai-inference/operators/onnx-inferencesrc/500-application/512-avro-to-json/operators/avro-to-jsonsrc/500-application/513-pre-onnx-inference/operators/pre-onnx-inferencesrc/500-application/513-pre-onnx-inference/operators/post-onnx-inferenceThese crates are
crate-type = ["cdylib"]targetingwasm32-wasip2, depend onwit-bindgengenerated bindings, and importwasm_graph_sdkfrom the privateaio-sdkscargo registry. Together this means:cargo testcannot run them on the host (x86_64-unknown-linux-gnu) — bindings reference WASI component-model symbols that do not link.cargo llvm-covcannot produce coverage for them on CI runners.codecov.ymlunderignore:and absent from therust-tests.ymlmatrix, leaving real business logic untested.This is the documented exclusion path called out in
.github/instructions/rust-crate-registration.instructions.md("Coverage Opt-Out"), but the long-term intent is to bring this logic under test.Proposed Solution
Refactor each WASM operator into two crates following the standard Rust pattern for WASM components:
<operator>-core— pure-Rust library (crate-type = ["rlib"]), nowit-bindgen, nowasm_graph_sdk, no WASI/component-model dependencies. Holds all transformation, parsing, inference orchestration, and validation logic. Fully testable on the host withcargo testand measurable withcargo llvm-cov.<operator>(existing) — thincdylibshim that wireswit-bindgenexports to<operator>-corefunctions and handles only the WASM ABI surface.Then:
-corecrate in.github/workflows/rust-tests.ymlcoveragematrix.-corecrate path toflags.rust.pathsincodecov.yml.cdylibshim crates listed undercodecov.ymlignore:(they remain untestable on the host and their logic is now empty)..github/instructions/rust-crate-registration.instructions.mdto reflect that WASM operators follow the split-crate pattern and only the-corehalf participates in coverage.Acceptance Criteria
<operator>(cdylib shim) +<operator>-core(rlib).<operator>-corecrates contain all non-binding logic and have unit tests covering it.-corecrates are added to thecoveragematrix in.github/workflows/rust-tests.yml, withvuln-scanmatrix.indexlength updated accordingly.-corecrate path globs are added toflags.rust.pathsincodecov.yml.codecov.ymlignore:(or are converted to a path glob that excludes only the shim subdir if cleaner).pwsh ./scripts/Validate-RustCrateRegistration.ps1passes.-corecrate.wasm32-wasip2) still succeeds and produced.wasmartifacts pass existing operator integration checks.Out of Scope
witinterface.wasm_graph_sdkor theaio-sdksregistry.wasmtime) — this issue covers only library-level logic extraction.Risks
wit-bindgen-generated types may leak into what looks like "pure logic," requiring careful boundary design or small adapter types in-core.wasm_graph_sdktypes used in operator signatures may need to be abstracted behind-core-owned traits to keep the SDK dependency on the shim side only.References
codecov.yml— currentignore:block listing the four operator crates..github/workflows/rust-tests.yml— coverage matrix to extend..github/instructions/rust-crate-registration.instructions.md— registration contract that documents the opt-out path being closed by this work.