Asset policy: crates/victory-shader/src/emit/lower.rs is over the 640 KiB file-size limit on main #1429

Closed
opened 2026-11-28 19:45:23 +00:00 by Jesper-Andersson · 3 comments
Jesper-Andersson commented 2026-11-28 19:45:23 +00:00 (Migrated from github.com)
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Jesper-Andersson on 2026-11-28T19:45:23Z.


On main (923e38cc), crates/victory-shader/src/emit/lower.rs is 667,523 bytes, while xtask/src/policy.rs sets MAX_FILE_SIZE to 640 KiB (655,360 bytes), about 12 KB over. The comment above the constant still says the translator's file is 570 KiB.

Effects: a commit that includes lower.rs fails the pre-commit hook (cargo xtask policy --staged). The same check also runs in CI as part of cargo test --workspace (repository_passes_policy), so that test should fail on main too (not run here). This is separate from #1267 / #1290 (clippy lints, bindings.ini allowlist): even with those merged, the policy test should still fail on lower.rs.

Possible fixes: turn lower.rs into a lower/ module folder (none exists yet), or raise the limit or add the file to the exemption list with a reason.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:6670346737 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1429). Originally posted by [Jesper-Andersson](https://github.com/Jesper-Andersson) on 2026-11-28T19:45:23Z. --- On main (923e38cc), `crates/victory-shader/src/emit/lower.rs` is 667,523 bytes, while `xtask/src/policy.rs` sets `MAX_FILE_SIZE` to 640 KiB (655,360 bytes), about 12 KB over. The comment above the constant still says the translator's file is 570 KiB. Effects: a commit that includes `lower.rs` fails the pre-commit hook (`cargo xtask policy --staged`). The same check also runs in CI as part of `cargo test --workspace` (`repository_passes_policy`), so that test should fail on main too (not run here). This is separate from #1267 / #1290 (clippy lints, `bindings.ini` allowlist): even with those merged, the policy test should still fail on `lower.rs`. Possible fixes: turn `lower.rs` into a `lower/` module folder (none exists yet), or raise the limit or add the file to the exemption list with a reason.
github-actions[bot] commented 2026-11-28 19:45:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-28T19:45:32Z.


Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7244783405 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1429#issuecomment-7244783405). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T19:45:32Z. --- Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
LucaruluDev commented 2026-11-29 01:22:09 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by LucaruluDev on 2026-11-29T01:22:09Z.


Independent Windows workspace testing confirms the policy::tests::repository_passes_policy failure.

At f9dfb76, lower.rs is 704,996 bytes against the 655,360-byte limit (640 KiB). I also checked d585f88: the file blob and policy limit remain unchanged.

Projected file sizes

Based on a static projection of the proposed changes:

PR Projected size Bytes over limit
#1460 669,713 bytes 14,353
#1527 669,710 bytes 14,350

These are static size projections, not test results from rebased PRs.

Thanks to the contributors working on #1460, #1527 and #1493. I'm happy to independently validate whichever approach the maintainers prefer.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7248736805 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1429#issuecomment-7248736805). Originally posted by [LucaruluDev](https://github.com/LucaruluDev) on 2026-11-29T01:22:09Z. --- Independent Windows workspace testing confirms the `policy::tests::repository_passes_policy` failure. At `f9dfb76`, `lower.rs` is **704,996 bytes** against the **655,360-byte limit (640 KiB)**. I also checked `d585f88`: the file blob and policy limit remain unchanged. ### Projected file sizes Based on a static projection of the proposed changes: | PR | Projected size | Bytes over limit | | --- | ---: | ---: | | #1460 | 669,713 bytes | 14,353 | | #1527 | 669,710 bytes | 14,350 | These are static size projections, not test results from rebased PRs. Thanks to the contributors working on #1460, #1527 and #1493. I'm happy to independently validate whichever approach the maintainers prefer.
kalberts0089-hash commented 2026-11-29 08:00:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kalberts0089-hash on 2026-11-29T08:00:38Z.


Still failing on main at e1f2eb6, and the gap has grown. lower.rs is now 711,512 bytes against the 655,360-byte limit, so it is 56,152 bytes over. It was 704,996 at f9dfb76, and 10 commits have touched it since then.

> cargo run --locked -q -p xtask -- policy
POLICY: crates/victory-shader/src/emit/lower.rs: 711512 bytes exceeds the 655360-byte limit
Error: 1 asset-policy violation(s). Nothing from the game may be committed; see docs/asset-policy.md

> cargo test --locked -q -p xtask policy
policy::tests::repository_passes_policy --- FAILED
thread 'policy::tests::repository_passes_policy' panicked at xtask\src\policy.rs:232:53:
test result: FAILED. 6 passed; 1 failed

What I checked:

  • This is the only policy violation on main. bindings.ini is now allowed (xtask/src/policy.rs:151, 4f60fbd).
  • The release tag v2026.11.28.03 (f4608f0) has lower.rs at 631,099 bytes, which is under the limit. So the file crossed 640 KiB after that release. f4608f0 is an ancestor of main, and 66 commits have touched lower.rs since.
  • CI runs this check through cargo test --workspace --locked (.github/workflows/ci.yml:33), and the pre-commit hook runs it too (.githooks/pre-commit:3). EXCEPTIONS (xtask/src/policy.rs:32) only lists bcpack-tables.bin. The comment at xtask/src/policy.rs:13 still says 570 KiB.
  • A lower/ folder now exists, holding only round16.rs (2,385 bytes, added in 1a81b72).

On the open PRs (both #1460 and #1527 show as conflicting with main):

  • Tests only (#1460). On main, the top-level #[cfg(test)] mod tests block runs from lower.rs:15109 to the end of the file and is 39,057 bytes. Without it, the file would be 672,455 bytes, which is still 17,095 over. I measured this from the e1f2eb6 blob. I did not rebase the PR.
  • Tests plus analysis helpers (#1527). This PR also moves the wave/LDS analysis helpers into lower/analysis.rs. At its head (fb44422), lower.rs is 623,098 bytes (from gh api repos/trustno1-coder/VIctory-NVIDIA/contents/crates/victory-shader/src/emit/lower.rs?ref=fb44422fc9e032be46b046a7dc7296e3792a18e2). That does not match the 669,710 projected above.
  • Estimate for #1527 on main, not measured. Main has added 6,516 bytes to lower.rs since f9dfb76. If those additions all stay in lower.rs after a rebase, it would land near 629,600 bytes, still under the limit.
  • Raising the limit (#1493). The other option is to change the limit to 1 MiB, as #1493 does.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7252826977 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1429#issuecomment-7252826977). Originally posted by [kalberts0089-hash](https://github.com/kalberts0089-hash) on 2026-11-29T08:00:38Z. --- Still failing on main at `e1f2eb6`, and the gap has grown. `lower.rs` is now **711,512 bytes** against the 655,360-byte limit, so it is **56,152 bytes over**. It was 704,996 at `f9dfb76`, and 10 commits have touched it since then. ``` > cargo run --locked -q -p xtask -- policy POLICY: crates/victory-shader/src/emit/lower.rs: 711512 bytes exceeds the 655360-byte limit Error: 1 asset-policy violation(s). Nothing from the game may be committed; see docs/asset-policy.md > cargo test --locked -q -p xtask policy policy::tests::repository_passes_policy --- FAILED thread 'policy::tests::repository_passes_policy' panicked at xtask\src\policy.rs:232:53: test result: FAILED. 6 passed; 1 failed ``` What I checked: - This is the **only** policy violation on main. `bindings.ini` is now allowed (`xtask/src/policy.rs:151`, `4f60fbd`). - The release tag `v2026.11.28.03` (`f4608f0`) has `lower.rs` at 631,099 bytes, which is under the limit. So the file crossed 640 KiB after that release. `f4608f0` is an ancestor of main, and 66 commits have touched `lower.rs` since. - CI runs this check through `cargo test --workspace --locked` (`.github/workflows/ci.yml:33`), and the pre-commit hook runs it too (`.githooks/pre-commit:3`). `EXCEPTIONS` (`xtask/src/policy.rs:32`) only lists `bcpack-tables.bin`. The comment at `xtask/src/policy.rs:13` still says 570 KiB. - A `lower/` folder now exists, holding only `round16.rs` (2,385 bytes, added in `1a81b72`). On the open PRs (both #1460 and #1527 show as conflicting with main): - **Tests only (#1460).** On main, the top-level `#[cfg(test)] mod tests` block runs from `lower.rs:15109` to the end of the file and is 39,057 bytes. Without it, the file would be 672,455 bytes, which is still **17,095 over**. I measured this from the `e1f2eb6` blob. I did not rebase the PR. - **Tests plus analysis helpers (#1527).** This PR also moves the wave/LDS analysis helpers into `lower/analysis.rs`. At its head (`fb44422`), `lower.rs` is **623,098 bytes** (from `gh api repos/trustno1-coder/VIctory-NVIDIA/contents/crates/victory-shader/src/emit/lower.rs?ref=fb44422fc9e032be46b046a7dc7296e3792a18e2`). That does not match the 669,710 projected above. - **Estimate for #1527 on main, not measured.** Main has added 6,516 bytes to `lower.rs` since `f9dfb76`. If those additions all stay in `lower.rs` after a rebase, it would land near 629,600 bytes, still under the limit. - **Raising the limit (#1493).** The other option is to change the limit to 1 MiB, as #1493 does.
Sign in to join this conversation.
No labels
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.

Reference
trustno1-coder/VIctory-NVIDIA#1429
No description provided.