Repository navigation
DF 54.1 only: remove deltalake/delta feature; RP-SEAL charter; profile.dev debug=0 #1974
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Rust Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| paths: | |
| - crates/** | |
| - Cargo.toml | |
| - Cargo.lock | |
| - .github/workflows/rust-test.yml | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: "-C debuginfo=1 -C target-cpu=x86-64-v3" | |
| RUST_BACKTRACE: "1" | |
| CARGO_INCREMENTAL: "0" | |
| # Least-privilege: these jobs only read the repo (checkout + build + test). | |
| # Codecov upload uses its own token secret and is non-fatal (fail_ci_if_error: false). | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| env: | |
| # Override the workflow-level debuginfo=1 for this job too (parity with | |
| # test-with-coverage, TD-CI-COVERAGE-MOLD-1). The `test` job links the | |
| # full lance+datafusion integration-test set at the SAME disk/RSS cliff | |
| # the coverage job hit — and #507 (+4055 lines across causal-edge + | |
| # cognitive-shader-driver: ce64-v2 layout + MailboxSoaOwner/ | |
| # SurrealMailboxView) grew that link footprint enough to tip the | |
| # previously-marginal link into a hard `ld` SIGBUS (signal 7 = object | |
| # file truncated when the runner partition fills mid-link). debuginfo=1 | |
| # carried no value here (CI never opens a debugger); dropping it cut the | |
| # coverage job's per-binary link from ~930 MB to ~252 MB (-73%, measured | |
| # in b56bb2cd) and relieves BOTH ceilings (mold/GNU-ld RSS + disk). mold | |
| # is already installed below. Note: a job-level RUSTFLAGS gives this job | |
| # its own Swatinem cache key — the first run after this change | |
| # repopulates the test cache. | |
| RUSTFLAGS: "-C debuginfo=0 -C target-cpu=x86-64-v3" | |
| defaults: | |
| run: | |
| working-directory: lance-graph | |
| strategy: | |
| matrix: | |
| toolchain: | |
| - stable | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: lance-graph | |
| - name: Checkout AdaWorldAPI/ndarray (sibling dependency) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: AdaWorldAPI/ndarray | |
| # ndarray master now exports wht_f32, kmeans, squared_l2, | |
| # dequantize_i8_to_f32, quantize_f32_to_i2, dequantize_i2_to_f32 | |
| # publicly (ndarray PR #115, merged 2026-04-30). Pin retired. | |
| path: ndarray | |
| - name: Checkout AdaWorldAPI/OGAR (sibling dependency, NO-PIN path deps) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: AdaWorldAPI/OGAR | |
| path: OGAR | |
| - name: Setup rust toolchain | |
| run: | | |
| rustup toolchain install ${{ matrix.toolchain }} | |
| rustup default ${{ matrix.toolchain }} | |
| - name: Setup mold linker | |
| # Heavy lance+datafusion integration-test binaries OOM the default GNU `ld` | |
| # at the `cargo test --no-run` link step (intermittent). mold links them | |
| # fast + low-memory (already used by release.yml / rust-publish.yml). | |
| uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "lance-graph-deps" | |
| workspaces: | | |
| lance-graph/crates/lance-graph | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y protobuf-compiler | |
| - name: Build tests | |
| run: cargo test --manifest-path crates/lance-graph/Cargo.toml --no-run | |
| - name: Run unit tests | |
| run: cargo test --manifest-path crates/lance-graph/Cargo.toml --lib | |
| - name: Run doc tests | |
| run: cargo test --manifest-path crates/lance-graph/Cargo.toml --doc | |
| # lance-graph-contract is the zero-dep trait crate every workspace | |
| # consumer (planner, callcenter, shader-driver, ...) depends on. | |
| # Its clippy gate (style.yml) catches type errors but does NOT | |
| # execute tests, so a logically-broken assertion can ship green — | |
| # PR #322's `log_norm_growth_negative_when_m_attenuates` slipped | |
| # through exactly this way and was caught only after merge. | |
| # Adding the test gate here closes that hole. Cost is minimal: | |
| # zero-dep crate, ~1 s build + <1 s test execution, reuses the | |
| # already-installed toolchain and Swatinem cache from above. | |
| - name: Run contract unit tests | |
| run: cargo test --manifest-path crates/lance-graph-contract/Cargo.toml --lib | |
| # Per PR #431 review: the `compile_fail` typestate proofs in | |
| # `tests/cognition_typestate.rs` and the integration test bodies | |
| # themselves were silently un-gated by `--lib`. Adding `--tests` | |
| # picks up the integration crate; `--doc` picks up doctest / | |
| # compile_fail blocks in library modules. | |
| - name: Run contract integration tests | |
| run: cargo test --manifest-path crates/lance-graph-contract/Cargo.toml --tests | |
| - name: Run contract doctests | |
| run: cargo test --manifest-path crates/lance-graph-contract/Cargo.toml --doc | |
| # weather-poc is workspace-EXCLUDED. A new workflow introduced by the | |
| # same pull request cannot gate that pull request because `pull_request` | |
| # workflow selection comes from the base branch. Run both surfaces here | |
| # so D-WXS-4's zero-dep codec and its live NodeRow agreement are tested | |
| # before merge, not one merge later. | |
| - name: Run weather-poc tests (zero-dependency codec) | |
| run: cargo test --manifest-path crates/weather-poc/Cargo.toml | |
| - name: Run weather-poc canonical-row agreement tests | |
| run: cargo test --manifest-path crates/weather-poc/Cargo.toml --features canonical-row | |
| # lance-graph-ogar is the workspace-EXCLUDED armed tier: it owns the | |
| # mirror<->live-vocab fuses (COUNT_FUSE, per-entry parity, the | |
| # authoritative-table roundtrip green light) against the OGAR sibling | |
| # checked out above. Without this step those fuses only ever ran on a | |
| # developer machine — a same-sized codebook remap would ship green | |
| # (codex/coderabbit finding on PR #658). One scoped step closes it. | |
| - name: Run lance-graph-ogar fuse tests (armed tier, OGAR sibling) | |
| run: cargo test --manifest-path crates/lance-graph-ogar/Cargo.toml | |
| # deepnsm: standalone 0-dep codec crate, workspace-excluded, so the | |
| # lance-graph test steps above never reached it. ~217 lib + integration + | |
| # doctests, fast (no lance/datafusion/ndarray deps). Gating. | |
| - name: Run deepnsm tests | |
| run: cargo test --manifest-path crates/deepnsm/Cargo.toml | |
| # deepnsm-v2: the palette256² rebuild of deepnsm (PR #798), a standalone | |
| # crate with a single path-dep on lance-graph-contract, workspace-excluded | |
| # like deepnsm — so the steps above never reach its 18 tests. Same blind-gate | |
| # posture as deepnsm; one scoped step arms it. Gating. | |
| - name: Run deepnsm-v2 tests | |
| run: cargo test --manifest-path crates/deepnsm-v2/Cargo.toml | |
| # lance-graph-supervisor: every test in the crate (including the W2b | |
| # real-owner probes over the production MailboxSoA, PR #634) is gated | |
| # behind the `supervisor` feature (ractor dep), so no step above ever | |
| # executes them — the exact "green CI that didn't test the real fuse" | |
| # membrane failure (E-SEMANTIC-OS-CONVERGENCE-1). Flagged by | |
| # coderabbit on #634. Cheap: contract + ractor + the shader-driver | |
| # dev-dep, no lance/datafusion. | |
| # | |
| # `cycle-driver` ADDED 2026-08-05. It is a SEPARATE feature that | |
| # `supervisor` does not imply, so the step above — despite being the | |
| # crate's own step — never compiled `cycle_driver`, the three | |
| # `probe_ignition*` / `d_ign_b_lenses` test binaries, or any of the #879 | |
| # loop-closure contract. Measured: `--features supervisor` runs 13 tests; | |
| # `--features supervisor,cycle-driver` runs 43. The 30 in the gap include | |
| # `probe_ignition_64k_start_at_full_population` — the 64k-owner / | |
| # 17-sealed headline canonized as | |
| # E-64K-1TO1-OWNERS-IS-THE-MAIN-MODEL-1. #891 recorded this gap and | |
| # deliberately did not touch the workflow; #898 closed the same shape for | |
| # callcenter but not this one. One added feature closes it. | |
| # | |
| # Verified locally before landing: 43 passed, 0 failed. Strict superset of | |
| # what this step ran before, so it cannot lose coverage. | |
| - name: Run supervisor tests (W2b real-owner probes + #879 cycle driver) | |
| run: cargo test --manifest-path crates/lance-graph-supervisor/Cargo.toml --features supervisor,cycle-driver | |
| # bgz-tensor: workspace-EXCLUDED metric-algebraic codec crate (deps the | |
| # ndarray sibling checked out above + in-repo holograph). None of the | |
| # steps above reach it, so its 207 lib tests — including the V3 | |
| # `morton_cascade` Fisher-z compute (E-MORTON-CASCADE-V3-1) — only ever | |
| # ran on a developer machine. A green CI that never built the new module | |
| # is exactly the "blind gate" this repo has repeatedly closed | |
| # (deepnsm / supervisor / ogar above). One scoped step arms it. Gating. | |
| - name: Run bgz-tensor tests (workspace-excluded, ndarray sibling) | |
| run: cargo test --manifest-path crates/bgz-tensor/Cargo.toml --lib | |
| # lance-graph-callcenter UNDER `--features query` — the same blind gate as | |
| # supervisor above, but one level subtler: the crate was not merely | |
| # untested, it has `default = []`, so even a bare `cargo test` on it would | |
| # compile almost nothing and report a green it had not earned. | |
| # | |
| # Measured, not hypothetical. Running this combination by hand on | |
| # 2026-08-05 found 209 passed / 2 FAILED: the `graph_table` fixture minted | |
| # rows with the V1 `CLASSID_OSINT` while `OSINT_GOTHAM.classid` resolves to | |
| # `CLASSID_OSINT_V3` under the default `guid-v3-tail`, so | |
| # `project_snapshot`'s class filter matched zero of two rows and every | |
| # assertion ran against an empty snapshot (fixed in #897; recorded as | |
| # E-A-FEATURE-CONDITIONAL-CLASSID-SILENTLY-EMPTIED-A-FIXTURE-1). The same | |
| # feature gap had already produced a clippy EXIT=0 over never-compiled | |
| # `vsa_udfs` / `transcode::ontology_table` earlier the same day. | |
| # | |
| # 211 tests, ~2 min incremental. Gating. | |
| - name: Run callcenter tests --features query (blind-gate closure) | |
| run: cargo test --manifest-path crates/lance-graph-callcenter/Cargo.toml --features query --lib | |
| # Codex P2 (PR #861): the two self-asserting probe examples validate | |
| # their fixtures via assert! inside example main() — cargo test never | |
| # executes an example's main(), so those asserts only ever ran on a | |
| # developer's local `cargo run --example` invocation. Running the | |
| # examples explicitly here closes that blind-gate (same posture as | |
| # deepnsm / supervisor / bgz-tensor above). | |
| - name: Probe falsifier - eyes opened (fixture asserts) | |
| run: cargo run -p lance-graph-planner --example probe_eyes_opened | |
| - name: Probe falsifier - babel stances (fixture asserts) | |
| run: cargo run -p lance-graph-planner --example probe_babel_stances | |
| test-with-coverage: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| env: | |
| # Override the workflow-level debuginfo=1 for this job only. llvm-cov | |
| # coverage lives in __llvm_covmap/__llvm_prf_* ELF sections, NOT in | |
| # DWARF (verified locally: 600/600 contract tests pass under | |
| # `-C instrument-coverage -C debuginfo=0`, covmap sections present, | |
| # .profraw emitted). At debuginfo=1 each of the 17 instrumented | |
| # integration-test binaries links to ~930 MB (measured; ~252 MB at | |
| # debuginfo=0, -73%) — the full set + deps tree sits exactly at the | |
| # hosted runner's disk/RSS cliff, which is the 2/50 intermittent | |
| # exit-101 (TD-CI-COVERAGE-MOLD-1). Dropping debuginfo relieves BOTH | |
| # ceilings (GNU-ld/mold RSS at link, and disk). Note: a job-level | |
| # RUSTFLAGS gives this job its own Swatinem cache key — the first run | |
| # after this change repopulates the coverage cache. | |
| RUSTFLAGS: "-C debuginfo=0 -C target-cpu=x86-64-v3" | |
| defaults: | |
| run: | |
| working-directory: lance-graph | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: lance-graph | |
| - name: Checkout AdaWorldAPI/ndarray (sibling dependency) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: AdaWorldAPI/ndarray | |
| # ndarray master now exports wht_f32, kmeans, squared_l2, | |
| # dequantize_i8_to_f32, quantize_f32_to_i2, dequantize_i2_to_f32 | |
| # publicly (ndarray PR #115, merged 2026-04-30). Pin retired. | |
| path: ndarray | |
| - name: Checkout AdaWorldAPI/OGAR (sibling dependency, NO-PIN path deps) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: AdaWorldAPI/OGAR | |
| path: OGAR | |
| - name: Setup rust toolchain | |
| run: | | |
| rustup toolchain install stable | |
| rustup default stable | |
| - name: Setup mold linker | |
| # Parity with the `test` job above (TD-CI-COVERAGE-MOLD-1): the heavy | |
| # lance+datafusion test binaries OOM the default GNU `ld` at link | |
| # (intermittent) — and llvm-cov INSTRUMENTED binaries are larger, so | |
| # the OOM is MORE likely here than in the plain `test` job that already | |
| # has mold. Without this step the coverage job flaked while `test` | |
| # stayed green (2/50 runs). mold links them fast + low-memory. | |
| uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "lance-graph-deps" | |
| workspaces: | | |
| lance-graph/crates/lance-graph | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y protobuf-compiler | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Run tests with coverage | |
| run: | | |
| cargo llvm-cov --manifest-path crates/lance-graph/Cargo.toml --lcov --output-path lcov.info | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: lcov.info | |
| flags: rust-unittests | |
| fail_ci_if_error: false |