startup: read the literal data directory manifest #2862
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2870"
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 R0Y00/Xbox2Windows. Originally posted by louisdibiasi on 2026-11-26T15:10:38Z.
Change
When
-DataDircontains wildcard characters,run.ps1treats itsMicrosoftGame.configpath as a pattern. A synthetic directory nameddata [test]caused both PowerShell 5.1 and 7 to read the manifest in the siblingdata tdirectory. The resulting title ID and storage quota are passed to the runtime from the wrong manifest. If the intended manifest is absent, the sibling was still read.Use literal paths for both the existence check and the manifest read. This fixes the manifest lookup only; bracketed launcher workspace and log paths are separate limitations. #2867, #2820 and #2822 also touch this launcher or its test, so the later merge may need to reconcile those changes.
Verification
Windows, base
b505c32b, head682a6034:out\pe-env\Scripts\python.exe -B tests\startup_run_ps1_check.py— passed on Windows PowerShell 5.1 and PowerShell 7. Before the fix the new bracketed and missing-manifest cases failed on both shells, selecting the sibling's9999/99instead of the intended1234/42or no values. The ordinary path is a positive control.out\pe-env\Scripts\python.exe -B tests\startup_run_ps1_check.py --text-only— passed.out\pe-env\Scripts\python.exe -B tests\bidi_controls_check.py— passed.. .\tools\dev.ps1; cmake --build --preset pr; ctest --preset pr --no-tests=error— build passed; 36 passed and four min-LOD WARP tests skipped.dev.ps1reportedvswhere.exeunavailable on PATH; the configured build completed.git diff --check— passed.Evidence and follow-up
The regression creates both manifests and the debugger stub in a temporary source-built fixture; no title data is used. Runtime consumers of these environment values are in
src/startup_stubs/runtime_proxy.cpp. This does not establish title startup or hardware behavior.AI-assisted.
Checklist
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-26T20:56:13Z.
Review: COMMENTED
Using
-LiteralPathinstead of-Pathfixes the bracket-matching pitfall in PowerShell where[and]are glob characters. This prevents manifest parsing from silently failing (or worse, matching the wrong directory) when the data path contains special characters.The test harness mirrors this scenario well: a bracketed data directory, a decoy directory (
data t), and amanifest="bracket_missing"case to confirm the fix doesn't break when the config is absent.One small note: the decoy directory
data tonly exists formanifest.startswith("bracket"), so in thebracket_missingcase it won't be created. Consider whetherbracket_missingshould still create the decoy to ensure we don't accidentally pick up a config from the wrong path — though since the test expectsmanifest in ("normal", "bracket")for a populated manifest, this edge is already covered.No other concerns for this change.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T08:01:21Z.
Review: APPROVED
Reviewed
682a6034againstmain22107932. The launcher uses literal paths for both the existence check and the read. This prevents the manifest from a sibling matching the bracket pattern from supplying the runtime's title ID or storage quota.python -B tests/startup_run_ps1_check.pypassed with Windows PowerShell 5.1 and PowerShell 7, and the text-only check passed. In each shell I also ran the ordinary, bracketed and absent-manifest cases independently. RevertingTest-Path -LiteralPathfailed the absent-manifest control. RevertingGet-Content -LiteralPathfailed the bracketed-manifest control. These were source-built launcher stubs. Hosted Windows, Linux Python and gfx1013 checks passed.