fix(menu,victory): prevent headless restart stdin deadlocks and clear stale restart exit code #407
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: launcher
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
run report
security: hold
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs gpu test
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/Androtim--MiniVI!407
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-407"
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?
@Androtim on GitHub · 2026-12-03 19:20 UTC · original
Androtim:fix/silent-restart-headless-safety→main· +76 −14 · 2 files · 3 commits · merged 2026-12-03 19:50 UTCFollow-up to #406 addressing both the
[P0]and[P1]issues identified in the Gate 2 audit:Summary
[P0]Prevent invisible stdin deadlocks on headlessCREATE_NO_WINDOWrestarts:interactive_console()(backed by pure testableis_interactive_console+GetConsoleWindow()on Windows) inapps/victory/src/play.rsand replaced all rawstd::io::stdin().is_terminal()prompt gates (offer_dlss,offer_fsr,offer_mfg,check_shader_model,hold_window). Interactive prompts are now skipped whenVICTORY_NO_CONSOLE=1, whenGetConsoleWindow()is null (such as aCREATE_NO_WINDOWwindowless console whoseCONIN$still reportsis_terminal() == true), or when stdin is not a terminal.restart_command_lineincrates/victory-gpu/src/host/menu.rsto pass-NonInteractivetopowershell.exeand pipe$null | & '{play}' {args}so child processes receive closed/EOF stdin instead ofCONIN$.[P1]Clear staleVICTORY_RESTART_EXIT_CODEacross self-spawned PowerShell restarts:Remove-Item Env:VICTORY_RESTART_EXIT_CODE -ErrorAction SilentlyContinue;in both console and headless branches ofrestart_command_lineso that after apreload == trueself-restart (where the original parent launcher saw exit code0and stopped supervising), subsequent restarts in the child session self-relaunch instead of exiting with the stale code into an unsupervised PowerShell host.Verification
cargo test -p victory-gpu --lib host::menu— 8 passedcargo test -p victory— 49 unit + 2 integration passedcargo clippy --workspace --all-targets -- -D warnings— cleancargo xtask policy—asset policy: 354 files okgithub-bot referenced this pull request2026-12-03 19:35:47 +00:00
@Androtim on GitHub · 2026-12-03 19:32 UTC · original
Read-only full diff audit (
4cd20c2d,apps/victory/src/play.rs+crates/victory-gpu/src/host/menu.rs, 100% title-neutral): VERIFIED CLEAN (0 P0/P1). Properly closes both#406Gate 2 findings (interactive_console()viaGetConsoleWindow()+VICTORY_NO_CONSOLE=1,-NonInteractive+$null | &stdin EOF, and clearingVICTORY_RESTART_EXIT_CODEon self-spawned PowerShell restarts) with zero GPU/shader surface touched. Queued for immediate squash-merge as soon as CIcheckcompletes green.