# Seam: the frank-zealot llama.cpp root unit on dankclaw. # frank-zealot is the RTX 3090 endpoint; since 2026-10-07 it serves # HauhauCS's Qwen3.5-9B-Uncensored-HauhauCS-Aggressive (Q6_K, qwen35 hybrid: # 32 layers, 8 full-attention + 24 Gated DeltaNet, no MTP tensors in the file) # via the CUDA (sm_86) build of llama.cpp master: TWO 200,704-token # conversations (--ctx-size 401408 --parallel 2), exact f16 K + f16 V under # flash attention, the publisher's own BF16 vision projector, and MTP off — # the file carries no nextn/mtp tensors, so there is no in-file head to draft # with. Log verbosity 4 ships so the VRAM-fit forensics (KV layout, buffer # sizes, graph capture) land in the journal. # This seam runs the serve script against a stub engine and asserts on the # argv it actually execs, so what is pinned is the command the operator gets. load helpers UNIT="$REPO_ROOT/scripts/frank-zealot.service" SERVE="$REPO_ROOT/scripts/serve-frank-zealot.sh" ENV_FILE="$REPO_ROOT/scripts/frank-zealot.env" REMOTE_DEPLOY="$REPO_ROOT/scripts/deploy-remote.sh" ENV_LARGE="$REPO_ROOT/scripts/frank-dragoon.env" setup() { STAGE="$(mktemp -d)" RUNTIME_DIR="$STAGE/llama" MODEL_DIR="$STAGE/models" mkdir -p "$RUNTIME_DIR/bin" "$MODEL_DIR" cat > "$RUNTIME_DIR/bin/llama-server" <<'STUB' #!/usr/bin/env bash printf '%s\n' "$@" STUB chmod +x "$RUNTIME_DIR/bin/llama-server" "$RUNTIME_DIR/bin" 2>/dev/null || chmod +x "$RUNTIME_DIR/bin/llama-server" # The stub payload files carry the SAME basenames as the shipped env, so # the seam exercises the real paths, and a payload rename moves one file # (the env) instead of silently forking the test's filename constants. MODEL_STUB="$(basename "$(sed -nE 's/^MODEL_FILE=(.+)$/\1/p' "$ENV_FILE")")" MM_STUB="$(basename "$(sed -nE 's/^MMPROJ_FILE=(.+)$/\1/p' "$ENV_FILE")")" DRAFT_STUB="draft-assistant.gguf" touch "$MODEL_DIR/$MODEL_STUB" "$MODEL_DIR/$MM_STUB" "$MODEL_DIR/$DRAFT_STUB" } teardown() { rm -rf "$STAGE" } # serve_argv [env-file] — run the serve script and capture the engine's # argv, one token per line, in $output. serve_argv() { local envf="${1:-$STAGE/test.env}" cat > "$envf" < batch, so a retune that inverts the pair has # to fail here instead of at boot on a live endpoint. [ "$env_batch" -ge "$env_ubatch" ] # And an env that names neither flag still ships an explicit pair: the # serve script's fallbacks are written-down values, not blanks the engine # fills in silently. sed -i '/^BATCH_SIZE=/d;/^UBATCH_SIZE=/d' "$STAGE/test.env" run_stage [ "$status" -eq 0 ] argv_value --batch-size | grep -qE '^[0-9]+$' argv_value --ubatch-size | grep -qE '^[0-9]+$' } @test "speculation is off: no drafter flag reaches the argv" { # Frank, 2026-10-07: MTP is off because it CANNOT be on — the Q6_K file # carries no nextn/mtp tensors (verified from its tensor-name list), and # MTP is a property of the file, not of the flags. The flags move as a # set: SPEC_TYPE=none strips --spec-type, --spec-draft-n-max AND # --spec-draft-model together, so a no-spec boot cannot carry half a # spec pair (the ROCmFPX-era baseline arm segfaulted at load doing that). serve_argv [ "$status" -eq 0 ] ! grep -qxF -- '--spec-type' <<<"$output" ! grep -qxF -- '--spec-draft-n-max' <<<"$output" ! grep -qxF -- '--spec-draft-model' <<<"$output" grep -qE '^SPEC_TYPE=none$' "$ENV_FILE" } @test "naming a drafter ships the full MTP trio" { # The opt-back-in path (e.g. a future Qwen3.5 -mtp build): SPEC_TYPE + # SPEC_DRAFT_FILE must reach the engine as a complete set — a draft-mtp # flag without its model file boots a drafter against the main weights and # drafts nothing. serve_argv { echo 'SPEC_TYPE=draft-mtp' echo 'SPEC_DRAFT_N_MAX=3' echo "SPEC_DRAFT_FILE=$MODEL_DIR/$DRAFT_STUB" } >> "$STAGE/test.env" run_stage [ "$(argv_value --spec-type)" = "draft-mtp" ] [ "$(argv_value --spec-draft-n-max)" = "3" ] [ "$(argv_value --spec-draft-model)" = "$MODEL_DIR/$DRAFT_STUB" ] } @test "vision ships by default and MMPROJ_FILE empty opts out of the image path" { # Qwen3.5-9B is natively multimodal, but the Q6_K file carries no vision # tensors — the publisher's projector argument IS the vision capability: # no flag, no eyes. serve_argv [ "$status" -eq 0 ] [ "$(argv_value --mmproj)" = "$MODEL_DIR/$MM_STUB" ] # The documented opt-out must reach the engine as ABSENCE of the flag, # not as an argument pointing at an empty string. sed -i 's|^MMPROJ_FILE=.*|MMPROJ_FILE=|' "$STAGE/test.env" run env FRANK_ZEALOT_ENV_FILE="$STAGE/test.env" nvidia-modprobe=true bash "$SERVE" [ "$status" -eq 0 ] ! grep -qxF -- '--mmproj' <<<"$output" } @test "the fleet reasoning contract reaches the argv" { serve_argv [ "$status" -eq 0 ] # deepseek format = thinking lands in reasoning_content, the field the # harness reads on this endpoint; --jinja is what makes # chat_template_kwargs reach the template at all. [ "$(argv_value --reasoning-format)" = "deepseek" ] argv_value --jinja >/dev/null grep -qxF -- '--jinja' <<<"$output" } @test "the serve script refuses a missing runtime, GGUF or projector" { rm -f "$MODEL_DIR/$MM_STUB" serve_argv [ "$status" -ne 0 ] [[ "$output" == *"frank-zealot: missing"* ]] rm -f "$RUNTIME_DIR/bin/llama-server" serve_argv [ "$status" -ne 0 ] [[ "$output" == *"frank-zealot: missing"* ]] } @test "the deploy handler gates on binary, GGUF and projector, then MainPID-hardens health" { grep -q 'deploy_llm_zealot' "$REMOTE_DEPLOY" grep -q 'LLM_ZEALOT_RUNTIME' "$REMOTE_DEPLOY" grep -q 'LLM_ZEALOT_MODEL_FILE' "$REMOTE_DEPLOY" grep -q 'LLM_ZEALOT_MMPROJ' "$REMOTE_DEPLOY" grep -q 'relink_unit frank-zealot' "$REMOTE_DEPLOY" grep -q 'systemctl enable frank-zealot.service' "$REMOTE_DEPLOY" grep -q '127.0.0.1:7771/health' "$REMOTE_DEPLOY" grep -q 'frank-zealot.service has no MainPID' "$REMOTE_DEPLOY" } @test "the two endpoints keep separate ports and the large handler never pkills llama-server" { # frank-dragoon's sweeps must not take down frank-zealot, whose # process is llama-server on the SAME host. grep -q '^LISTEN_PORT=7771$' "$ENV_FILE" local large large="$(sed -n '/^deploy_llm_dragoon() {/,/^}/p' "$REMOTE_DEPLOY")" ! grep -q 'pkill -x llama-server' <<<"$large" }