cli: forward and display title_args in victory run #1031

Closed
Pradhyumna51 wants to merge 1 commit from upstream-pr/1031 into main
Pradhyumna51 commented 2026-11-24 15:13:07 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Pradhyumna51 on 2026-11-24T15:13:07Z.


Summary

victory run defines title_args after -- in Clap, but discarded it with title_args: _ in main().

This change wires the CLI plumbing:

  • Parses title arguments after -- into itle_args.
  • Forwards title_args into
    un::run() and prints them in the launch banner when present.
  • Updates the non-Windows
    un() fallback signature.
  • Adds unit tests in pps/victory verifying that arguments after -- parse correctly.

Guest delivery via GetCommandLine or PEB hooks is outside the scope of this PR and left for follow-up work.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6584999198 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1031). Originally posted by [Pradhyumna51](https://github.com/Pradhyumna51) on 2026-11-24T15:13:07Z. --- ### Summary victory run defines title_args after -- in Clap, but discarded it with title_args: _ in main(). This change wires the CLI plumbing: * Parses title arguments after -- into itle_args. * Forwards title_args into un::run() and prints them in the launch banner when present. * Updates the non-Windows un() fallback signature. * Adds unit tests in pps/victory verifying that arguments after -- parse correctly. Guest delivery via GetCommandLine or PEB hooks is outside the scope of this PR and left for follow-up work.
DoubleD17 commented 2026-11-24 16:04:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DoubleD17 on 2026-11-24T15:28:38Z.

Review: COMMENTED


I tested 19b4cc4 against ffe310e on Windows with a minimal synthetic x64 PE. Both revisions mapped and bound the PE without --execute. With -- --review-flag "with spaces", the PR printed the new title args line. The base and a PR run without arguments omitted that line. Both CLI parsing tests also passed.

The scope is worth clarifying in the PR description. title_args reaches run(), where it is used to print the banner. The guest launch still calls spawn_main(dlls) unchanged. If delivering the arguments to the guest is part of this change, could you add a guest-side check for that separately? The test above stops before guest execution. Banner code · Guest launch

AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:review:6042213726 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1031#pullrequestreview-6042213726). Originally posted by [DoubleD17](https://github.com/DoubleD17) on 2026-11-24T15:28:38Z. **Review:** COMMENTED --- I tested `19b4cc4` against `ffe310e` on Windows with a minimal synthetic x64 PE. Both revisions mapped and bound the PE without `--execute`. With `-- --review-flag "with spaces"`, the PR printed the new `title args` line. The base and a PR run without arguments omitted that line. Both CLI parsing tests also passed. The scope is worth clarifying in the PR description. `title_args` reaches `run()`, where it is used to print the banner. The guest launch still calls `spawn_main(dlls)` unchanged. If delivering the arguments to the guest is part of this change, could you add a guest-side check for that separately? The test above stops before guest execution. [Banner code](https://github.com/Marvisak/VIctory/blob/19b4cc43cc841ffdcdda0e6859a72e2aadefc055/apps/victory/src/run.rs#L69-L71) · [Guest launch](https://github.com/Marvisak/VIctory/blob/19b4cc43cc841ffdcdda0e6859a72e2aadefc055/apps/victory/src/run.rs#L124) AI-assisted.
Pradhyumna51 commented 2026-11-24 16:05:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Pradhyumna51 on 2026-11-24T15:39:28Z.


Thanks for testing on Windows.

This change is just the CLI wiring and banner output. Passing arguments to the guest process via GetCommandLine or PEB patching requires loader changes, so I left that for a separate PR.

I updated the PR description to clarify the scope.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7136394313 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1031#issuecomment-7136394313). Originally posted by [Pradhyumna51](https://github.com/Pradhyumna51) on 2026-11-24T15:39:28Z. --- Thanks for testing on Windows. This change is just the CLI wiring and banner output. Passing arguments to the guest process via GetCommandLine or PEB patching requires loader changes, so I left that for a separate PR. I updated the PR description to clarify the scope.
Zipettte commented 2026-11-24 16:05:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T15:40:08Z.


Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 19b4cc4: cargo test -p victory passes, 3 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7136412316 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1031#issuecomment-7136412316). Originally posted by [Zipettte](https://github.com/Zipettte) on 2026-11-24T15:40:08Z. --- Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 19b4cc4: `cargo test -p victory` passes, 3 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
upstream-sync closed this pull request 2026-11-25 01:05:20 +00:00
Marvisak commented 2026-11-25 01:07:57 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:30:40Z.


Automated triage for the maintainers. Closing because another open pull request covers the same change.

See #513. Same as #513 (prints title_args, which the title already reads from the process command line) plus two tests of clap's own parsing.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148583390 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1031#issuecomment-7148583390). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:30:40Z. --- Automated triage for the maintainers. Closing because another open pull request covers the same change. See #513. Same as #513 (prints `title_args`, which the title already reads from the process command line) plus two tests of clap's own parsing. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!1031
No description provided.