Policy: resolve cache paths inside Windows AppContainer #310
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/310"
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?
Imported from Marvisak/VIctory. Originally posted by melon0918 on 2026-11-24T02:13:46Z.
What changed
A Windows AppContainer can read, write and enumerate its cache directory while the DOS-volume lookup used by
std::fs::canonicalizefails 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
GetFinalPathNameByHandleWwith the DOS volume flag and confirmed that the normalized native name was available..victory-rootmarker to the cache parent still caused the expected rejection.cargo test --locked -p victory-core(9 tests),cargo fmt -p victory-core --checkandcargo xtask policypassed. 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).
Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-24T04:18:55Z.
Tested PR #310 at head
1ea6427f05078f9771d724ba180c8a826c9bf009(state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged at1ea6427f05078f9771d724ba180c8a826c9bf009.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
Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T10:11:37Z.
Review: APPROVED
Tested
1ea6427on Windows 11, RTX 5070, MSVC:cargo test -p victory-core9 passed, includingnative_paths_still_check_repository_markers.cargo clippy -p victory-core --all-targetsis clean. Not run inside an AppContainer here.windows-sysis already a workspace dependency, and this only adds theWin32_Storage_FileSystemfeature undercfg(windows). Nothing new comes intoCargo.lockapart from the edge.canonicalize_native, sostarts_withcompares\?\GLOBALROOT\Device\...against the same form. The ancestor walk for.victory-rootstill runs on the resolved path.resolvenow stops at the firstPermissionDeniedinstead 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).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:29:47Z.
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 currentmain.Generated by Claude Code
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.