Skip to content

tooling: build the cow-venue adapter wasm inside just ci so local e2e tests match CI #595

Description

@mfw78

Surfaced verifying the M4 cow-venue cars (#588, #592, #594) locally: just ci can fail the videre-host --test platform e2e tests on a clean checkout, non-deterministically, while GitHub CI passes.

Problem

just ci builds the module wasms and then runs cargo test --workspace. The module list includes twap-monitor, which depends on cow-venue, and cow-venue is an unconditional cdylib, so that build emits a featureless target/wasm32-wasip2/release/cow_venue.wasm. The videre-host platform e2e tests (e2e_cow_venue_component_imports_equal_declared_capabilities, e2e_twap_monitor_boots_against_the_cow_adapter) load that path expecting the adapter-feature component, find a featureless one with no adapter exports, and fail.

Whether it fails locally depends on whether an adapter cow_venue.wasm from an earlier just build-cow-venue happened to survive in the target dir, so the same tree passes for one developer and fails for another. GitHub CI is unaffected: its workflow builds the adapter wasm after the module wasms and before the tests, so the adapter component is the one on disk at test time.

Fix

Mirror CI: build the cow-venue adapter wasm inside the ci recipe, after the module-wasm build and before cargo test, so the adapter component is the artifact the e2e tests load.

cargo build --release --target wasm32-wasip2 -p cow-venue --features adapter

This is the same command just build-cow-venue runs; it just needs to be in the canonical pre-push check in CI order.

Root cause, not fixed here

The deeper wart is that cow-venue's unconditional cdylib emits a meaningless featureless artifact at the same cow_venue.wasm path whenever any module that depends on it is built, so the module build and the adapter build collide on one filename. Removing that collision (for example a separate adapter cdylib crate, so cow-venue as a dependency is a plain rlib) is a larger restructure and out of scope for this DX fix; Cargo cannot gate crate-type on a feature, so it is not a one-line change. Tracking the ordering fix here; the structural change is a separate decision if it is ever wanted.

Acceptance criteria

  • just ci on a clean checkout builds the cow-venue adapter wasm before running tests, and the videre-host platform e2e tests pass deterministically.
  • No change to the module list or wasm count; the added step only builds the adapter component.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/toolsload-gen, orderbook-mock, backtest, baseline-latency, packaging/releasedebtCode works but makes future work harder.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions