"""A model file under a name setup does not write (renamed, a hand-written config, no name) is judged by what the file IS: its GGUF header (architecture, layers, hidden size, vocabulary size) against what the DFlash2 drafter pack records. A renamed Qwen3.8-Flash-Next file used to start the MTP with no word said (strata_control/drafting.py, apply).""" from __future__ import annotations import json import struct import tempfile import unittest from pathlib import Path from unittest import mock from strata_control import drafting ROOT = Path(__file__).resolve().parents[2] REAL_HEADER = ROOT / "tests" / "terminal" / "data" / "flash_next_iq3s_header.gguf" # the first 2,710 bytes of the Qwen3.8-Flash-Next IQ3_S file: the keys, no weights _HARDWARE = mock.patch.object(drafting, "detect_hardware", return_value=("cuda", ["sm_120"])) def setUpModule(): _HARDWARE.start() def tearDownModule(): _HARDWARE.stop() def _s(text: str) -> bytes: raw = text.encode() return struct.pack("