Repository navigation
gpu-gates: drop the dead feature-off stub main from the 112 bins that declare required-features - #99
Conversation
|
Merged via #133. Thank you! This comment was written by the bloomery AI assistant on behalf of the maintainer. |
… declare required-features (midagedev#12) Each of these bins has a [[bin]] entry whose required-features turn on the feature its `#[cfg(not(...))] fn main()` stub tests (deepseek41 and glm5next pull in gpu; all(mimo2, glm5next) is covered by the three features gate_mimo2_serve requires), so cargo never builds the bin without them and the stub that printed a hint and exited 2 could not be reached. The real `main` keeps its positive cfg. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
66afd0c to
bc303f1
Compare
There was a problem hiding this comment.
Verdict: CLEAN: Cargo's unchanged required-features make all 112 removed stubs unreachable, and every enabled binary retains its real main.
Checked
Duplicates: 0 new items; no duplicate owner introduced. Dryer pairs were unavailable.
Complexity: crapper flagged no function; only feature-off stub functions were deleted.
Silent failure: 112 deleted exit paths checked; Cargo prevents entry into each.
Tests: no tests changed; mutation review is not applicable. Static cfg checks of all 64 feature selections across 112 binaries confirm that enabled targets retain main.
Gates: no pins, assertions, tests or reachable gate cases removed.
Escape catalog: C1–C4 do not match this diff.
Notes
Dryer did not run. Its stated reason, no changed Rust files under crates/, contradicts the 112 changed Rust files.
The PR reports Mac static results. Base/head PTX comparisons and card gate evidence are absent; validation used source checks only.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/bloomery_chat.rs, crates/gpu-gates/src/bin/bloomery_serve.rs, crates/gpu-gates/src/bin/bloomery_serve_ds41.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)
Requested by Alis
What and why
112 bins in
crates/gpu-gates/src/bin/on currentmain(the issue counted 99) carry a#[cfg(not(...))] fn main()that prints a hint and exits 2. Each of them has a[[bin]]entry whoserequired-featuresturn on the feature the stub tests, so cargo never builds the bin without it and the stub can never run.For each bin I closed its
required-featuresover the[features]implications (for example,deepseek41turns ongpu, andglm5nextturns ondeepseek41) and evaluated the stub's cfg. It is false for all 112, including:gate_mimo2_serve'sall(mimo2, glm5next)andgate_routed_legs'all(glm5next, mimo2);gate_clef_serve's andgate_lev_serve'sall(deepseek41, clef);bloomery_serve_qwen38andgate_qwen38_serve, which testgpubut requiredeepseek41.This removes the 112 stubs (818 lines, nothing added). The real
main's positive#[cfg(feature = ...)], and the gateduseandmoditems, are left as they were, so behaviour is identical. They are now redundant; I can remove them in a follow-up if you want.Left alone: the nine bins with no stub (
exact_ref,gate_block,gate_deepseek41_plan,gate_dspark_read,gate_nvtier,gate_serve_start,kld_diff,oxart_ptx,probe_nvread), and the othercfg(not(feature = "vision"))items (fns, amod, statements), which are not stub mains.Closes #12.
Code shape
cargo fmtandcargo clippyare clean on what I touched; the lint count did not go up.Duplication found or removed (
path:line): none.What I ran
On a Mac with the pinned toolchain (
rustc 1.100.0-nightly (e457a7b0d 2026-08-27)) and the static tier's environment file, on this branch (one commit onmainatf382b474):cargo fmt --all --checkandbash tools/check-comments.share clean at this commit too.just mac-check's workspace check buildsbloomery-gpu-gateswithgpu,deepseek41,vision,glm5next,mimo2andclef, the features every touched bin needs.Earlier, on
1cba9707(then 108 stubs),just mac-staticpassed fmt-check, lint and combos; itscheck-recipesstep was red on this Mac, and it was red on that base commit too, from the samenarrow-scanandq38-3090-serverself-tests. One run also faileddepth-serve.sh --self-test, which passed on a rerun on both the branch and the base. I did not reruncheck-recipesatf382b474. Theptx-scancomparison with the base is yours, as the issue says.Hardware (if the change is for a machine)
Not hardware-specific. Mac Studio, Apple M3 Ultra, 512 GB, macOS 26.
🤖 Generated with Claude Code