App: keep run paths stable when the title changes directory #2677
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2677
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2677"
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?
@jaschinski97-ops on GitHub · 2026-11-25 17:59 UTC · original
jaschinski97-ops:fix/windows-launch-paths→main· +91 −3 · 3 files · 2 commits · closed without mergingA title changing the process current directory can redirect relative executable/DLL lookups, caches and persistent writes. Resolve the runner-owned executable, cache and data roots to absolute paths once before title code executes. Relative paths retain their launch-directory meaning; destinations need not exist yet.
The refresh to main63bcca43 preserves its early low-memory guards before loading configuration and anchoring paths. This stays separate from #1798's content-folder search. FidelityFX already resolves/loads synchronously before title execution and needs no change here.
Validation:
Claim registration corrects parser rejection of the earlier wording. Rebase reply.
AI-assisted with Codex: separate implementation, coordinator review and independent agent review; external Windows reviewers also verified the original path regression. Synthetic programs only, no GPU/game data. No game-start or performance claim.
@oni-swr on GitHub · 2026-11-25 18:33 UTC · original
Independent verification (review, not a task claim) — covered by the existing claim on #1633.
f206de3a5daee81d0581fe0a6e22314d90b49c1f(OPEN, non-draft, merges cleanly; merge-base ==origin/main)origin/main:13f91caee25f2fdf2c062be5f7a27f058e51cbcaVICTORY_WARP=1,VICTORY_D3D12_WARP=1,dxil.dll1.8.2502.11 (Windows Kit 10.0.26100.0 x64), no physical GPU used (these app tests do not open a GPU), no game files, synthetic temp files only.Commands and results
cargo test --locked -p victory launch_paths_survive→ 1 passed, 0 failed, 0 ignored (the new test; thecensusintegration test filtered out).cargo test --locked -p victory(full crate) → unit tests 11 passed, 0 failed, 0 ignored;tests/census.rs2 passed, 0 failed, 0 ignored.cargo clippy --locked -p victory --all-targets→ clean, no warnings.Negative control
launch_pathswith identity behaviour (nostd::path::absoluteon the executable, cache dir or data dir).launch_paths_survive_a_title_changing_the_current_directoryFAILED (parent and child panic, 0 passed, 1 failed). Restored, it passes.Review notes
runuses the anchored values (set_image_pathandreadtake the newexe).std::path::absolutedoes not need the paths to exist and does not resolve symlinks, which matches the stated "relative to the launch directory" semantics.elsewhere/cacheorelsewhere/datatree appears. The test module iscfg(all(test, windows)), matchinglaunch_paths, so non-Windows builds are not affected.tempfileis added only as a dev-dependency (Cargo.lockchange is one line, and--lockedaccepts it).AI disclosure: independent verification by Claude Code (Claude Sonnet 5.5).
@kotekompotek on GitHub · 2026-11-25 18:35 UTC · original
Real hazard, clean fix - std::path::absolute normalizes without requiring existence (unlike canonicalize), so cache/data dirs that don't exist yet still resolve relative to launch. The child-process CWD test is a nice way to cover this without poisoning parallel tests. One note: launch_paths is cfg(windows) but called unconditionally from run() - fine today since this app is Windows-only, worth a non-Windows passthrough or comment if a port ever lands.
@fuzeofficlal on GitHub · 2026-11-25 18:57 UTC · original
Independent Windows 11 verification and code review of
f206de3a(on13f91ca):Verification (
rustc 1.98.1MSVC)cargo clippy --locked -p victory --all-targets -- -D warningsand--all-features: 0 warnings.cargo test --locked -p victory: 11 passed (unit, includinglaunch_paths_survive_a_title_changing_the_current_directory), 2 passed (tests/census.rs).Review Notes
exe,cfg.cache_dir, andcfg.data_dirviastd::path::absolutebeforespawn_maincleanly keepstitle_dir,LateDlls,G:/T:mounts,shaderscache,storage/saves, andcrashes.logimmune to titleSetCurrentDirectorycalls, without requiring directories to pre-exist (and preserving UNC paths).VICTORY_CAPTUREincrates/victory-gpu/src/capture.rsandVICTORY_XMA_DUMPincrates/victory-hle/src/modules/audio.rs) still resolve relative paths against the live CWD if not anchored at startup.launch_pathsis gated#[cfg(windows)]whilepub fn runis un-gated, which is fine today (therunmodule itself is Windows-only) and only worth keeping aligned if cross-platform builds (e.g. #2670) compile it.@Marvisak on GitHub · 2026-11-25 22:16 UTC · original
Automated triage for the maintainers.
This PR no longer merges cleanly into
main(f3578e3):apps/victory/src/run.rsconflicts with changes that landed onmain. It will be reviewed once it is rebased.Generated by Claude Code
63bcca4while preserving launch paths be908d79b1@jaschinski97-ops on GitHub · 2026-11-26 15:35 UTC · original
Updated to current main
63bcca43in headbe908d79b1fbf076b109188c9f59823947495744. The conflict is resolved by keeping the new early low-memory guards beforelaunch_paths(Config::load()). All 19 app tests and strict all-target/all-feature Clippy pass locally; new Windows MSVC CI is running. The earlier needs-rebase triage is addressed. Thank you for the independent path/CWD verification. No new GPU tests or game files.Pull request closed