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

Merged
OlaiFG7 merged 2 commits from upstream-pr/979 into main 2026-12-01 15:14:10 +00:00
OlaiFG7 commented 2026-11-24 16:10:56 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OlaiFG7 on 2026-11-24T16:10:56Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5475888031 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/979). Originally posted by [OlaiFG7](https://github.com/OlaiFG7) on 2026-11-24T16:10:56Z. --- 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 commented 2026-12-01 12:00:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T12:00:50Z.

Review: COMMENTED


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.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6130854056 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/979#pullrequestreview-6130854056). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T12:00:50Z. **Review:** COMMENTED --- 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 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T12:19:05Z.


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.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7310959443 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/979#issuecomment-7310959443). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T12:19:05Z. --- 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 commented 2026-12-01 13:03:08 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T13:03:08Z.

Review: APPROVED


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.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6131781982 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/979#pullrequestreview-6131781982). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T13:03:08Z. **Review:** APPROVED --- 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 reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!979
No description provided.