HLE tests: cover Windows path rules on every host #290

Open
github-bot wants to merge 1 commit from github-bot/gh-290 into main AGit
Owner

@⁠Quat3rnion on GitHub · 2026-11-24 02:04 UTC · original
Quat3rnion:victory-path-tests → main · +221 −88 · 3 files · 1 commits · open

What

The plan asks for Linux-independent tests of the Windows path semantics so
the branches stay covered on CI. The rules lived inside the Windows-only
files module, where Linux could not reach them. This moves the lexical
decisions — drive letters and casing, X: relative roots, slash handling,
\\?\ paths, UNC conversion, dot segments and the long-path threshold —
into a host-independent paths module with seven tests. files.rs keeps
the host calls and delegates to the same functions; there is no behaviour
change.

An AI tool wrote part of this change.

Tested

  • Linux: cargo test --workspace with PR #112's Linux build fix applied locally (not part of this PR): 171 passed, 0 failed, 3 ignored. The seven new path tests pass on Linux.
  • Windows cross-build: cargo check --target x86_64-pc-windows-gnu --workspace --tests passes. The Windows-only files tests were not run; there is no Windows host here.
  • cargo xtask policy passes (151 files ok). No game files or data from them were added.
  • Not tested: a real title. The extracted rules are the existing ones, unchanged.

Checklist

  • Workspace tests and Windows cross-check pass as described.
  • cargo xtask policy passes. No game files or data from them were added.
  • AI authorship is disclosed above.
**@⁠Quat3rnion** on GitHub · 2026-11-24 02:04 UTC · [original](https://github.com/Marvisak/VIctory/pull/290) `Quat3rnion:victory-path-tests` → `main` · +221 −88 · 3 files · 1 commits · open ## What The plan asks for Linux-independent tests of the Windows path semantics so the branches stay covered on CI. The rules lived inside the Windows-only `files` module, where Linux could not reach them. This moves the lexical decisions — drive letters and casing, `X:` relative roots, slash handling, `\\?\` paths, UNC conversion, dot segments and the long-path threshold — into a host-independent `paths` module with seven tests. `files.rs` keeps the host calls and delegates to the same functions; there is no behaviour change. An AI tool wrote part of this change. ## Tested - Linux: `cargo test --workspace` with PR #112's Linux build fix applied locally (not part of this PR): 171 passed, 0 failed, 3 ignored. The seven new path tests pass on Linux. - Windows cross-build: `cargo check --target x86_64-pc-windows-gnu --workspace --tests` passes. The Windows-only `files` tests were not run; there is no Windows host here. - `cargo xtask policy` passes (151 files ok). No game files or data from them were added. - Not tested: a real title. The extracted rules are the existing ones, unchanged. ## Checklist - [x] Workspace tests and Windows cross-check pass as described. - [x] `cargo xtask policy` passes. No game files or data from them were added. - [x] AI authorship is disclosed above.
Move the lexical drive, separator, verbatim and dot-segment decisions out of the Windows-only files module into a host-independent paths module with seven unit tests. The Windows module keeps only the host calls and delegates to the same rules. Add no behaviour change.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:58:08 +00:00
Author
Owner

@⁠jeremygold02 on GitHub · 2026-11-24 04:17 UTC · original

Tested PR #290 at head 8b288a11bf341f849875ab3e6072e5402d65de17 (state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged at 8b288a11bf341f849875ab3e6072e5402d65de17.

  • cargo test --locked -p victory-hle narrow_drive_detection_precedes_decoding — passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 87 filtered out; finished in 0.00s ); cases: modules::paths::tests::narrow_drive_detection_precedes_decoding.

Behavior covered: Checks Windows drive detection before narrow-path decoding and covers drive-relative, verbatim, long and UNC path rewriting on the host.
Code: crates/victory-hle/src/modules/paths.rs, crates/victory-hle/src/modules/files.rs

**@⁠jeremygold02** on GitHub · 2026-11-24 04:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/290#issuecomment-7121885575) Tested PR #290 at head `8b288a11bf341f849875ab3e6072e5402d65de17` (state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged at `8b288a11bf341f849875ab3e6072e5402d65de17`. - `cargo test --locked -p victory-hle narrow_drive_detection_precedes_decoding` — passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 87 filtered out; finished in 0.00s ); cases: modules::paths::tests::narrow_drive_detection_precedes_decoding. Behavior covered: Checks Windows drive detection before narrow-path decoding and covers drive-relative, verbatim, long and UNC path rewriting on the host. Code: [crates/victory-hle/src/modules/paths.rs](https://github.com/Marvisak/VIctory/blob/8b288a11bf341f849875ab3e6072e5402d65de17/crates/victory-hle/src/modules/paths.rs), [crates/victory-hle/src/modules/files.rs](https://github.com/Marvisak/VIctory/blob/8b288a11bf341f849875ab3e6072e5402d65de17/crates/victory-hle/src/modules/files.rs)
Author
Owner

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

Automated triage for the maintainers.

Needs rebase. This PR does not merge cleanly into current main (ac2525d). Conflicting files: crates/victory-hle/src/modules/mod.rs.

The content has not been reviewed yet; it will be once the branch is rebased onto main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 00:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/290#issuecomment-7148505371) <!-- victory-triage v1 head=ae6ebd9ec2708307806ea966f2a9f5237e20b56a verdict=needs-rebase at=2026-11-25T00:13:20Z --> Automated triage for the maintainers. **Needs rebase.** This PR does not merge cleanly into current `main` (ac2525d). Conflicting files: `crates/victory-hle/src/modules/mod.rs`. The content has not been reviewed yet; it will be once the branch is rebased onto `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request has changes conflicting with the target branch.
  • crates/victory-hle/src/modules/mod.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/290/head:github-bot/gh-290'
git switch 'github-bot/gh-290'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-290'
git switch 'github-bot/gh-290'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-290'
git switch 'github-bot/gh-290'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-290'
git switch 'main'
git merge --squash 'github-bot/gh-290'
git switch 'main'
git merge --ff-only 'github-bot/gh-290'
git switch 'main'
git merge 'github-bot/gh-290'
git push origin 'main'
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!290
No description provided.