Move host.rs's and lower.rs's test modules to their own files, under the asset policy's 512 KiB limit #1357

Open
github-bot wants to merge 1 commit from github-bot/gh-1357 into main AGit
Owner

@⁠fxceless on GitHub · 2026-11-26 18:08 UTC · original
fxceless:claude/project-thread-4946gf → main · +1407 −1415 · 11 files · 1 commits · open

Requested by ELEVEN · project thread

Problem

The check job fails on main (#1342): cargo xtask policy reports

POLICY: crates/victory-gpu/src/host.rs: 528954 bytes exceeds the 524288-byte limit
POLICY: crates/victory-shader/src/emit/lower.rs: 535588 bytes exceeds the 524288-byte limit

Change

Only #[cfg(test)] modules move. Each one moves verbatim apart from losing one level of indentation, and the lines inside multi-line raw strings are left untouched. Module names and paths (host::tests, emit::lower::tests, ...) stay the same, so use super::... and every test name are unchanged. No non-test code changes.

  • host.rs: its eight test modules (tests, relay_tests, grouped_tests, late_tests, trail, spare, batch, queue2_tests) move to crates/victory-gpu/src/host/<name>.rs, the same layout profile.rs / profile/tests.rs already use. The size goes from 528,954 to 492,495 bytes.
  • lower.rs: mod tests moves to emit/lower_tests.rs, declared with #[path = "lower_tests.rs"] the way #1322 does it. The size goes from 535,588 to 512,559 bytes. #1322 has conflicts with main now, so this redoes its move on current main and would replace it.

Tests

  • I put each file back together from the new pieces and compared it with HEAD: the code is identical apart from whitespace, and all 1,958 string literals are byte-for-byte the same.
  • cargo xtask policy: 232 files ok.
  • cargo test -p xtask --locked: 5 passed, including repository_passes_policy.
  • cargo test -p victory-shader --lib --locked lower::tests: 14 passed, 1 ignored. That test was ignored before the move too.
  • cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-msvc -- -D warnings was clean, both with and without --all-features. I ran it from Linux with CARGO_FEATURE_PURE=1 so blake3 builds without MSVC.
  • I could not run the victory-gpu tests here because they need Windows. This PR's CI is their first run.

Note: lower.rs is about 11 KiB under the limit and grows quickly, so #1342's idea of a separate limit for .rs files is still worth deciding.

Fixes #1342.


Generated by Claude Code

**@⁠fxceless** on GitHub · 2026-11-26 18:08 UTC · [original](https://github.com/fxceless/victory-fork/pull/1357) `fxceless:claude/project-thread-4946gf` → `main` · +1407 −1415 · 11 files · 1 commits · open <!-- claude-projects-attribution: {"github_login":"fxceless"} --> _Requested by **ELEVEN** · [project thread](https://claude.ai/code/project/chan_01X5mdrDBPSw6f8UR5PM4z8d?thread=cmsg_01X5mdrDBPSw6f8UR5PM4z8d9EGSEwCezh69gY9yymtEQm)_ ## Problem The `check` job fails on `main` (#1342): `cargo xtask policy` reports ``` POLICY: crates/victory-gpu/src/host.rs: 528954 bytes exceeds the 524288-byte limit POLICY: crates/victory-shader/src/emit/lower.rs: 535588 bytes exceeds the 524288-byte limit ``` ## Change Only `#[cfg(test)]` modules move. Each one moves verbatim apart from losing one level of indentation, and the lines inside multi-line raw strings are left untouched. Module names and paths (`host::tests`, `emit::lower::tests`, ...) stay the same, so `use super::...` and every test name are unchanged. No non-test code changes. - `host.rs`: its eight test modules (`tests`, `relay_tests`, `grouped_tests`, `late_tests`, `trail`, `spare`, `batch`, `queue2_tests`) move to `crates/victory-gpu/src/host/<name>.rs`, the same layout `profile.rs` / `profile/tests.rs` already use. The size goes from 528,954 to **492,495** bytes. - `lower.rs`: `mod tests` moves to `emit/lower_tests.rs`, declared with `#[path = "lower_tests.rs"]` the way #1322 does it. The size goes from 535,588 to **512,559** bytes. #1322 has conflicts with `main` now, so this redoes its move on current `main` and would replace it. ## Tests - I put each file back together from the new pieces and compared it with `HEAD`: the code is identical apart from whitespace, and all 1,958 string literals are byte-for-byte the same. - `cargo xtask policy`: **232 files ok**. - `cargo test -p xtask --locked`: 5 passed, including `repository_passes_policy`. - `cargo test -p victory-shader --lib --locked lower::tests`: 14 passed, 1 ignored. That test was ignored before the move too. - `cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-msvc -- -D warnings` was clean, both with and without `--all-features`. I ran it from Linux with `CARGO_FEATURE_PURE=1` so blake3 builds without MSVC. - I could not run the victory-gpu tests here because they need Windows. This PR's CI is their first run. Note: `lower.rs` is about 11 KiB under the limit and grows quickly, so #1342's idea of a separate limit for `.rs` files is still worth deciding. Fixes #1342. --- _Generated by [Claude Code](https://claude.ai/code)_
The check job fails on main: crates/victory-gpu/src/host.rs (528,954 bytes)
and crates/victory-shader/src/emit/lower.rs (535,588 bytes) are over the
asset policy's 512 KiB limit (#1342).

Only #[cfg(test)] modules move, verbatim apart from losing one level of
indentation; module names and paths are unchanged, no non-test code changes.

- host.rs: its eight test modules (tests, relay_tests, grouped_tests,
  late_tests, trail, spare, batch, queue2_tests) move to host/<name>.rs,
  the layout profile.rs and profile/tests.rs already use. 492,495 bytes.
- lower.rs: mod tests moves to emit/lower_tests.rs, declared with
  #[path = "lower_tests.rs"] as in #1322. 512,559 bytes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015kFDn6faAxnJwPKPwiCnj1
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 18:09:40 +00:00
Author
Owner

@⁠Filip722 on GitHub · 2026-11-27 00:44 UTC · original · edited 2026-11-27 00:48 UTC

I carried the existing host test split onto the current d154dcb1 base and preserved its authorship. The extracted bodies and the new deferred test were verified byte-for-byte. For the shader file, current main already moves out the lower tests, so the branch moves the intact buffer-lowering method to its own module. A separate test commit expresses the inherited IEEE comparison expectations through partial_cmp.

The full local asset policy passes for 240 files on 6a0bce34. The host and shader source files are 514,318 and 521,436 bytes. On the immediately preceding b1d777a integration, Windows-target GPU and shader Clippy passed with warnings denied, the focused suites passed, and the NaN shader test ran on the RTX 5060 Laptop under GE-Proton11-14. The old and new NaN reference functions also agreed in 1,498,176 comparisons. The two contributor PRs using this shared dependency passed full Windows CI on the latest base. Render-scale CI · Wine-fixture CI

Source for the rebase is available in my fork. Review branch

Assisted by Codex (GPT-6.2-Sol High).

**@⁠Filip722** on GitHub · 2026-11-27 00:44 UTC · [original](https://github.com/fxceless/victory-fork/pull/1357#issuecomment-7206719683) · edited 2026-11-27 00:48 UTC I carried the existing host test split onto the current `d154dcb1` base and preserved its authorship. The extracted bodies and the new deferred test were verified byte-for-byte. For the shader file, current main already moves out the lower tests, so the branch moves the intact buffer-lowering method to its own module. A separate test commit expresses the inherited IEEE comparison expectations through `partial_cmp`. The full local asset policy passes for 240 files on `6a0bce34`. The host and shader source files are 514,318 and 521,436 bytes. On the immediately preceding `b1d777a` integration, Windows-target GPU and shader Clippy passed with warnings denied, the focused suites passed, and the NaN shader test ran on the RTX 5060 Laptop under GE-Proton11-14. The old and new NaN reference functions also agreed in 1,498,176 comparisons. The two contributor PRs using this shared dependency passed full Windows CI on the latest base. [Render-scale CI](https://github.com/fxceless/victory-fork/actions/runs/45918429413) · [Wine-fixture CI](https://github.com/fxceless/victory-fork/actions/runs/45918432798) Source for the rebase is available in my fork. [Review branch](https://github.com/Filip722/victory-fork/tree/review/ci-source-split-d154) Assisted by Codex (GPT-6.2-Sol High).
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host.rs
  • crates/victory-shader/src/emit/lower_tests.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1357/head:github-bot/gh-1357'
git switch 'github-bot/gh-1357'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1357'
git switch 'github-bot/gh-1357'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1357'
git switch 'github-bot/gh-1357'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1357'
git switch 'main'
git merge --squash 'github-bot/gh-1357'
git switch 'main'
git merge --ff-only 'github-bot/gh-1357'
git switch 'main'
git merge 'github-bot/gh-1357'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.