[pr-fix] xtask policy: an exception waives only the checks it names #415
Loading…
Reference in a new issue
No description provided.
Delete branch "iboom72/policy-per-check-waivers"
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?
What it changes
run()inxtask/src/policy.rs(lines 80-82) skips every check for a path inEXCEPTIONS, though each entry's reason names one check. So a PE header or a base64 blob pasted intocrates/darner-gpu/src/host.rs(entered for its size) orframe_users.rs(entered for its hex rows) would pass the pre-commit hook.Each entry now lists the checks it waives, and every other check still runs on that file. The waivers are what each file trips today, checked with a copy of
check()over the six paths:bcpack-tables.bin,docs/darner-logo.png,apps/darner/darner.icocrates/darner-loader/src/heap_sites/frame_users.rs\x/0xliterals (its rows); a hex/base64 run is still refusedcrates/darner-gpu/src/host.rstools/native-dstorage-bridge/bridge.cppdocs/asset-policy.mdsays so in its enforcement list.How it was tested
8810faae(onmainf3840d73)cargo test -p xtask --locked: 9 passed, includingrepository_passes_policy(the tree passes with the narrower waivers) and the newan_exception_waives_only_the_checks_it_names(host.rswith 2 MiB of text passes, with a PE header it is refused;frame_users.rswith 1,200 digits of0xliterals passes, with an 800-character base64 run it is refused).cargo clippy -p xtask --all-targets --locked -- -D warnings: clean.cargo xtask policy: 555 files ok.Checklist
main.docs/asset-policy.md.Checked for overlap
xtask/src/policy.rsand merges with this branch without a conflict. #376 (wrapped payloads) conflicts with it in one place: its diff also rewrites the em dash in theframe_users.rsreason as—, apparently an encoding slip, on the line this branch changes. Under #376's run ruleframe_users.rsstill has no run longer than 18, so the two work together once that line is resolved. No open PR touchesdocs/asset-policy.md.Checked with AI assistance (Claude Code).
🤖 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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.