[GH-ISSUE #5390] [0.1.57] macOS model preparation fails: metal/tools missing from CONTROL-mode tool whitelist, and metal/setup_mac.py not shipped in the terminal bundle #3216

Closed
opened 2026-11-07 14:38:56 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @cwf75 on GitHub (Nov 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5390

[0.1.57] macOS model preparation fails: metal/tools missing from CONTROL-mode tool whitelist, and metal/setup_mac.py not shipped in the terminal bundle

Environment

  • macOS on Apple Silicon
  • Strata Terminal / Control component 0.1.57 (installed from the signed feed)
  • Model: any Unsloth multi-shard GGUF set (here: unsloth/Qwen3.8-Flash-Next-GGUF, variant UD-IQ4_XS-v31)

Summary

Preparing a model on macOS (Step 6, repacking the Unsloth shards into a single GPU GGUF with metal/tools/metal_repack.py) fails in 0.1.57 in both execution modes, for two related reasons. metal/ appears to have been added to the shipped bundle in 0.1.57, but two code paths were not updated for it.

Bug 1 — CONTROL mode: run() rejects metal/tools

strata launch / the desktop app runs setup with STRATA_CONTROL_INSTALL=1. The in-file flow reaches Step 6 and calls:

python3 <ROOT>/metal/tools/metal_repack.py --shard1 ... --out ... --verify

but the guard in run() (setup.py, around line 1130) only allows tools whose parent directory is ROOT/tools or ROOT/tools/dsv41:

if CONTROL:
    argv = [str(c) for c in cmd]
    if len(argv) < 2 or os.path.normcase(argv[0]) != os.path.normcase(sys.executable) or argv[1] == "-m" or \
            Path(argv[1]).resolve().parent not in ((ROOT / "tools").resolve(), (ROOT / "tools" / "dsv41").resolve()):
        raise acquisition.AcquisitionRefused("the desktop app's installer only runs its bundled preparation tools; "
                                             + " ".join(argv[:2]))

metal_repack.py lives in ROOT/metal/tools, so the guard raises:

the desktop app's installer only runs its bundled preparation tools;
.../metal/tools/metal_repack.py is missing or out of date.

The message is misleading: the file exists and is current — it is the whitelist that doesn't know about metal/tools.

Fix: include (ROOT / "metal" / "tools").resolve() in the allowed parents.

Bug 2 — non-CONTROL mode: metal/setup_mac.py is not in the bundle

Running setup.py directly (no STRATA_CONTROL_INSTALL) on macOS takes the mac_setup() path (setup.py, around line 8167), which delegates everything to metal/setup_mac.py:

def mac_setup(argv) -> int:
    return subprocess.call([sys.executable, str(ROOT / "metal" / "setup_mac.py"), *argv])

but the shipped 0.1.57 terminal bundle (and components/control/0.1.57) contains only metal/tools/ — there is no metal/setup_mac.py, so this fails instantly with:

can't open file '.../terminal/0.1.57/metal/setup_mac.py': [Errno 2] No such file or directory

(The same "run it from a full checkout" assumption that sycl_setup() states explicitly seems to apply here, but for macOS there is no such hint, and the error message points the user at ./setup.sh / ./update.sh / strata install, none of which restore the file.)

Steps to reproduce

  1. On a Mac, install Strata Terminal 0.1.57 and an Unsloth multi-shard model (download and SHA-256 checks all pass).
  2. Launch the model (strata launch or from the app).
  3. Step 6 ("preparing the model for Strata") fails with the AcquisitionRefused message above.
  4. Running the same setup.py manually fails earlier, on the missing metal/setup_mac.py.

Local workaround that got me running

Patch the run() guard in setup.py to also allow (ROOT / "metal" / "tools").resolve(), then run setup with STRATA_CONTROL_INSTALL=1. The repack (--verify, all 1223 tensors hashed against the shards), the experts streaming copy, the MTP draft layer and the run script all completed successfully afterwards.

Suggested fixes

  1. Add metal/tools to the CONTROL-mode whitelist (one line).
  2. Either ship metal/setup_mac.py in the terminal/control bundles, or make mac_setup() fall back to the in-file flow (or print a clear "use a full checkout" message like the SYCL path does).
  3. Optionally reword the AcquisitionRefused message — "missing or out of date" sent me checking file integrity when the file was fine.
Originally created by @cwf75 on GitHub (Nov 6, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5390 # [0.1.57] macOS model preparation fails: `metal/tools` missing from CONTROL-mode tool whitelist, and `metal/setup_mac.py` not shipped in the terminal bundle ## Environment - macOS on Apple Silicon - Strata Terminal / Control component **0.1.57** (installed from the signed feed) - Model: any Unsloth multi-shard GGUF set (here: `unsloth/Qwen3.8-Flash-Next-GGUF`, variant `UD-IQ4_XS-v31`) ## Summary Preparing a model on macOS (Step 6, repacking the Unsloth shards into a single GPU GGUF with `metal/tools/metal_repack.py`) fails in 0.1.57 in **both** execution modes, for two related reasons. `metal/` appears to have been added to the shipped bundle in 0.1.57, but two code paths were not updated for it. ## Bug 1 — CONTROL mode: `run()` rejects `metal/tools` `strata launch` / the desktop app runs setup with `STRATA_CONTROL_INSTALL=1`. The in-file flow reaches Step 6 and calls: ``` python3 <ROOT>/metal/tools/metal_repack.py --shard1 ... --out ... --verify ``` but the guard in `run()` (setup.py, around line 1130) only allows tools whose parent directory is `ROOT/tools` or `ROOT/tools/dsv41`: ```python if CONTROL: argv = [str(c) for c in cmd] if len(argv) < 2 or os.path.normcase(argv[0]) != os.path.normcase(sys.executable) or argv[1] == "-m" or \ Path(argv[1]).resolve().parent not in ((ROOT / "tools").resolve(), (ROOT / "tools" / "dsv41").resolve()): raise acquisition.AcquisitionRefused("the desktop app's installer only runs its bundled preparation tools; " + " ".join(argv[:2])) ``` `metal_repack.py` lives in `ROOT/metal/tools`, so the guard raises: ``` the desktop app's installer only runs its bundled preparation tools; .../metal/tools/metal_repack.py is missing or out of date. ``` The message is misleading: the file exists and is current — it is the whitelist that doesn't know about `metal/tools`. **Fix:** include `(ROOT / "metal" / "tools").resolve()` in the allowed parents. ## Bug 2 — non-CONTROL mode: `metal/setup_mac.py` is not in the bundle Running `setup.py` directly (no `STRATA_CONTROL_INSTALL`) on macOS takes the `mac_setup()` path (setup.py, around line 8167), which delegates everything to `metal/setup_mac.py`: ```python def mac_setup(argv) -> int: return subprocess.call([sys.executable, str(ROOT / "metal" / "setup_mac.py"), *argv]) ``` but the shipped 0.1.57 terminal bundle (and `components/control/0.1.57`) contains only `metal/tools/` — there is no `metal/setup_mac.py`, so this fails instantly with: ``` can't open file '.../terminal/0.1.57/metal/setup_mac.py': [Errno 2] No such file or directory ``` (The same "run it from a full checkout" assumption that `sycl_setup()` states explicitly seems to apply here, but for macOS there is no such hint, and the error message points the user at `./setup.sh` / `./update.sh` / `strata install`, none of which restore the file.) ## Steps to reproduce 1. On a Mac, install Strata Terminal 0.1.57 and an Unsloth multi-shard model (download and SHA-256 checks all pass). 2. Launch the model (`strata launch` or from the app). 3. Step 6 ("preparing the model for Strata") fails with the AcquisitionRefused message above. 4. Running the same `setup.py` manually fails earlier, on the missing `metal/setup_mac.py`. ## Local workaround that got me running Patch the `run()` guard in `setup.py` to also allow `(ROOT / "metal" / "tools").resolve()`, then run setup with `STRATA_CONTROL_INSTALL=1`. The repack (`--verify`, all 1223 tensors hashed against the shards), the experts streaming copy, the MTP draft layer and the run script all completed successfully afterwards. ## Suggested fixes 1. Add `metal/tools` to the CONTROL-mode whitelist (one line). 2. Either ship `metal/setup_mac.py` in the terminal/control bundles, or make `mac_setup()` fall back to the in-file flow (or print a clear "use a full checkout" message like the SYCL path does). 3. Optionally reword the AcquisitionRefused message — "missing or out of date" sent me checking file integrity when the file was fine.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 6, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6680994437 --> @github-actions[bot] commented on GitHub (Nov 6, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@axitdn commented on GitHub (Nov 6, 2026):

Same error: The desktop app's installer only runs its bundled preparation tools; /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/metal/tools/metal_repack.py is missing or out of date. Starting and serving never install or download anything. Run: ./setup.sh (first-time setup), ./update.sh (update) or strata install

<!-- gh-comment-id:6690105542 --> @axitdn commented on GitHub (Nov 6, 2026): Same error: The desktop app's installer only runs its bundled preparation tools; /Applications/Strata.app/Contents/Resources/control/python/bin/python3.12 /Applications/Strata.app/Contents/Resources/control/metal/tools/metal_repack.py is missing or out of date. Starting and serving never install or download anything. Run: ./setup.sh (first-time setup), ./update.sh (update) or `strata install`
Author
Owner

@Niko1221 commented on GitHub (Nov 7, 2026):

Fixed: on a Mac, a fresh install of UD-Q4_K_XL or UD-IQ4_XS-v31 from the app or the Terminal stopped at "Preparing your model". The installer now runs the bundled Mac preparation tools in metal/tools (146df3c46). On an M5 Max, a fresh Terminal install of UD-Q4_K_XL prepared the model, fetched the drafter and answered plain, two-turn and tool chats. Thanks for the report, cwf75.

Released in Strata v0.2.12: https://github.com/Niko1221/Strata/releases/tag/v0.2.12

<!-- gh-comment-id:6704755231 --> @Niko1221 commented on GitHub (Nov 7, 2026): Fixed: on a Mac, a fresh install of UD-Q4_K_XL or UD-IQ4_XS-v31 from the app or the Terminal stopped at "Preparing your model". The installer now runs the bundled Mac preparation tools in `metal/tools` (146df3c46). On an M5 Max, a fresh Terminal install of UD-Q4_K_XL prepared the model, fetched the drafter and answered plain, two-turn and tool chats. Thanks for the report, cwf75. Released in Strata v0.2.12: https://github.com/Niko1221/Strata/releases/tag/v0.2.12
Sign in to join this conversation.
No milestone
No project
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.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3216
No description provided.