Policy: the file-size limit is 1 MiB, over the translator's 688 KiB lower.rs (fixes #1429) #1493
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1493
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1493"
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?
@kibagami-nc on GitHub · 2026-11-28 20:46 UTC · original
kibagami-nc:fix/policy-size-limit→main· +5 −3 · 2 files · 1 commits · merged 2026-11-29 08:16 UTCFixes #1429 (found by Jesper-Andersson).
Updated on main (
f9dfb76f): the limit is now 1 MiB.lower.rshas kept growing since this PR was opened:lower.rs1028eef2(limit raised to 640 KiB)923e38c(2026-11-28 evening)f9dfb76f(now)At that pace, 768 KiB would have been passed again within days. #1460 (moving
lower.rs's tests to their own file) saved 28 KiB, which no longer brings the file under 640 KiB, and it now conflicts with main.What happens
xtask/src/policy.rsallows 640 KiB (655,360 bytes). So on main:cargo test --workspace --lockedfails inrepository_passes_policy:cargo xtask policy --staged) refuses any commit that toucheslower.rs.The change
MAX_FILE_SIZEis 1 MiB. This is what1028eef2did when the file passed 570 KiB, but with room for the pace it now grows at.lower.rsat 688 KiB andcrates/victory-gpu/src/host.rsat 593 KiB.docs/asset-policy.mdsays 1 MiB.The policy's other checks are unchanged: the allowlist, no binary data, no known binary signatures, no long hex or base64 runs. The limit still lets through only a text file of source.
Why not split
lower.rs? Turning it into alower/module folder would be the lasting fix. But it moves close to 700 KiB of code that most open translator PRs touch, and each of them would then conflict.Tests
cargo test -p xtask --locked: 7 passed,repository_passes_policyincluded. On main it fails as above.cargo xtask policy:asset policy: 321 files ok.cargo clippy -p xtask --all-targets --locked -- -D warnings: clean.Policy: the file-size limit is 768 KiB, over the translator's 652 KiB lower.rs (fixes #1429)to Policy: the file-size limit is 1 MiB, over the translator's 688 KiB lower.rs (fixes #1429)30a387b59btoa28c59757b