ci(simd): TD-SIMD-9 — nightly-simd polyfill check job#177
Conversation
Adds a `nightly-simd-polyfill` CI job that compiles the crate with `--features nightly-simd` on nightly rustc, exercising the `#[cfg(feature = "nightly-simd")]` dispatch arm in `src/simd.rs` (landed in Phase 2 / PR #173). Catches arm shadowing bugs and the class of API-break codex flagged on that PR (lowercase aliases dropped from `pub use` list). `cargo check` rather than full build/test: - Nightly rustc is only needed for `#![feature(portable_simd)]` in `src/simd_nightly/lib.rs`. - The type/borrow/cfg checker reaches every type alias and macro expansion — same coverage as the v4 check job for the AVX-512 path, minus runtime exercise. - Two passes: default features and +hpc-extras (same shape as the v4 job). Gating: `if: merge_group || push` (same as `miri`) — keeps the nightly toolchain pull out of the per-PR critical path. Added to `conclusion.needs` so a failure blocks merge, but the "skipped on PR" case is accepted by the conclusion logic (`success | skipped`).
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8cf572a09
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - uses: dtolnay/rust-toolchain@nightly | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: cargo check (nightly + nightly-simd feature) | ||
| run: cargo check -p ndarray --features approx,serde,rayon,nightly-simd |
There was a problem hiding this comment.
Disable default features in first nightly-simd check
The first command in this job does not test a distinct feature set: cargo check --features ... nightly-simd still activates default features, and this crate’s Cargo.toml defines default = ["std", "hpc-extras"], so this run already includes hpc-extras; the second command then checks effectively the same configuration again. This leaves the intended non-hpc-extras nightly-simd configuration unvalidated (important for downstream users building with default-features = false) while adding redundant CI time.
Useful? React with 👍 / 👎.
Summary
TD-SIMD-9 from the integration plan in
.claude/knowledge/simd-dispatch-architecture.md.Adds a
nightly-simd-polyfillCI job that compiles the crate with--features nightly-simdon nightly rustc, exercising the#[cfg(feature = "nightly-simd")]dispatch arm insrc/simd.rslanded in Phase 2 (#173). Without this job, the portable-SIMD backend bit-rots between PRs — the stablecargo checkpaths never reach it.Same shape as the existing
tier4-avx512-checkjob:cargo checkrather thancargo test(type/borrow/cfg check is enough to catch dispatch-arm holes).+hpc-extras.merge_group || push(same asmiri) so the nightly toolchain pull stays out of the per-PR critical path.Catches the class of bugs codex flagged on PR #173 (lowercase aliases dropped from
pub use) before they reachcargo +nightlyconsumers.Test plan
pub uselist update insrc/simd.rsand/orsrc/simd_nightly/mod.rsGenerated by Claude Code