diff --git a/inference_engine/bridge/manifest.py b/inference_engine/bridge/manifest.py index 8a27bbb..b88e8cb 100644 --- a/inference_engine/bridge/manifest.py +++ b/inference_engine/bridge/manifest.py @@ -798,6 +798,20 @@ def _harness_preset( params={"max_new_tokens": ("int:max_new_tokens", "64")}, validate_reports=True, # §4 liveness gate on-device ), + Preset( + name="mlx-kakeya-launcher-dryrun-bash32", + description="Guard the launcher against the macOS bash-3.2 " + "'unbound variable' bug: run scripts/run_kakeya_mac.sh " + "--dry-run under /bin/bash (Apple's frozen bash 3.2) with " + "NO pass-through args, so the empty EXTRA array is expanded " + "under set -u. Must exit 0 and print the command (pre-fix it " + "died with 'EXTRA[@]: unbound variable'). Fast; no model load.", + command_templates=( + ("/bin/bash", "scripts/run_kakeya_mac.sh", "--dry-run"), + ), + timeout_minutes=10, + validate_reports=False, + ), Preset( name="mlx-kakeya-degen-probe", description="Long-decode regression probe: full f_θ fused engine on a " diff --git a/scripts/run_kakeya_mac.sh b/scripts/run_kakeya_mac.sh index 4bf3308..57dc34e 100755 --- a/scripts/run_kakeya_mac.sh +++ b/scripts/run_kakeya_mac.sh @@ -80,7 +80,11 @@ log "drafter : $DRAFTER" log "f_theta : $FTHETA" log "params : sink=$SINK window=$WINDOW block=$BLOCK max_new=$MAX_NEW" -cmd=( python3 scripts/research/k3_integrated_niah_eval_mac.py "${args[@]}" "${EXTRA[@]}" ) +# NOTE: ``${EXTRA[@]+"${EXTRA[@]}"}`` (not a bare ``"${EXTRA[@]}"``) — under +# ``set -u`` macOS's default bash 3.2 treats expanding an EMPTY array as an +# "unbound variable" error; the ``+`` form expands to nothing when EXTRA is +# empty and to the quoted elements otherwise. +cmd=( python3 scripts/research/k3_integrated_niah_eval_mac.py "${args[@]}" ${EXTRA[@]+"${EXTRA[@]}"} ) if [[ "$DRY_RUN" == "1" ]]; then echo "PYTHONPATH=.:sdks/python ${cmd[*]}" diff --git a/tests/inference_engine/bridge/test_manifest.py b/tests/inference_engine/bridge/test_manifest.py index 090f189..c42cd6b 100644 --- a/tests/inference_engine/bridge/test_manifest.py +++ b/tests/inference_engine/bridge/test_manifest.py @@ -85,6 +85,7 @@ def test_allowlist_contains_exactly_the_documented_presets(): "mlx-kakeya-degen-probe", "mlx-kakeya-fused-chat-ftheta", "mlx-kakeya-fused-chat-smoke", + "mlx-kakeya-launcher-dryrun-bash32", "mlx-kakeya-launcher-smoke", "mlx-multitenant-pressure", "mlx-upgrade",