fix: find MicrosoftGame.config whatever the case of its name (Linux) #237

Manually merged
github merged 1 commit from gh-pr/237/head into gh-pr/237/base 2026-11-26 05:39:19 +00:00
Owner

@⁠lcg007xd-c on GitHub · 2026-11-25 20:44 UTC · original
lcg007xd-c:fix/manifest-name-case → main · +43 −5 · 3 files · 1 commits · merged 2026-11-25 21:07 UTC

Change

read_package() (emu/config.py) and the two package-folder probes of scarlett.py only looked for MicrosoftGame.Config. Microsoft Learn and the GDK name the file MicrosoftGame.config (lower-case c). Windows ignores the difference; a case-sensitive file system (Linux, the Proton path of #228) does not, so a real package folder was refused there with Erreur : Le dossier choisi ne contient pas MicrosoftGame.Config.

Evidence on main (4f2cf5c), Linux, Python 3.14: two existing tests whose fixtures write MicrosoftGame.config fail for exactly this reason:

FAILED tests/test_jour_j.py::test_native_report_inventories_only_psos_from_the_current_run
FAILED tests/test_jour_j.py::test_missing_executable_is_reported
  AssertionError: assert 'absent.exe' in 'Erreur : Le dossier choisi ne contient pas MicrosoftGame.Config.\n'

Now emu.config.manifest_path(folder) returns the exact name if present, else the first file of the folder whose lowered name is microsoftgame.config (a directory with that name is not taken). read_package() and scarlett.py (App.__init__, find_package_folder) use it. Nothing changes on Windows.

Linked issue: none.

Verification

Linux (Arch, Python 3.14.10, no C++ runtime, no GPU — the runtime and GPU tests skip):

python -m pytest                → 4 failed, 1014 passed, 315 skipped
python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools → All checks passed!

The 4 remaining failures are in tests/test_rdna2_exec_fma.py and are unrelated (NaN quieting on Python 3.14, fixed separately). Before this change the same run had 6 failures: the two test_jour_j.py tests above now pass.

Not run: the Windows CI job (C++ runtime, Rust, WARP); no C++ or Rust is touched.

Oracle and test data

  • New tests in tests/test_config.py: the manifest is found as MicrosoftGame.config and microsoftgame.CONFIG, the exact name wins when both exist, and a directory named like the manifest is still refused. They fail without the change (on Linux; on Windows the first one passes either way since NTFS ignores case).
  • Test data is built in the tests.

Checklist

  • The PR covers a single reviewable behaviour.
  • A test fails without this change and passes with it.
  • The commands and results of each check are given above.
  • An unimplemented function returns an error (E_NOTIMPL), never a fake success.
  • README: the same change in all 9 languages (test_readme_sync.py checks it). (No README change; the suite still counts 1300+.)
  • No game, console or SDK file, no key, no dump, no download link.
  • Findings drawn from a title: none.
  • Code taken from another project: none.

Made with AI assistance (Claude Code).

🤖 Generated with Claude Code

**@⁠lcg007xd-c** on GitHub · 2026-11-25 20:44 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/237) `lcg007xd-c:fix/manifest-name-case` → `main` · +43 −5 · 3 files · 1 commits · merged 2026-11-25 21:07 UTC ## Change `read_package()` (`emu/config.py`) and the two package-folder probes of `scarlett.py` only looked for `MicrosoftGame.Config`. Microsoft Learn and the GDK name the file **`MicrosoftGame.config`** (lower-case `c`). Windows ignores the difference; a case-sensitive file system (Linux, the Proton path of #228) does not, so a real package folder was refused there with `Erreur : Le dossier choisi ne contient pas MicrosoftGame.Config.` Evidence on `main` (`4f2cf5c`), Linux, Python 3.14: two existing tests whose fixtures write `MicrosoftGame.config` fail for exactly this reason: ``` FAILED tests/test_jour_j.py::test_native_report_inventories_only_psos_from_the_current_run FAILED tests/test_jour_j.py::test_missing_executable_is_reported AssertionError: assert 'absent.exe' in 'Erreur : Le dossier choisi ne contient pas MicrosoftGame.Config.\n' ``` Now `emu.config.manifest_path(folder)` returns the exact name if present, else the first file of the folder whose lowered name is `microsoftgame.config` (a directory with that name is not taken). `read_package()` and `scarlett.py` (`App.__init__`, `find_package_folder`) use it. Nothing changes on Windows. Linked issue: none. ## Verification Linux (Arch, Python 3.14.10, no C++ runtime, no GPU — the runtime and GPU tests skip): ``` python -m pytest → 4 failed, 1014 passed, 315 skipped python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools → All checks passed! ``` The 4 remaining failures are in `tests/test_rdna2_exec_fma.py` and are unrelated (NaN quieting on Python 3.14, fixed separately). Before this change the same run had 6 failures: the two `test_jour_j.py` tests above now pass. Not run: the Windows CI job (C++ runtime, Rust, WARP); no C++ or Rust is touched. ## Oracle and test data - New tests in `tests/test_config.py`: the manifest is found as `MicrosoftGame.config` and `microsoftgame.CONFIG`, the exact name wins when both exist, and a directory named like the manifest is still refused. They fail without the change (on Linux; on Windows the first one passes either way since NTFS ignores case). - Test data is built in the tests. ## Checklist - [x] The PR covers a single reviewable behaviour. - [x] A test fails without this change and passes with it. - [x] The commands and results of each check are given above. - [x] An unimplemented function returns an error (`E_NOTIMPL`), never a fake success. - [x] README: the same change in all 9 languages (`test_readme_sync.py` checks it). (No README change; the suite still counts `1300+`.) - [x] No game, console or SDK file, no key, no dump, no download link. - [x] Findings drawn from a title: none. - [x] Code taken from another project: none. Made with AI assistance (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
read_package() and scarlett.py looked only for "MicrosoftGame.Config".
Microsoft Learn and the GDK name the file "MicrosoftGame.config"; Windows
ignores the difference, a case-sensitive file system (Linux, Proton) does
not, so a real package folder was refused there ("Le dossier choisi ne
contient pas MicrosoftGame.Config."). That is also why
test_jour_j.py::test_missing_executable_is_reported and
test_native_report_inventories_only_psos_from_the_current_run fail on
Linux: their fixtures write "MicrosoftGame.config".

manifest_path() keeps the exact name first, then takes the first file of
the folder whose lowered name matches; read_package() and the two folder
probes of scarlett.py use it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:39:17 +00:00
github manually merged commit 4e4c7b24ce into gh-pr/237/base 2026-11-26 05:39:19 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.