Skip to content

gpu-gates: the Qwen3-VL tower and V4.1 vision gates refuse a set without their full-tap image by name - #515

Merged
juliankang4 merged 1 commit into
midagedev:mainfrom
juliankang4:fix-review-bot-issue-500-gpu
Oct 19, 2026
Merged

juliankang4 merged 1 commit into
midagedev:mainfrom
juliankang4:fix-review-bot-issue-500-gpu

Conversation

@juliankang4

Copy link
Copy Markdown
Collaborator

Qwen3-VL 타워 게이트와 V4.1 비전 게이트가 필수 이미지가 빠진 set에서 host rules를 건너뛰고 성공으로 끝날 수 있던 결함(#500)을, 그 이미지가 없는 set을 이름 대고 거부하도록 고치는 PR입니다.

What and why

Fixes #500. gate_qwen3vl_tower takes its images from the Clef taps set. The host rules (block 0 and the merger op by op) and the reuse-after-largest clause run only on the full-tap image free-448x448, held in full_state. A valid set that leaves that image out kept full_state at None, so both checks were skipped and the gate could still end with a success line.

A new cases() builds the run order from the set's image names (the full-tap image first, then the rest by name) and refuses a set without free-448x448 with an error that names it. run() calls it right after it opens the set, before the encoder loads. GLM's tower gate already stops with an error when the image is absent; this gives the Qwen gate the same rule.

gate_vision_encoder (V4.1) had the same gap: its block-0 host rules run on grad-448, and read_set() accepted a set without it. read_set() now calls has_full() right after it opens the set and refuses such a set by name.

Each binary has a unit test, a_set_without_the_full_tap_image_is_refused_by_name, and gate-gpu-qwen3vl-tower and gate-gpu-vision now run the binary's unit test through tools/gate.sh before they build and run the gate, as gate-gpu-qwen38-nodes does.

What I ran

On an RTX 5090 (driver 595.99.02). The Qwen3-VL tower results were taken on 967d51d4, before the V4.1 part was added; the head 3e6a95b0 reran the tower test and added the V4.1 one.

  • FAIL-first: with the refusal taken out of cases() (the old behavior), bash tools/gate.sh --oxide -p bloomery-gpu-gates --release --features vision --bin gate_qwen3vl_tower ended test result: FAILED. 0 passed; 1 failed. The test panicked at no full-tap image: [("crop-200x200", false), ("max-2600x1800", false)]: the set without the image was accepted.
  • The same command on the head: test result: ok. 1 passed; 0 failed.
  • FAIL-first for V4.1: with has_full() accepting any set, bash tools/gate.sh --oxide -p bloomery-gpu-gates --release --features vision --bin gate_vision_encoder ended test result: FAILED. 0 passed; 1 failed (exit 101).
  • On the head 3e6a95b0, both unit tests: gate_vision_encoder and gate_qwen3vl_tower each test result: ok. 1 passed; 0 failed.

What I ran into

None of this blocks the PR. I did not run the card gate itself, because the real Clef mmproj and taps sets are not available to me. The change adds the refusal before the encoder loads, and the unit test covers it. The other tower gates need no change: gate_glm5v_tower already stops with an error on the absent image, gate_minicpmv_tower uses fixed image names and gate_gemma4v_tower has no full-tap case.

AI help

AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.

…out their full-tap image by name

The tower gate took its images from the set, so a set without free-448x448 left full_state at None: the host rules and
the reuse-after-largest clause never ran, and the gate could still print PASS. cases() now orders the set's images
before the encoder loads and refuses a set without that image by name. The V4.1 vision gate had the same gap with
grad-448, whose block-0 host rules ran only when the set held it; read_set() now refuses such a set by name. Each
binary's unit test runs through tools/gate.sh at the start of its recipe.
@github-actions github-actions Bot added gpu The card engine: crates/gpu*, crates/app needs-gpu Changes code a card must check, and carries no gate run on a card tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo labels Oct 19, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: CLEAN: Both gates reject sets missing their required image before loading the encoder, and errors reach a failing exit.

Checked

Duplicates: 4 new functions checked, including both tests; no new duplicate requiring extraction. No dryer pairs were available.

Complexity: crapper flagged Qwen tower run, 64 → 65; one early validation error edge, with no new orchestration stage.

Silent failure: 2 validation results followed through their callers to exit_with; both print the missing image name and fail. No new default or discarded error.

Tests: removing the refusal at crates/gpu-gates/src/bin/gate_qwen3vl_tower.rs:149, or accepting every set at crates/gpu-gates/src/bin/gate_vision_encoder.rs:397, fails the corresponding expect_err. Qwen also checks image ordering. Mutation analysis was static; the PR reports FAIL-first runs.

Gates: no pins, bands or clauses relaxed. Both recipe chains preserve test and binary failures. No inference hot path changed.

Adversarial checks: absent and empty image lists cannot pass; a required image without host-rule taps produces an error. GLM already fails on the absent image; MiniCPM uses fixed cases; Gemma checks required taps.

Escape catalog: no C1–C4 pattern matched.

Notes

dryer did not run; its stated reason conflicts with the changed Rust paths. This review was static. The PR explicitly reports no card gate run, so GPU evidence is absent.

Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_qwen3vl_tower.rs, crates/gpu-gates/src/bin/gate_vision_encoder.rs and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

@juliankang4

Copy link
Copy Markdown
Collaborator Author

The review is done and the contribution check passed, so I'm merging this.

@juliankang4
juliankang4 merged commit af3afd2 into midagedev:main Oct 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gpu The card engine: crates/gpu*, crates/app needs-gpu Changes code a card must check, and carries no gate run on a card tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gpu-gates: Qwen tower gate skips required checks when FULL is absent

1 participant