shader(lower): extract inline unit tests into emit/lower_tests.rs #77

Manually merged
github merged 1 commit from gh-pr/77/head into gh-pr/77/base 2026-12-01 20:07:07 +00:00
Owner

@⁠Androtim on GitHub · 2026-11-29 04:20 UTC · original
Androtim:feat/iter78-split-lower-tests → main · +909 −906 · 2 files · 1 commits · merged 2026-11-29 05:04 UTC

Summary

Restores \origin/main\ (\1ab5d84) under \xtask policy's 655,360-byte (640 KiB) per-file limit with zero behavioral change:

  • Moves the #[cfg(test)] mod tests\ block out of \crates/victory-shader/src/emit/lower.rs\ into [\crates/victory-shader/src/emit/lower_tests.rs](crates/victory-shader/src/emit/lower_tests.rs) via #[cfg(test)] #[path = lower_tests.rs] mod tests;.
  • Reduces \crates/victory-shader/src/emit/lower.rs\ from \655,451\ bytes (91 bytes over the 640 KiB cap after PR #66 merged) down to \622,153\ bytes (~33 KiB headroom).
  • Leaves all non-test shader code untouched, keeping zero conflict with open PRs (#62, #75, #76).

Verification (@ $sha)

  • \cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy\ -> \sset policy: 302 files ok\
  • \cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask --locked\ -> \6 passed; 0 failed\
  • \cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader --lib --locked -- --test-threads=1 emit::lower::tests\ -> \18 passed; 0 failed; 1 ignored\
  • \cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --locked -- -D warnings\ -> passed (0 warnings)
  • \cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics --locked -- -D warnings\ -> passed (0 warnings)
**@⁠Androtim** on GitHub · 2026-11-29 04:20 UTC · [original](https://github.com/Androtim/MiniVI/pull/77) `Androtim:feat/iter78-split-lower-tests` → `main` · +909 −906 · 2 files · 1 commits · merged 2026-11-29 05:04 UTC ## Summary Restores \origin/main\ (\1ab5d84\) under \xtask policy\'s 655,360-byte (640 KiB) per-file limit with zero behavioral change: - Moves the \#[cfg(test)] mod tests\ block out of \crates/victory-shader/src/emit/lower.rs\ into [\crates/victory-shader/src/emit/lower_tests.rs\](crates/victory-shader/src/emit/lower_tests.rs) via \#[cfg(test)] #[path = lower_tests.rs] mod tests;\. - Reduces \crates/victory-shader/src/emit/lower.rs\ from \655,451\ bytes (91 bytes over the 640 KiB cap after PR #66 merged) down to \622,153\ bytes (~33 KiB headroom). - Leaves all non-test shader code untouched, keeping zero conflict with open PRs (#62, #75, #76). ## Verification (@ \$sha\) - \cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy\ -> \sset policy: 302 files ok\ - \cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask --locked\ -> \6 passed; 0 failed\ - \cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader --lib --locked -- --test-threads=1 emit::lower::tests\ -> \18 passed; 0 failed; 1 ignored\ - \cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --locked -- -D warnings\ -> passed (0 warnings) - \cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics --locked -- -D warnings\ -> passed (0 warnings)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 20:07:06 +00:00
github manually merged commit 4a7d5cff3f into gh-pr/77/base 2026-12-01 20:07:07 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-11-29 05:03 UTC · original

Automated triage for the maintainers (not an approval).

Verdict: merge-candidate · CI (check): passing

Review Summary

  • Pure test extraction, zero behavioral change: crates/victory-shader/src/emit/lower.rs replaces the inline #[cfg(test)] mod tests { ... } block (904 body lines) with #[cfg(test)] #[path = "lower_tests.rs"] mod tests;, moving all 18 tests and helpers verbatim into crates/victory-shader/src/emit/lower_tests.rs (plus a 2-line module doc comment).
  • Module path & visibility preserved: Using #[path = "lower_tests.rs"] mod tests; keeps the exact same module path (crate::emit::lower::tests), super:: resolution, and item visibility (including pub(crate) fn texture_and_uav_tables) as the inline module.
  • Scope & risk: No non-test shader/lowering code is modified, CI is passing, and this cleanly brings lower.rs back under the xtask per-file size cap without conflicting with other open shader PRs. No local GPU smoke test is needed.

Verdict: merge-candidate (automated triage review; not formal maintainer approval).


Generated with Antigravity CLI (agy).

**@⁠Androtim** on GitHub · 2026-11-29 05:03 UTC · [original](https://github.com/Androtim/MiniVI/pull/77#issuecomment-7251017856) <!-- minivi-triage v1 head=4a7d5cff3f27c2701cdf31120cc4de04e2805904 verdict=merge-candidate ci=passing at=2026-11-29T05:03:32Z --> Automated triage for the maintainers (not an approval). **Verdict:** `merge-candidate` · **CI (`check`):** `passing` ### Review Summary - **Pure test extraction, zero behavioral change:** `crates/victory-shader/src/emit/lower.rs` replaces the inline `#[cfg(test)] mod tests { ... }` block (904 body lines) with `#[cfg(test)] #[path = "lower_tests.rs"] mod tests;`, moving all 18 tests and helpers verbatim into `crates/victory-shader/src/emit/lower_tests.rs` (plus a 2-line module doc comment). - **Module path & visibility preserved:** Using `#[path = "lower_tests.rs"] mod tests;` keeps the exact same module path (`crate::emit::lower::tests`), `super::` resolution, and item visibility (including `pub(crate) fn texture_and_uav_tables`) as the inline module. - **Scope & risk:** No non-test shader/lowering code is modified, CI is passing, and this cleanly brings `lower.rs` back under the `xtask` per-file size cap without conflicting with other open shader PRs. No local GPU smoke test is needed. *Verdict: `merge-candidate` (automated triage review; not formal maintainer approval).* --- _Generated with Antigravity CLI (`agy`)._
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Androtim--MiniVI!77
No description provided.