Skip to content

Accept installer reboot code, deterministic mod moves, and robust Steam/VDF/Proton parsing with tests#7

Merged
astrovm merged 1 commit intomainfrom
codex/add-edge-case-tests-to-codebase
Mar 26, 2026
Merged

Accept installer reboot code, deterministic mod moves, and robust Steam/VDF/Proton parsing with tests#7
astrovm merged 1 commit intomainfrom
codex/add-edge-case-tests-to-codebase

Conversation

@astrovm
Copy link
Copy Markdown
Owner

@astrovm astrovm commented Mar 26, 2026

Motivation

  • Treat installer exit code 3010 (reboot required) as a successful install when provisioning runtimes.
  • Make mod installation deterministic and safe when moving extracted files over existing targets.
  • Harden Steam library detection and VDF parsing to handle whitespace-only paths and UTF-8 BOMs, and refine executable detection per game kind.
  • Improve Proton directory parsing and selection logic to handle additional real-world name variants and prefer Proton installations that actually contain Wine binaries.

Description

  • Added is_success_or_reboot_code helper and updated runtime installer logic to accept exit codes 0 and 3010 as success for both VC++ and .NET installers in src/external/runtime_installer.rs, plus unit tests for the helper.
  • Made find_mod_root deterministic by sorting directory entries before checking for mod.ini and added remove_path and logic in move_dir_contents to remove existing targets before moving, in src/setup/common.rs, plus tests for deterministic selection and overwriting behavior.
  • Enhanced Proton parsing tests in src/external/proton.rs to accept names like Proton 9, Proton 9.0 (Beta), Proton 8.0-4, and added a test to ensure directories without wine binaries are ignored when selecting Proton.
  • Hardened Steam library handling in src/steam/library.rs to skip library paths that are empty/whitespace-only, restrict sonic.exe fallback to SADX only, and added tests for whitespace paths and symlinked library de-duplication (Unix-only).
  • Updated VDF parser in src/steam/vdf.rs to strip a leading UTF-8 BOM before parsing and added a unit test for BOM handling.
  • Minor test formatting cleanups and added/expanded unit tests across modules to cover the above changes.

Testing

  • Ran the test suite with cargo test; all tests completed successfully.
  • New/updated unit tests exercised the changes, including test_is_success_or_reboot_code, Proton parsing tests, test_find_mod_root_prefers_deterministic_order, test_move_dir_contents_overwrites_existing_file, Steam library tests for whitespace and symlink dedupe, and test_parse_with_utf8_bom, and all passed.

Codex Task

@astrovm astrovm merged commit 68b82c4 into main Mar 26, 2026
@astrovm astrovm deleted the codex/add-edge-case-tests-to-codebase branch March 26, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant