mc_command: PATHEXT fallback for extensionless paths with spaces (OLD-9856) #979

Merged
leonida/mandy
OlaiFG7 merged 2 commits from carry/old-9856-mc-command-pathext into main 2026-12-01 15:14:10 +00:00

Pull request successfully merged and closed

OlaiFG7 commented 2026-11-24 16:10:56 +00:00

Claimed in the coordination issue as: OLD-9856 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7136904224)

What and why

Carries old-pr/9856 (draft #121) forward, rebased on main, keeping the original author's commits (lordon1a).

tools/mc_command.split_command: when a path with a directory part has no extension (C:\Program Files\LLVM\bin\llvm-mc) and shutil.which misses it (Python before 3.12 on Windows does not apply PATHEXT there), fall back to raw + PATHEXT on Windows so the path is not split at its spaces. Adds a mocked cross-platform test.

Tested

python -I tests/test_mc_command.py: 30 tests OK (7 skipped); python -m compileall -q make_game.py tools tests OK. Windows 11, CPU only.

GPUs tested: n/a

AI-assisted: yes (Claude Code carried the branch over)

Checklist

  • Based on current main and merges cleanly
  • One topic
  • No game data, keys or decryption
  • Not a translator rule

🤖 Generated with Claude Code

Claimed in the coordination issue as: OLD-9856 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7136904224) ### What and why Carries `old-pr/9856` (draft #121) forward, rebased on `main`, keeping the original author's commits (lordon1a). `tools/mc_command.split_command`: when a path with a directory part has no extension (`C:\Program Files\LLVM\bin\llvm-mc`) and `shutil.which` misses it (Python before 3.12 on Windows does not apply `PATHEXT` there), fall back to `raw + PATHEXT` on Windows so the path is not split at its spaces. Adds a mocked cross-platform test. ### Tested `python -I tests/test_mc_command.py`: 30 tests OK (7 skipped); `python -m compileall -q make_game.py tools tests` OK. Windows 11, CPU only. GPUs tested: n/a AI-assisted: yes (Claude Code carried the branch over) ### Checklist - [ ] Based on current `main` and merges cleanly - [x] One topic - [x] No game data, keys or decryption - [x] Not a translator rule 🤖 Generated with [Claude Code](https://claude.com/claude-code)
aslan2142 reviewed 2026-12-01 12:00:50 +00:00
aslan2142 left a comment
No description provided.
Draft review against current `main`: the Windows `PATHEXT` fallback for extensionless paths with spaces in `tools/mc_command.py:74-83` looks clean and clean-room verified, but CI is currently red on an older base and the PR is still Draft. Please merge/rebase current `main` and mark Ready for Review so CI runs green. *(AI-assisted review.)*
aslan2142 commented 2026-12-01 12:19:05 +00:00

Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review.

(AI-assisted triage.)

Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review. *(AI-assisted triage.)*
aslan2142 approved these changes 2026-12-01 13:03:08 +00:00
aslan2142 left a comment

Now ready for review and MERGEABLE. Clean-room verified: the Windows PATHEXT fallback for extensionless paths with spaces in tools/mc_command.py:74-83 and tests in tests/test_mc_command.py are clean and focused.

Approving — ready to merge once fresh CI runs green on current main (existing Nov 25 failures are stale).

(AI-assisted review.)

Now ready for review and `MERGEABLE`. Clean-room verified: the Windows `PATHEXT` fallback for extensionless paths with spaces in `tools/mc_command.py:74-83` and tests in `tests/test_mc_command.py` are clean and focused. Approving — ready to merge once fresh CI runs green on current `main` (existing Nov 25 failures are stale). *(AI-assisted review.)*
Sign in to join this conversation.
No description provided.