On Apple Silicon, uv can create the Studio venv from a cached x86_64
Python (for example when uv itself is an x86_64 build) even though the
shell reports arm64, so MAC_INTEL stays false. The venv then reports
x86_64 to wheel resolvers and, because the PyTorch CPU index ships no
macOS wheels for any architecture, the torch install fails with:
torch>=2.6.0,... has no wheels with a matching platform tag
(e.g. macosx_26_0_x86_64)
The existing arm64 guard only handled the Python 3.13.8 torch import
bug. Extend it to also detect a venv whose platform.machine() is x86_64
on an arm64 host and recreate it with uv's arch-explicit selector
cpython-<ver>-macos-aarch64-none. The two checks run sequentially with a
re-inspection between them, so a venv that is x86_64 and lands on 3.13.8
after the arm64 rebuild is still downgraded to 3.12. Both are skipped
when the user passed --python.
Adds an Apple Silicon venv rebuild section to
tests/sh/test_mac_intel_compat.sh.
Supersedes #5187; credit to Ramakrishna Bachu (@ramankrishna).