Skip to content

Policy: resolve cache paths inside Windows AppContainer - #310

Open
melon0918 wants to merge 1 commit into
Marvisak:mainfrom
melon0918:fix/windows-native-cache-path
Open

melon0918 wants to merge 1 commit into
Marvisak:mainfrom
melon0918:fix/windows-native-cache-path

Conversation

@melon0918

Copy link
Copy Markdown

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).

muhammed-aksoy pushed a commit to muhammed-aksoy/VIctory that referenced this pull request Nov 24, 2026
edsuuu referenced this pull request in edsuuu/VI-BR-PORT Nov 24, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeremygold02

Copy link
Copy Markdown
Contributor

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

@mercuryVM mercuryVM left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested 1ea6427 on Windows 11, RTX 5070, MSVC: cargo test -p victory-core 9 passed, including native_paths_still_check_repository_markers. cargo clippy -p victory-core --all-targets is clean. Not run inside an AppContainer here.

  • Dependency check: windows-sys is already a workspace dependency, and this only adds the Win32_Storage_FileSystem feature under cfg(windows). Nothing new comes into Cargo.lock apart from the edge.
  • The fallback stays safe: the workspace root and the target are both resolved through canonicalize_native, so starts_with compares \?\GLOBALROOT\Device\... against the same form. The ancestor walk for .victory-root still runs on the resolved path.
  • Behaviour change to be aware of: on Windows, resolve now stops at the first PermissionDenied instead of moving up to the parent. A path that exists but cannot be canonicalized now goes through the native retry, where it used to be resolved from its parent. access_mode(0) with backup semantics opens almost anything, so I don't expect regressions, but if the native open also fails the error now surfaces instead of the old fallback.

AI-assisted (Claude Code).

mercuryVM added a commit to mercuryVM/VIctory that referenced this pull request Nov 24, 2026
…ndows AppContainer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 24, 2026

Marvisak commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

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

AntoninMichelq pushed a commit to AntoninMichelq/VIctory-forkAMD that referenced this pull request Nov 25, 2026
… clean-up pass

With VICTORY_SHADER_OPT=0 (fxceless Marvisak#310) the screen probes' ray
activation is still 66k instructions; VICTORY_SHADER_OPT_BIG=50000
gives that program alone the full clean-up (container 203 KB -> 119 KB).
Unset: as before, and the shader cache key is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AZ9pSE7XjLLUipXi15813g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants