Skip to content

engine/tests/{bc_validation,shell_validation}.cpp exist and pass but are never run in CI #405

Description

@mkofler96

Problem

engine/tests/bc_validation.cpp (113 lines, 17 cases) and engine/tests/shell_validation.cpp (296 lines, 3 top-level test functions) are real native regression tests with their own build scripts (scripts/test-bc-validation.sh, scripts/test-shell.sh). Both compile with a plain host clang++/g++ — no MFEM/OCCT/Netgen/Emscripten dependency — specifically so they can run as a fast unit-test loop independent of the WASM build.

Neither script is referenced anywhere in .github/workflows/ci.yml (grep -n "test-bc-validation\|test-shell\|bc_validation\|shell_validation" .github/workflows/ci.yml returns nothing). The only reference to either is a mention in examples/shell-coupling/README.md:39.

I ran both locally to confirm they're not just stale/broken placeholders:

Impact

These two harnesses are the only tests that directly lock in the correctness fixes from #362, #377, and #379 (all "silent fallback → loud error" fixes that were explicitly called out as important in this project's ongoing hardening effort). Because they're never invoked by CI, a future change to engine/cpp/bc_validation.h or engine/cpp/shell_core.cpp that regresses that behavior would merge cleanly — none of the four CI jobs (rust, clang-tidy, wasm, frontend) would catch it. The Playwright suite exercises the WASM build end-to-end but doesn't target this validation logic directly, and cargo test --workspace covers the (currently test-less, see #365) Rust crates, not engine/cpp.

This is a coverage gap distinct from #365 (native Rust bridge crates have zero tests) — these C++ tests exist, pass, and are cheap; they're just not wired up.

Suggested fix

Add a step to the clang-tidy or a new lightweight job in .github/workflows/ci.yml that runs both scripts, e.g.:

- name: Native validation tests
  run: |
    bash scripts/test-bc-validation.sh
    bash scripts/test-shell.sh

Both run in well under 5 seconds combined and need no WASM toolchain, so this is close to free CI time — much cheaper than adding another Playwright spec for the same coverage.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions