Policy: the size-limit test checks the size limit itself #2615
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!2615
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2615"
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?
@iBooM72 on GitHub · 2026-11-29 14:58 UTC · original
iBooM72:fix/policy-size-test→main· +12 −4 · 1 files · 1 commits · openWhat it changes
The asset policy's "too big" test no longer checks the size limit. Its file is a 600 KiB run of one letter: over the original 512 KiB limit, but under the current 1 MiB. It was refused only by the hex/base64 run rule, so the test still passed with the size check turned off.
The new test,
rejects_only_files_over_the_size_limit, uses short lines that no other rule refuses. A file of exactlyMAX_FILE_SIZEmust be accepted. One byte more must be refused for its size alone. It uses the constant, so it follows the limit if that changes.Only test code changes. The policy rules stay the same.
How it was tested
>changed to>=.cargo testpassed for the crates it touches: no.cargo test -p xtask --locked: 7 passed, 1 failed.repository_passes_policyrefusesheap_sites/frame_users.rs(#2420), and fails the same way on unmodified829188e9.cargo clippy -p xtask --all-targets --locked -- -D warningsandcargo xtask policy --stagedpassed.829188e9, with no errors reported in xtask (#2019 covers theunwind_copyone).cargo test --workspace --locked --no-fail-fast: 8 tests failed. 5 also failed in the same run on829188e9, and 2 in repeat runs there. The last,library_state_and_lockinvictory-hle, is a timing test. It failed once here, then passed 12 of 12 repeats here and on829188e9. No other crate depends on xtask.Checked for overlap
MAX_FILE_SIZE, and the new test would follow their value. #730, #1399 and #1739 change nearby tests, so they may need a small merge.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.