Core: normalize trailing .. and Windows verbatim paths in policy::resolve #1163

Closed
github-bot wants to merge 1 commit from gh-pr/1163/head into gh-pr/1163/base
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-24 16:18 UTC · original
geiyiliyabumo:fix/policy-resolve-trailing-dotdot → main · +139 −32 · 1 files · 1 commits · closed without merging

Summary

Fixes #793

Full verification details and change notes are documented in #793 (commit 8a0ac65, based on main ffe310e).

 crates/victory-core/src/policy.rs | 171 +++++++++++++++++++++++++++++++-------
 1 file changed, 139 insertions(+), 32 deletions(-)

Verification (Windows 11 x64 MSVC)

  • rustfmt --edition 2024 --check on edited files: PASS
  • cargo xtask policy: PASS (zero game files/data)
  • cargo clippy --all-targets --locked -- -D warnings (default + --features diagnostics where applicable): PASS
  • Targeted & crate unit/GPU tests: PASS

AI-assisted; synthetic tests only, no game files.

**@⁠geiyiliyabumo** on GitHub · 2026-11-24 16:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/1163) `geiyiliyabumo:fix/policy-resolve-trailing-dotdot` → `main` · +139 −32 · 1 files · 1 commits · closed without merging ### Summary Fixes #793 Full verification details and change notes are documented in #793 (commit `8a0ac65`, based on `main` `ffe310e`). ```text crates/victory-core/src/policy.rs | 171 +++++++++++++++++++++++++++++++------- 1 file changed, 139 insertions(+), 32 deletions(-) ``` ### Verification (Windows 11 x64 MSVC) - `rustfmt --edition 2024 --check` on edited files: **PASS** - `cargo xtask policy`: **PASS** (zero game files/data) - `cargo clippy --all-targets --locked -- -D warnings` (default + `--features diagnostics` where applicable): **PASS** - Targeted & crate unit/GPU tests: **PASS** *AI-assisted; synthetic tests only, no game files.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:21:50 +00:00
github-bot closed this pull request 2026-11-26 04:21:50 +00:00
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 18:01 UTC · original

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 8a0ac65: cargo test -p victory-core passes, 15 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 18:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/1163#issuecomment-7140034808) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 8a0ac65: `cargo test -p victory-core` passes, 15 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Author
Owner

@⁠Calvix2k on GitHub · 2026-11-24 21:18 UTC · original

Verified head 8a0ac65 locally on Windows 10 x64 (Rust 1.98.1 MSVC):

  • cargo test -p victory-core --locked -- --test-threads=1 — 15 passed, 0 failed, including the trailing ../., absent-drive and verbatim \\?\ cases.
  • cargo clippy -p victory-core --all-targets --all-features --locked -- -D warnings — clean.
  • cargo xtask policy — 154 files ok.

The two normalization bugs from #793 reproduce and are fixed here: absent paths ending in .. now report InsideRepo/Ok instead of Io, and <outside>/not-yet-created/../<repo>/cache no longer slips past the repo check under the verbatim prefix.

**@⁠Calvix2k** on GitHub · 2026-11-24 21:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/1163#issuecomment-7144755129) Verified head 8a0ac65 locally on Windows 10 x64 (Rust 1.98.1 MSVC): - `cargo test -p victory-core --locked -- --test-threads=1` — **15 passed, 0 failed**, including the trailing `..`/`.`, absent-drive and verbatim `\\?\` cases. - `cargo clippy -p victory-core --all-targets --all-features --locked -- -D warnings` — clean. - `cargo xtask policy` — 154 files ok. The two normalization bugs from #793 reproduce and are fixed here: absent paths ending in `..` now report `InsideRepo`/`Ok` instead of `Io`, and `<outside>/not-yet-created/../<repo>/cache` no longer slips past the repo check under the verbatim prefix.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:33 UTC · original

Automated triage for the maintainers. Closing because another open pull request covers the same change.

See #937.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 00:33 UTC · [original](https://github.com/Marvisak/VIctory/pull/1163#issuecomment-7148629614) Automated triage for the maintainers. Closing because another open pull request covers the same change. See #937. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1163
No description provided.