Skip to content

7.3 CI Coverage and Release Qualification

Wiki Keeper (Grok Bot) edited this page Oct 26, 2026 · 8 revisions

CI, Coverage, and Release Qualification

Workflows: .github/workflows/ci.yml, .github/workflows/coverage.yml. Local mirror: scripts/verify.sh. Compile-cost notes: docs/compile-cost.md. Toolchain pin: 1.99.0 (#57); this is the CI toolchain, not the MSRV, which is 1.85 since #69. No CI job builds on 1.85. Fuzzing: .github/workflows/fuzz.yml.

Patched libzmq C++ driver

Added in #62. The vendored libzmq 4.3.4 (zeromq-src 0.2.6 via zmq-sys) SIGSEGVed on Ubuntu 26.04 runners during cargo test --all-features. The Linux validate steps, release-qualification, coverage.yml, and fuzz.yml now export CORPUS_IPC_REAL_CXX=${CXX:-g++} and point CXX at scripts/cxx-libzmq-pipefix.sh. scripts/verify.sh does the same unless CXX already points at the driver; an explicit CXX (such as CXX=g++) becomes the real compiler.

flowchart LR
  Cargo["cargo build (feature zmq)"] --> Driver["CXX = cxx-libzmq-pipefix.sh"]
  Driver -->|pipe.cpp| Pipe["rewrite process_pipe_term_ack (libzmq #4806 fix)"]
  Driver -->|any vendor .cpp| Yq["patch yqueue.hpp in place: posix_memalign(64) chunks, restore writer cursor"]
  Pipe --> Real["CORPUS_IPC_REAL_CXX (default g++)"]
  Yq --> Real
  Driver -->|other files| Real
Loading

The driver refuses to compile (exits non-zero) if pipe.cpp or yqueue.hpp no longer match the libzmq 4.3.4 text it expects, adds -fno-strict-aliasing for libzmq units, and serializes the in-place header edit with flock. It is repository tooling: it is not in the crate include list, so crates.io consumers get only the shared process-wide context (3.2); the earlier Linux build.rs API lock was removed in #65 (see 7.1). The commit message credits the 64-byte yqueue.hpp alignment in this driver, not the lock, with fixing the Ubuntu 26.04 crash. The README "Known issue: vendored libzmq 4.3.4" section (#64, #65) tells consumers who hit the crash they can copy this script and use it as CXX, but warns that it rewrites yqueue.hpp in place inside the shared Cargo registry copy of zeromq-src, changing every project on that machine that builds zmq-sys 0.12; it recommends an isolated CARGO_HOME or restoring the header afterward. AGENTS.md carries the same warning.

validate job

Matrix: ubuntu-latest, macos-latest, windows-latest (fail-fast: false). Shared checks include cargo check --no-default-features, cargo check/build/test --features server. Linux-only: fmt, check --features zmq, default-tree isolation assert (axum|tokio|tower|zmq absent), clippy --all-targets --all-features -D warnings, build/test --all-features, cargo test -p ap-check. Non-Linux clippy uses --features server.

release-qualification (ubuntu)

Locked: fmt, all-features clippy/test, ap-check, RUSTDOCFLAGS=-D warnings cargo doc --no-deps --all-features, cargo package / publish --dry-run.

wire-v1-conformance job

Added in #59 (60d8fe3, LIM-1327). A separate ubuntu-latest job in ci.yml named "Wire-v1 conformance (Python, Julia)". It sets up Python 3.15 and runs conformance/python/check_wire_v1.py, then sets up Julia 1.13, instantiates conformance/julia, and runs check_wire_v1.jl. It only reads test-vectors/wire-v1/ and does not compile the crate, so the Rust feature and platform matrix and the 1.99.0 toolchain are unchanged. See 7.2.1.

scripts/qualify-package.sh (local, packaged artifact)

Added in 2b5e18b…4b3b95e (LIM-1452). It qualifies the packaged crate rather than the checkout and is not wired into any workflow. It never uploads. In order, it:

  1. Refuses to run on a dirty tree, so it always qualifies an exact commit.
  2. Checks cargo package --locked --list: repo-only paths (.claude, .github, .cursor, AGENTS.md, CLAUDE.md, scripts/, fuzz/, ci/, target/, editor dirs) must be absent, and the licenses, README.md, CHANGELOG.md, docs/wire-encoding.md, and docs/rest-api.md must be present.
  3. Runs cargo package --locked, then prints the .crate sha256 (sha256sum or shasum -a 256, failing if neither works) and size.
  4. Extracts the archive outside the checkout and runs cargo test --locked there for default, --no-default-features, --features zmq, --features server, and --all-features, then RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features.
  5. Builds three independent consumer crates against the extraction: default (JSON decode, validation, canonical encode, RustBackend), zmq (structured publisher/subscriber, ZmqHybridFlowBackend, zmq_readout), and server (router and AppState).
  6. Probes the feature boundary: a default-feature consumer importing corpus_ipc::server::router or corpus_ipc::ZmqIpcBackend must fail with an unresolved-import error, and any other failure fails the script.
  7. Runs cargo publish --dry-run --locked from the checkout.

It needs a clean tree and a C++ compiler (for the vendored ZeroMQ build), as AGENTS.md and CLAUDE.md note.

Fuzz smoke workflow

.github/workflows/fuzz.yml (Fuzz smoke, added in #58 / LIM-1277) runs on pushes and PRs to main and on manual dispatch. It is Linux-only (ubuntu-latest, 30-minute timeout) because libFuzzer needs nightly Rust and a C++ toolchain; the cross-platform CI workflow stays libFuzzer-free. It installs pinned nightly-2026-10-19 and cargo-fuzz 0.13.2, then runs scripts/fuzz-smoke.sh for 60 s per target (dispatch input seconds, 1–480). Crash artifacts under fuzz/artifacts/ are uploaded on failure. It is a bounded smoke, not continuous fuzzing.

coverage.yml

cargo llvm-cov --all-features --lcov + Codecov upload (fail_ci_if_error: false).

scripts/verify.sh

Mode Command Requires C++?
fast (default) fmt (unless --no-fmt), check default + server, tree isolation no
full adds zmq check, all-features clippy/test/doc, discrete test --features server, ap-check, package/publish dry-run yes (vendored zmq)

Opt-in --jobs N / CARGO_BUILD_JOBS caps only heavy full-mode phases; the fast path always runs at full parallelism. If clang lacks libstdc++, re-run with CC=gcc CXX=g++ (that CXX is passed through the libzmq driver as the real compiler).

Clone this wiki locally