Skip to content

test: restore two main test gates (MLX test guard scan, no-GPU catalog tests) #3764

Done

Description

@inureyes

Two lib-test gates fail on main. Fix both in a single PR, run the verification below once at the end, and keep pushes to a minimum.

1. MLX test guard scan

tests/mlx_test_guard_coverage.rs (mlx_evaluating_lib_tests_take_mlx_test_guard) fails because pos_embed_resample_runs_in_f32 at src/vision/encoders/nemotron_h_nano_omni_tests.rs:276 (added by #3681) evaluates MLX arrays without let _guard = crate::models::embedding_test_support::mlx_test_guard();.

  • The test takes the guard, other MLX-evaluating tests in that file are checked too, and the scan passes.

2. Catalog tests fail on builds without a GPU backend

These five server::webui::catalog tests fail on a default-feature Linux build: catalog_cache_uses_epoch_and_projects_fresh_provider_lifecycle, actual_catalog_producer_matches_whole_expected_shape, pooling_parent_symlink_is_not_embedding_layout_evidence, cached_single_model_catalog_accessor_projects_fresh_app_state_provider, metadata_scan_reports_supported_complete_model_without_loading_provider.

runnable_on_backend() in src/server/webui/catalog_metadata.rs:325 maps gpu_backend_kind() == None to Unsupported (intended, see #1921), so the qwen3 fixture becomes supported: false with reason "architecture is not runnable on the current backend", while the tests hard-code a GPU-build expectation. CI passes only because it runs these on CUDA and Metal builds.

  • The catalog projection takes the backend kind as an injectable input; tests pin a GPU kind instead of skipping.
  • Production behavior on no-GPU builds is unchanged.
  • A new test pins GpuBackendKind::None and asserts the not-runnable reason.

Verification

cargo test --lib server::webui::catalog      # default features (no GPU) on Linux, and on the CUDA build
cargo test --test mlx_test_guard_coverage
cargo clippy --all-targets -- -D warnings
cargo fmt --check

Activity

  1. added
    status:ready
    type:test
    priority:medium
    area:core
    status:in-progress
    status:review
    and removed
    status:ready
    status:in-progress
    on Dec 4, 2026
  2. added a commit that references this issue on Dec 4, 2026
    70c0b1d
  3. added
    status:done
    and removed
    status:review
    on Dec 4, 2026
  4. added a commit that references this issue on Dec 4, 2026
    5bf7b86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corepriority:mediumstatus:donetype:test

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions