Check staged file type changes in the asset policy hook #2642
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2642
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2642"
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?
@maxence468 on GitHub · 2026-11-25 17:27 UTC · original
maxence468:fix/check-staged-type-changes→main· +1 −1 · 1 files · 1 commits · openGit reports replacement of a tracked symlink with a regular file as T. Include that status so the pre-commit check reads the new staged blob. Verified in a temporary Git repository that the old filter omits the replacement and the updated filter lists it. git diff --check passed. The Rust suite was not run.
@cloph-dsp on GitHub · 2026-11-25 17:37 UTC · original
Independent Windows verification of PR #2642 (head
9f55841), synthetic/temporary-repository only; no game data and no source edits.cargo test --locked -p xtask: 6 passed, 0 failed (includingpolicy::tests::repository_passes_policy).120000) was replaced by a regular file and staged as mode100644.git diff --cached --name-statusreportsT link. The old filter--diff-filter=ACMRlists[](file skipped); the newACMRTlists[link]. On this Windows hostcore.symlinks=false, so the mode change had to be staged explicitly withgit update-index --cacheinfo 100644— plaingit addkept mode120000. This confirms the one-line fix covers the typechange case.No bug found. Toolchain: rustc/cargo 1.100.0 MSVC (repo pins 1.98.1). AI-assisted (Hy4 flash).
@kotekompotek on GitHub · 2026-11-25 17:43 UTC · original
Reviewed:
--diff-filter=ACMRTadds type changes so a file staged as a symlink (or symlink→file) no longer slips past the asset-policy check. Small and directly serves rule #1. CI green.@Marvisak on GitHub · 2026-11-25 23:22 UTC · original
Automated triage for the maintainers.
This changes
list_filesinxtask/src/policy.rsfrom--diff-filter=ACMRtoACMRT, so a staged type change (symlink replaced by a regular file, or the reverse) is included in the--stagedasset-policy check. I checked thatrunreads such entries from the index viagit show :<path>, so the new blob is actually inspected; the change only tightens the allowlist check and adds no exception. CI (check) passes.This is a recommendation for a maintainer to look, not an approval.
Generated by Claude Code
@futurepro62 on GitHub · 2026-11-26 11:08 UTC · original
NVIDIA full-suite run, to go with the reports above by cloph-dsp, since none of them names a GPU run. Tested exact head
9f55841(on its base13f91ca).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 773 passed, 0 failed, 9 ignored.#[test]functions in the diff.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
@fuzeofficlal on GitHub · 2026-11-26 11:39 UTC · original · approved these changes
Reviewed
9f55841a(git merge-treeagainstmain63bcca43is clean): addingTto--diff-filter=ACMRTinxtask/src/policy.rs:114closes the gap where replacing a tracked symlink with a regular file in the index skippedpolicy::run'sgit show :<path>blob inspection.Verified locally on Windows 11 (Rust 1.98.1 MSVC):
rustfmt --edition 2024 --check xtask/src/policy.rs: clean.cargo clippy -p xtask --all-targets -- -D warnings(default and--all-features): clean.xtask policy(184 files ok) andcargo test -p xtask --locked(6/6 passed): clean.Non-blocking notes on pre-existing behavior:
--stagedstill inspects the index blob without checking the120000mode on symlink entries (and treatsgit showfailures as deleted), and an index-level test forTtransitions would be a nice follow-up.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.