Asset policy: host test split, Rust-source ceiling, and v_cmp clippy fix (redo #1357/#1361) #1319
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1322"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from fxceless/victory-fork. Originally posted by CwWwWwW on 2026-11-26T15:07:07Z.
Problem
main'scheckjob is red before any PR code runs, so #1322 (and every other PR) cannot be green:crates/victory-gpu/src/host.rs559,917 B andcrates/victory-shader/src/emit/lower.rs544,888 B exceed the asset policy's 524,288-byte limit;cargo clippy --workspace --all-targets -- -D warningsfails oncrates/victory-shader/src/emit/valu_tests.rsfor IEEE comparison expressions.The original #1322 lower.rs test move is already in main (
b1d777a), so rebasing the old branch is empty. This branch redoes the two abandoned policy PRs against current main and fixes the main clippy failure, as requested.Change
#[cfg(test)]modules (38,156 B) move verbatim tocrates/victory-gpu/src/host/*.rs, declared fromhost.rswith#[path]; no non-test code changes, same module paths/test names.host.rsis 522,365 B (under 512 KiB)..rsfiles get a 2 MiB ceiling (MAX_SOURCE_FILE_SIZE) while other files keepMAX_FILE_SIZE = 512 KiB; magic-byte, NUL-byte and encoded-run guards are unchanged. Docs and policy tests updated. This redoes #1361.every_f32_comparison_answers_nans_as_ieeeenumerates IEEE ordered/unordered answers including NaNs; clippy'sdouble_comparisons/neg_cmp_op_on_partial_ordrewrites would change NaN answers, so the test allows those two lints with the reason. This clears main's current clippy failure.Validation
cargo xtask policy: 241 files ok (was 2 violations).cargo test -p xtask --locked: 6 passed, 0 failed (includingpolicy::tests::repository_passes_policyand the new source-limit test).cargo test -p victory-gpu --lib --locked: 238 passed, 0 failed, 6 ignored.cargo test -p victory-shader --lib --locked: 243 passed, 0 failed, 16 ignored.cargo clippy --workspace --all-targets --locked -- -D warnings: clean.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: clean.Once this lands, #1333 (rebased onto it) can pass
checkwithout carrying unrelated policy changes.Imported from fxceless/victory-fork. Originally posted by CwWwWwW on 2026-11-26T15:09:33Z.
Local CI-like validation on this branch:
cargo xtask policy: 222 files ok (the failing check).cargo test -p xtask --locked: 5 passed,repository_passes_policyincluded.cargo test -p victory-shader --lib --locked: 222 passed, 0 failed, 4 ignored (whole crate;lower::testsalone: 13 passed, 1 ignored, as before the move).cargo clippy --workspace --all-targets --locked -- -D warnings: clean (39 s).cargo test --workspace --locked --exclude victory-gpucannot complete on this machine:victory-loader'sloads_binds_and_calls_probebuildstests/fixtures/hle-probewith a nested cargo, and this machine has no MSVC toolchain (the repo pinsx86_64-pc-windows-msvc; I use a GNU host as a fallback), so that nested fixture link fails. Environmental and unrelated to this move; the CIwindows-latestjob with MSVC is the authority.Imported from fxceless/victory-fork. Originally posted by CwWwWwW on 2026-11-26T15:23:33Z.
CI-main-log evidence for this PR (run 45836860665, commit
58de9bf, jobcheck): theTestsstep is the only failing one and fails on exactly this:POLICY: crates/victory-shader/src/emit/lower.rs: 526968 bytes exceeds the 524288-byte limit->policy::tests::repository_passes_policy ... FAILED. All other crates' tests listed in the log passed. So this branch removes the only failure that was keepingcheckred on main; once it lands, #1320/#1321/#1323 can be rebased and their checks are expected to go green.Imported from fxceless/victory-fork. Originally posted by CwWwWwW on 2026-11-27T02:18:42Z.
I tried rebasing this branch onto current
main(81d54b0), but the rebase produces an empty diff: the lower.rs test move already landed on main in commitb1d777a(it addslower_tests.rsand changes lower.rs's tail to#[path = "lower_tests.rs"] mod tests;). Resolving the add/add conflict inlower_tests.rswith main's version leaves no commit, so I did not push an empty branch.The policy failure on current main is now a different one:
host.rs559,917 B andlower.rs544,888 B exceed 524,288 B because of non-test code added since; that is tracked in #1342 and the open #1357/#1361. This PR is superseded and cannot make the check green on its own; I recommend closing it (or repurposing its file-split if you want a fresh policy fix, but that would be a different change).No branch update was pushed; the PR head is still
2ee6853.Imported from fxceless/victory-fork. Originally posted by CwWwWwW on 2026-11-27T02:41:12Z.
Ready for review. This branch now redoes the abandoned #1357 and #1361 work against current
mainand also fixes main's current clippy failure, so the check has a chance to be green:02c62c9GPU: host.rs's ten test modules move tocrates/victory-gpu/src/host/*.rsvia#[path](no non-test changes; host.rs 522,365 B).73e19bbPolicy:.rssource files get a 2 MiB ceiling (other files stay 512 KiB; magic/NUL/encoded-run guards unchanged) + docs/policy tests.374cb35Shaders: allow the two clippy comparison lints on the IEEEv_cmpNaN test (clippy's rewrites would change NaN answers).Local validation:
cargo xtask policy241 files ok;cargo test -p xtask6 passed;cargo test -p victory-gpu --lib238 passed;cargo test -p victory-shader --lib243 passed; workspace clippy default and --all-features clean. CI run 45929521337 is in progress.I could not add
fxcelessas a formal reviewer through the API (404 from the review-request endpoint for this fork PR), so this comment is the review request. Once this merges, #1333 can be rebased on top and should be green without unrelated policy commits.Imported from fxceless/victory-fork. Originally posted by CwWwWwW on 2026-11-27T09:01:18Z.
Verification on current
main(9a9091d, 2026-11-27), from this mission's independent audit:main still fails the asset policy:
This matters beyond clippy: CI's Tests step (
cargo test --workspace --exclude victory-gpu) includes xtask'srepository_passes_policy, so even after #1440 fixes the Clippy step, the Tests step still fails on the policy.The Rust-source ceiling commit in this PR (
73e19bb) was cherry-picked onto9a9091din a scratch worktree: it applies cleanly (+34/-5 indocs/asset-policy.md,xtask/src/policy.rs), and with it:cargo run -p xtask -- policy->asset policy: 235 files ok(exit 0)cargo test -p xtask-> 6 passed, 0 failed (repository_passes_policyincluded)So the policy half of this PR still resolves the current CI Tests blocker on today's main. The clippy part is now partly superseded: open PR #1440 also fixes
wave64_after_loop.rs(a file added after this branch's base), so that commit here can be dropped or kept as preferred. (Independent verification; no external code used.)Imported from fxceless/victory-fork. Originally posted by CwWwWwW on 2026-11-27T09:10:01Z.
Merge simulation onto current
main(9a9091d, 2026-11-27), in a scratch worktree:git merge --no-ff fix/asset-policy-redomerges cleanly (no conflicts;host.rsauto-merges with the newer code, and the test modules land inhost/*.rs). On the merged tree:cargo run -p xtask -- policy->asset policy: 245 files ok(exit 0)cargo test -p xtask-> 6 passed, 0 failed (repository_passes_policyincluded)cargo check --workspace --all-targets-> cleancargo test -p victory-gpu --lib -- --test-threads=1-> 242 passed, 0 failed, 7 ignoredcargo test -p victory-shader --lib-> 252 passed, 0 failed, 19 ignoredSo this PR already applies cleanly to today's main and is verified there. With #1440 (which fixes the
wave64_after_loop.rsclippy lint added after this branch's base) the two independent CI blockers - clippy and the asset policy - would both be covered.(Independent verification in a scratch worktree of this repository; no external code used.)
Imported from fxceless/victory-fork. Originally posted by CwWwWwW on 2026-11-27T16:21:56Z.
Not applicable on the VIctory-NVIDIA tree that replaced main: the asset policy is now a uniform 640 KiB limit (xtask/src/policy.rs) and both large files fit under it; the 512 KiB split problem no longer exists, and the shader clippy target is absent. Closing.
Pull request closed