Skip to content

fix(test): stabilize Qwen3.5 dense CI e2e gates on 7 GB macOS runners - #390

Merged
Brooooooklyn merged 3 commits into
mainfrom
fix/qwen35-dense-ci-flaky
Nov 20, 2026
Merged

Brooooooklyn merged 3 commits into
mainfrom
fix/qwen35-dense-ci-flaky

Conversation

@Brooooooklyn

Copy link
Copy Markdown
Contributor

Summary

Fixes the deterministic failure and remaining flake sources in the e2e qwen3_5-dense CI leg on 7 GB macos-26 runners:

  1. Deterministic failure since feat: Control Panel redesign, Chat/Work, Flash Next fixes, Qwen3.5 scheduler on by default #384 (qwen3_5_concurrent_batched_parity):

    • On GitHub's 7 GB macos-26 VM (working_set ≈ 4.67 GiB), Qwen/Qwen3.5-0.8B bf16 + MTP at its native 262,144 context window is memory-bound at 1 lane, so evaluate_qwen35_plan rejects count = 2 to preserve the single-lane window (MLX_SCHED_MAX_NUM_SEQS=2 only clamps downward).
    • Clones the checkpoint into an RAII-cleaned temp dir (canonicalizing source paths for symlinks) with max_position_embeddings = 8192 and no paged_cache_memory_mb override so both asymmetric_finish_and_cross_owner_warm_wave_match_serial and waves_of_one_two_four_and_eight_match_serial genuinely plan lanes >= 2 on 7 GB CI VMs while still scaling to 4/8 lanes on larger Macs.
    • Tightens waves_of_one_two_four_and_eight_match_serial to assert (2..=8).contains(&lanes) so CI cannot silently degrade back to 1 lane.
    • Adds load_plan::tests::small_runner_0_8b_mtp_grants_two_lanes_when_context_is_capped pinning the 7 GB runner memory-plan math.
  2. join_all + decode_debt_ms occupancy race (qwen3_5_concurrent_batched_parity):

    • Raises asymmetric_finish_and_cross_owner_warm_wave_match_serial's concurrent pair from (7, 15) to (32, 48) tokens so batch-0 still finishes well before batch-1 while having enough decode steps to reliably overlap even if batch-0 prefills solo first and charges decode_debt_ms.
  3. Wall-clock TTFT flake (qwen3_5_delta_chat):

    • Replaces the wall-clock TTFT ratio assertions in stream_session_path_keeps_ttft_flat_across_turns with the same deterministic cached_tokens / uncached accounting assertions already used in session_path_keeps_ttft_flat_across_turns, plus checks that every streamed turn emits at least one non-empty incremental chunk before done: true.
  4. Blocking sleep & tight poll window (qwen3_5_state_tier_restart):

    • Switches status_once from std::thread::sleep to tokio::time::sleep inside async fn and raises its polling ceiling from 12s to 30s (matching close_cache's 30s deadline).

Verification

  • cargo test --locked -p mlx-core --lib small_runner_0_8b_mtp_grants_two_lanes_when_context_is_capped — passed
  • QWEN35_STAGE2_MODEL_PATH=... MLX_SCHED_MAX_NUM_SEQS=2 cargo test --locked -p mlx-core --test qwen3_5_concurrent_batched_parity -- --ignored --test-threads=1 --nocapture (tested with both relative and absolute paths, plus unthrottled) — passed (planned lanes: 2, max_batch_occupancy: 2; unthrottled planned lanes: 4, max_batch_occupancy: 4)
  • MLX_TEST_MODEL_PATH=... cargo test --locked -p mlx-core --test qwen3_5_delta_chat -- --ignored --test-threads=1 --nocapture — 6 passed
  • MLX_TEST_MODEL_PATH=... cargo test --locked -p mlx-core --test qwen3_5_state_tier_restart -- --ignored --test-threads=1 --nocapture — 3 passed
  • cargo fmt --all -- --check & cargo clippy --locked -p mlx-core --tests -- -D warnings — passed

@Brooooooklyn Brooooooklyn added the model-e2e Run the heavy Model E2E workflow (per-family real-checkpoint tests) on this PR label Nov 20, 2026
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2de4edb6-84e8-44ec-94e1-d01c3316a762

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T04:28:27.944831Z 4e03803 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Brooooooklyn
Brooooooklyn merged commit eefde9a into main Nov 20, 2026
25 of 27 checks passed
@Brooooooklyn
Brooooooklyn deleted the fix/qwen35-dense-ci-flaky branch November 20, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model-e2e Run the heavy Model E2E workflow (per-family real-checkpoint tests) on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant