Repository navigation
app, hle: resolve title folders for xtp run - #20
Conversation
|
Other open pull requests change the same files. Check that they do not do the same work, and agree with their authors on which lands first: the other one will then need a rebase.
This comment is kept up to date automatically and removed when the overlap ends. |
simnJS
left a comment
There was a problem hiding this comment.
Thanks @AliceWood, this is a clean, well-scoped change:
- path handling is careful (component filter plus canonicalize/prefix check);
- it reuses the existing manifest reader instead of adding a dependency;
- fixtures are synthetic;
- CI is green.
Before merge:
- Provenance. CONTRIBUTING allows AI-written code, but the contributor answers for every line, and the description says your personal review is "unconfirmed". Please confirm that you have reviewed the change and take responsibility for it. Please also restore the template's Provenance wording and its
AI assistance:line. - Silent fallback. When
MicrosoftGame.configlists executables but none qualifies (missing, not.exe, or outside the folder),pick_executablesilently falls back to the single top-level.exe(run.rs:62-71, whichfolder_falls_back_to_its_only_executableasserts). That can start the wrong program without a word. Please make it an error naming the manifest entries and why each was skipped, or at least print a warning. The "no executable found" message should mention the manifest entries too.
Non-blocking suggestions:
- Consider preferring
TargetDeviceFamily="Scarlett"entries before declaring ambiguity, since a package can list Series and Xbox One executables side by side. - Warn when
MicrosoftGame.configexists but cannot be read as UTF-8, instead of treating it as empty. - Please add a unit test in
xtp-hleruntime::testsfor the new parser paths:Namewith spaces around=;- single quotes;
>inside a quoted value;- entities;
ExecutableoutsideExecutableList.
- Doc nits:
runtime.rs:74("beside its executable");- the
runhelp text: folder mode also works without a manifest, andvalue_name = "EXE|FOLDER"would match the README; docs/dev/autopilot.md.
- FYI, no change needed here: in folder mode
relaunch_args(xgame.rs) finds no exe argument to replace, so a relaunch resolves the folder again. That's fine for a title that relaunches itself.
PR #19 touches different hunks of run.rs, main.rs and the README, so whichever lands second should need at most a trivial rebase.
|
@simnJS, could you take another look at The new CLI test exercises the warning through All 14 CLI tests and all three targeted runtime tests passed in Windows Sandbox. GitHub CI passed on |
|
Thanks @AliceWood. Item 2 is resolved:
Item 1 is still open. The description still says "Human review of the updated revision is pending", and your last comment says the personal sign-off is still pending. Please reply here, yourself, that you have reviewed this change and take responsibility for every line, and remove that line from the description. While you're editing it, please also restore the template's checklist wording (for example, the asset-policy line). That's the only thing blocking the merge, and no rebase is needed. Optional, non-blocking: print entry names with |
|
replying myself, looked at the code, seems ok |
simnJS
left a comment
There was a problem hiding this comment.
Thanks @AliceWood for the sign-off and the restored template. Both blocking items are resolved and CI is green. Approving and merging. The optional nits ({} instead of {:?} for entry names, a non-zero exit assertion in the CLI test, the Scarlett preference) can go in a follow-up.
What and why
Fixes #3. No PR dependencies.
xtp runnow accepts a package directory. It selects an existing executable fromMicrosoftGame.config, including a relative path in a subdirectory. If no manifest entry matches, it reports why each named entry was skipped and looks for a single top-level.exe. Multiple matches produce a sorted list, and an empty folder produces a diagnostic naming the folder. Passing an executable directly still works.Area
The
xtpCLI resolves the argument and keeps the package root mounted when the selected executable is nested.xtp-hlereads executable names with the existing manifest reader. The README, CLI help and contributor quick start document the folder argument. The tests reuse the workspace'stempfiledependency.Tests
cargo xtask pr-checkpasses on my machineThe comparison used unmodified
79fa391and PR commit9ede113. Each row ranxtp run <path>without--execute. The valid executable was built from XTP's ownhle-probefixture.cargo test --locked -p xtp -p xtp-hlepassed all 13 CLI tests, including five new ones. The HLE suite reported 150 passed, two ignored and one failure on each revision. The failing test wasmodules::xmem::tests::title_calls_succeed_under_open_heapson both. The separatecargo test --locked -p xtp-hle --lib runtime::tests::run passed both matched tests, including the manifest-reader regression test.cargo xtask pr-check --base origin/mainpassed formatting, both Clippy configurations, asset policy and conventions. The workspace test step stopped inxtp-gpuwith 189 passed, seven failed and seven ignored. A separatecargo test --workspace --lockedon unmodified upstream stopped in the same crate. The seven failing test names matched exactly across the two runs.GPU tests that failed on both revisions
Review update on
eb05f4eThe fallback now names every rejected manifest entry and its reason on stderr. An empty directory includes the same information in its error. Unreadable or invalid UTF-8 manifests produce a diagnostic. The CLI help and autopilot docs now show the folder form.
In Windows Sandbox, the same synthetic package bound its sole top-level executable on both the previous head and this revision. The previous head emitted no fallback warning. The new head identified all three rejected entries (a missing file, an out-of-package path, and a non-executable extension). The empty-folder variant reported all three reasons. A separate invalid UTF-8 case bound the fixture and emitted a read warning.
On this revision,
cargo test --locked -p xtppassed all 14 tests, including the new CLI warning check.cargo test --locked -p xtp-hle --lib runtime::tests::passed all three matched tests, including the parser test for quoting, entities and paths. The full PR check passed both Clippy configurations, formatting, conventions and policy. Its seven GPU test failures matched the unmodified upstream comparison above by name.Provenance
AI assistance: OpenAI Codex wrote and reviewed the code, tests and documentation, ran the comparisons and prepared this PR. Direct sources were issue #3, the review on PR #20, XTP's B14 plan, the contribution and asset policies, and XTP's CLI, manifest reader and synthetic fixture. Xcl's behavior was described second-hand in the issue and B14. Codex did not open xcl or AnyPS5 for this PR.
AliceWood personally reviewed
eb05f4e. Contributor's review commentChecklist
<area>: <summary>; one topic; under 400 changed lines, or the reason is above