Policy: resolve cache paths inside Windows AppContainer #310

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

@⁠melon0918 on GitHub · 2026-11-24 02:13 UTC · original
melon0918:fix/windows-native-cache-path → main · +92 −4 · 3 files · 1 commits · open

What changed

A Windows AppContainer can read, write and enumerate its cache directory while the DOS-volume lookup used by std::fs::canonicalize fails with access denied. In that configuration VIctory exits while checking the cache path, before it can map the title.

When DOS path resolution hits a permission error, retry using the normalized native volume path returned by the open file handle. The fallback checks both paths in the same namespace and still checks the resolved ancestors for .victory-root.

Verification

  • Windows 10 22H2 (19045), rustc 1.98.1. A standalone probe reproduced the access denied from GetFinalPathNameByHandleW with the DOS volume flag and confirmed that the normalized native name was available.
  • In the same zero-network-capability AppContainer, the unpatched build failed before mapping. The patched build completed image mapping and import binding with zero missing imports. Adding a synthetic .victory-root marker to the cache parent still caused the expected rejection.
  • cargo test --locked -p victory-core (9 tests), cargo fmt -p victory-core --check and cargo xtask policy passed. On the unmodified base the workspace test run hit the known WinHTTP export failure and seven graphics tests failed on this host.

This patch is independent of the Agility SDK changes in #175. AI-assisted (Codex).

**@⁠melon0918** on GitHub · 2026-11-24 02:13 UTC · [original](https://github.com/Marvisak/VIctory/pull/310) `melon0918:fix/windows-native-cache-path` → `main` · +92 −4 · 3 files · 1 commits · open ### What changed A Windows AppContainer can read, write and enumerate its cache directory while the DOS-volume lookup used by `std::fs::canonicalize` fails with access denied. In that configuration VIctory exits while checking the cache path, before it can map the title. When DOS path resolution hits a permission error, retry using the normalized native volume path returned by the open file handle. The fallback checks both paths in the same namespace and still checks the resolved ancestors for `.victory-root`. ### Verification - Windows 10 22H2 (19045), rustc 1.98.1. A standalone probe reproduced the access denied from `GetFinalPathNameByHandleW` with the DOS volume flag and confirmed that the normalized native name was available. - In the same zero-network-capability AppContainer, the unpatched build failed before mapping. The patched build completed image mapping and import binding with zero missing imports. Adding a synthetic `.victory-root` marker to the cache parent still caused the expected rejection. - `cargo test --locked -p victory-core` (9 tests), `cargo fmt -p victory-core --check` and `cargo xtask policy` passed. On the unmodified base the workspace test run hit the known WinHTTP export failure and seven graphics tests failed on this host. This patch is independent of the Agility SDK changes in #175. AI-assisted (Codex).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:58:50 +00:00
Author
Owner

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

Tested PR #310 at head 1ea6427f05078f9771d724ba180c8a826c9bf009 (state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged at 1ea6427f05078f9771d724ba180c8a826c9bf009.

  • cargo test --locked -p victory-core native_paths_still_check_repository_markers — passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 8 filtered out; finished in 0.00s ); cases: policy::tests::native_paths_still_check_repository_markers.

Behavior covered: Checks native cache paths still enforce repository markers after Windows AppContainer path resolution.
Code: crates/victory-core/src/policy.rs

**@⁠jeremygold02** on GitHub · 2026-11-24 04:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/310#issuecomment-7121905022) Tested PR #310 at head `1ea6427f05078f9771d724ba180c8a826c9bf009` (state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged at `1ea6427f05078f9771d724ba180c8a826c9bf009`. - `cargo test --locked -p victory-core native_paths_still_check_repository_markers` — passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 8 filtered out; finished in 0.00s ); cases: policy::tests::native_paths_still_check_repository_markers. Behavior covered: Checks native cache paths still enforce repository markers after Windows AppContainer path resolution. Code: [crates/victory-core/src/policy.rs](https://github.com/Marvisak/VIctory/blob/1ea6427f05078f9771d724ba180c8a826c9bf009/crates/victory-core/src/policy.rs)
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:29 UTC · original · edited 2026-11-25 01:15 UTC

Automated triage for the maintainers.

Needs rebase. This pull request conflicts with main (conflicting: crates/victory-core/src/policy.rs). It will be reviewed once it is rebased onto the current main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 00:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/310#issuecomment-7148568707) · edited 2026-11-25 01:15 UTC <!-- victory-triage v1 head=1ea6427f05078f9771d724ba180c8a826c9bf009 verdict=needs-rebase at=2026-11-25T01:15:39Z --> Automated triage for the maintainers. **Needs rebase.** This pull request conflicts with `main` (conflicting: `crates/victory-core/src/policy.rs`). It will be reviewed once it is rebased onto the current `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request has changes conflicting with the target branch.
  • crates/victory-core/src/policy.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/310/head:github-bot/gh-310'
git switch 'github-bot/gh-310'

Merge

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