diff --git a/scripts/deploy-remote.sh b/scripts/deploy-remote.sh index 6133dde..f88fd67 100755 --- a/scripts/deploy-remote.sh +++ b/scripts/deploy-remote.sh @@ -1160,8 +1160,14 @@ deploy_llm_large() { return 1 fi if [[ -n "$spec" ]]; then - if [[ -z "$spec_dir" || ! -f "$spec_dir/model.safetensors" ]]; then - echo "ERROR: spec draft absent for FRANK_LARGE_SPEC=$spec: $spec_dir/model.safetensors" >&2 + # Both draft weight layouts are real: dflash ships a single + # model.safetensors, the Qwen3.5-9B MTP head ships sharded behind + # an index. Mirrors the serve script's gate (2026-10-01: the + # single-file check rejected the deployed mtp arm). + if [[ -z "$spec_dir" || ! -f "$spec_dir/config.json" ]] || + { [[ ! -f "$spec_dir/model.safetensors" ]] && + [[ ! -f "$spec_dir/model.safetensors.index.json" ]]; }; then + echo "ERROR: spec draft absent or partial for FRANK_LARGE_SPEC=$spec: $spec_dir" >&2 echo "frank-large: re-run scripts/download-frank-large-dflash.sh (or the Qwen3.5-9B fetch for mtp)" >&2 return 1 fi diff --git a/tests/frank_large_unit.bats b/tests/frank_large_unit.bats index 37d23b2..8e5a5e8 100755 --- a/tests/frank_large_unit.bats +++ b/tests/frank_large_unit.bats @@ -191,6 +191,9 @@ FETCH_MTPSRC="$REPO_ROOT/scripts/download-frank-large-qwen35.sh" grep -q 'FRANK_LARGE_IMAGE' "$REMOTE_DEPLOY" grep -q "podman images --format '{{.RepoDigests}}'" "$REMOTE_DEPLOY" grep -q 'FRANK_LARGE_MODEL_SHARDS' "$REMOTE_DEPLOY" + # The deployer's draft gate must accept the SHARDED MTP layout too — + # the 2026-10-01 first deploy died on exactly this single-file check. + grep -q 'spec_dir/model.safetensors.index.json' "$REMOTE_DEPLOY" grep -q 'FRANK_LARGE_SPEC=' "$REMOTE_DEPLOY" grep -q 'wait_port_free 7770' "$REMOTE_DEPLOY" grep -q 'MainPID --value frank-large.service' "$REMOTE_DEPLOY"