diff --git a/.gitignore b/.gitignore
index 055dfa7..b2b09c9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,3 +29,4 @@ benchmarks/history/*.md
 /.venv_mac
 /scratch
 /benchmarks
+.pytest_build_cache/
diff --git a/src/mcp_stata/server.py b/src/mcp_stata/server.py
index 1e11bcd..dc5e5ec 100644
--- a/src/mcp_stata/server.py
+++ b/src/mcp_stata/server.py
@@ -2657,6 +2657,16 @@ def main():
         print(SERVER_VERSION)
         return
 
+    # CLI introspection must not bootstrap Stata sessions (slow; breaks packaging smoke tests).
+    if "-h" in sys.argv or "--help" in sys.argv:
+        import argparse
+
+        parser = argparse.ArgumentParser(
+            prog="mcp-stata",
+            description="Model Context Protocol server for Stata.",
+        )
+        parser.parse_args()  # prints help and raises SystemExit on --help / -h
+
     # Fix for macOS environments where sys.executable might be a shim that calls 'realpath'.
     # On some macOS versions (pre-Monterey) or minimal environments, 'realpath' is missing,
     # causing shims (like those from uv or pyenv) to fail.
diff --git a/tests/benchmark_tests.sh b/tests/benchmark_tests.sh
old mode 100644
new mode 100755
index 881c53c..96b108e
--- a/tests/benchmark_tests.sh
+++ b/tests/benchmark_tests.sh
@@ -1,6 +1,114 @@
 #!/bin/bash
+
+# ─────────────────────────────────────────────
+#  Colors & symbols
+# ─────────────────────────────────────────────
+BOLD='\033[1m'
+DIM='\033[2m'
+CYAN='\033[0;36m'
+GREEN='\033[0;32m'
+YELLOW='\033[1;33m'
+RED='\033[0;31m'
+BLUE='\033[0;34m'
+MAGENTA='\033[0;35m'
+RESET='\033[0m'
+
+PASS="✔"
+FAIL="✘"
+RUN="▶"
+CLOCK="⏱"
+FILE="📄"
+
+# ─────────────────────────────────────────────
+#  Setup
+# ─────────────────────────────────────────────
 TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
-OUTFILE="benchmarks/test_suite/bench_${TIMESTAMP}.txt"
-mkdir -p benchmarks/test_suite
-time uv run pytest --no-cov --durations=0 > "$OUTFILE" 2>&1 && tail -n 20 "$OUTFILE"
-echo "Full output: $OUTFILE"
\ No newline at end of file
+OUTDIR="benchmarks/test_suite"
+OUTFILE="${OUTDIR}/bench_${TIMESTAMP}.txt"
+mkdir -p "$OUTDIR"
+
+print_header() {
+  echo
+  echo -e "${BOLD}${CYAN}╔══════════════════════════════════════════╗${RESET}"
+  echo -e "${BOLD}${CYAN}║         BENCHMARK TEST RUNNER            ║${RESET}"
+  echo -e "${BOLD}${CYAN}╚══════════════════════════════════════════╝${RESET}"
+  echo -e "  ${DIM}Started : $(date '+%Y-%m-%d %H:%M:%S')${RESET}"
+  echo -e "  ${DIM}Output  : ${OUTFILE}${RESET}"
+  echo
+}
+
+print_divider() {
+  echo -e "${DIM}  ──────────────────────────────────────────${RESET}"
+}
+
+# ─────────────────────────────────────────────
+#  Live tail — filters & colorizes pytest output
+# ─────────────────────────────────────────────
+live_tail() {
+  tail -f "$1" | while IFS= read -r line; do
+    if   [[ "$line" =~ PASSED  ]]; then echo -e "  ${GREEN}${PASS} ${line}${RESET}"
+    elif [[ "$line" =~ FAILED  ]]; then echo -e "  ${RED}${FAIL} ${line}${RESET}"
+    elif [[ "$line" =~ ERROR   ]]; then echo -e "  ${RED}${FAIL} ${line}${RESET}"
+    elif [[ "$line" =~ WARNING ]]; then echo -e "  ${YELLOW}⚠ ${line}${RESET}"
+    elif [[ "$line" =~ ^ERRORS|^=.*=$ ]]; then echo -e "  ${BOLD}${line}${RESET}"
+    elif [[ "$line" =~ slowest ]]; then echo -e "  ${MAGENTA}${line}${RESET}"
+    elif [[ "$line" =~ ^[0-9]+\.[0-9]+s ]]; then echo -e "  ${BLUE}${CLOCK} ${line}${RESET}"
+    else echo -e "  ${DIM}${line}${RESET}"
+    fi
+  done
+}
+
+# ─────────────────────────────────────────────
+#  Run
+# ─────────────────────────────────────────────
+print_header
+echo -e "  ${BOLD}${RUN} Running pytest...${RESET}"
+print_divider
+echo
+
+# Start live tail in background, store PID
+live_tail "$OUTFILE" &
+TAIL_PID=$!
+
+# Run tests; capture start time
+START=$(date +%s)
+uv run pytest --no-cov --durations=0 > "$OUTFILE" 2>&1
+EXIT_CODE=$?
+END=$(date +%s)
+ELAPSED=$((END - START))
+
+# Give tail a moment to flush, then stop it
+sleep 0.3
+kill "$TAIL_PID" 2>/dev/null
+wait "$TAIL_PID" 2>/dev/null
+
+# ─────────────────────────────────────────────
+#  Summary
+# ─────────────────────────────────────────────
+echo
+print_divider
+
+# Parse counts from output
+PASSED=$(grep -oP '\d+(?= passed)'  "$OUTFILE" | tail -1)
+FAILED=$(grep -oP '\d+(?= failed)'  "$OUTFILE" | tail -1)
+ERRORS=$(grep -oP '\d+(?= error)'   "$OUTFILE" | tail -1)
+SKIPPED=$(grep -oP '\d+(?= skipped)' "$OUTFILE" | tail -1)
+
+echo -e "\n  ${BOLD}Summary${RESET}"
+[[ -n "$PASSED"  ]] && echo -e "  ${GREEN}${PASS}  Passed  : ${PASSED}${RESET}"
+[[ -n "$FAILED"  ]] && echo -e "  ${RED}${FAIL}  Failed  : ${FAILED}${RESET}"
+[[ -n "$ERRORS"  ]] && echo -e "  ${RED}${FAIL}  Errors  : ${ERRORS}${RESET}"
+[[ -n "$SKIPPED" ]] && echo -e "  ${YELLOW}⊘  Skipped : ${SKIPPED}${RESET}"
+echo -e "  ${BLUE}${CLOCK}  Elapsed : ${ELAPSED}s${RESET}"
+
+echo
+if [[ $EXIT_CODE -eq 0 ]]; then
+  echo -e "  ${BOLD}${GREEN}${PASS} All tests passed.${RESET}"
+else
+  echo -e "  ${BOLD}${RED}${FAIL} Test run failed (exit ${EXIT_CODE}).${RESET}"
+fi
+
+print_divider
+echo -e "\n  ${FILE} Full output: ${BOLD}${OUTFILE}${RESET}\n"
+
+exit $EXIT_CODE
\ No newline at end of file
diff --git a/tests/conftest.py b/tests/conftest.py
index 9c42c5a..66c8d57 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,12 +1,20 @@
 import os
 import sys
+from pathlib import Path
 from unittest.mock import MagicMock
 import pytest
 
+_TESTS_ROOT = Path(__file__).resolve().parent
+if str(_TESTS_ROOT) not in sys.path:
+    sys.path.insert(0, str(_TESTS_ROOT))
+
 # Snapshot capture is best-effort in tests; keep timeout low so mocked sessions
 # that do not reply to history RPCs do not slow the suite.
 os.environ.setdefault("MCP_STATA_HISTORY_SNAPSHOT_TIMEOUT", "0.2")
 
+# Less filesystem churn when subprocesses import repeatedly (installer/bash wrappers).
+os.environ.setdefault("PYTHONDONTWRITEBYTECODE", "1")
+
 # Mock Stata dependencies ONLY if they're not already available
 # This allows tests that need real Stata to use it, while providing mocks for unit tests
 def _setup_stata_mocks_if_needed():
@@ -175,13 +183,6 @@ def pytest_collection_modifyitems(config, items):
                 stable_hash = sum(ord(c) for c in module_path)
                 group_idx = stable_hash % 4
                 item.add_marker(pytest.mark.xdist_group(name=f"stata_group_{group_idx}"))
-            
-            # 3. Group build integration tests into 2 subgroups
-            elif "tests/execution/test_build_integration.py" in nodeid:
-                module_path = nodeid.split("::")[0]
-                stable_hash = sum(ord(c) for c in module_path)
-                group_idx = stable_hash % 2
-                item.add_marker(pytest.mark.xdist_group(name=f"build_group_{group_idx}"))
 
     force_mock = os.environ.get("MCP_STATA_MOCK") == "1"
     
diff --git a/tests/execution/cancellation/test_cancellation_robustness.py b/tests/execution/cancellation/test_cancellation_robustness.py
index 817495b..faa5e9e 100644
--- a/tests/execution/cancellation/test_cancellation_robustness.py
+++ b/tests/execution/cancellation/test_cancellation_robustness.py
@@ -46,7 +46,7 @@ async def test_break_session_tool_logic():
         # Start a long run (loop is better than sleep for testing interrupts)
         task = asyncio.create_task(session.call("run_command", {"code": "forvalues i=1/1000000 { \n di `i' \n }", "options": {"echo": True}}))
         
-        await asyncio.sleep(0.5)
+        await asyncio.sleep(0.2)
         
         start_time = asyncio.get_running_loop().time()
         # Send break out-of-band
diff --git a/tests/execution/test_build_integration.py b/tests/execution/test_build_integration.py
index 8ece105..6a62673 100644
--- a/tests/execution/test_build_integration.py
+++ b/tests/execution/test_build_integration.py
@@ -7,16 +7,24 @@ Optimizations:
 - Batched import testing in single subprocess
 """
 
+import hashlib
+import os
 import subprocess
 import sys
+from contextlib import contextmanager
 from pathlib import Path
 
 import pytest
 
+pytestmark = pytest.mark.xdist_group(name="mcp_stata_build_integration")
+
 
 def run(cmd, *, cwd=None, check=True, env=None):
     """Run command and return result. Fails with full output on error."""
-    result = subprocess.run(cmd, cwd=cwd, capture_output=True, text=True, encoding="utf-8", env=env)
+    merged = os.environ.copy() if env is None else dict(env)
+    merged.setdefault("MCP_STATA_SKIP_PREFLIGHT", "1")
+
+    result = subprocess.run(cmd, cwd=cwd, capture_output=True, text=True, encoding="utf-8", env=merged)
     if check and result.returncode != 0:
         pytest.fail(
             f"Command failed: {' '.join(map(str, cmd))}\n"
@@ -31,6 +39,50 @@ def run(cmd, *, cwd=None, check=True, env=None):
 # =============================================================================
 
 
+def _packaging_tree_fingerprint(project_root: Path) -> str:
+    """Hash inputs that affect the built wheel so cache invalidates on real changes."""
+    hasher = hashlib.sha256()
+    key_files = [
+        project_root / "pyproject.toml",
+        project_root / "Cargo.toml",
+        project_root / "Cargo.lock",
+    ]
+    for path in key_files:
+        hasher.update(path.name.encode())
+        if path.exists():
+            hasher.update(path.read_bytes())
+
+    pkg_root = project_root / "src" / "mcp_stata"
+    if pkg_root.is_dir():
+        for path in sorted(pkg_root.rglob("*.py")):
+            rel = path.relative_to(project_root)
+            hasher.update(str(rel).encode())
+            hasher.update(path.read_bytes())
+
+    src_root = project_root / "src"
+    if src_root.is_dir():
+        for path in sorted(src_root.rglob("*.rs")):
+            rel = path.relative_to(project_root)
+            hasher.update(str(rel).encode())
+            hasher.update(path.read_bytes())
+
+    return hasher.hexdigest()
+
+
+@contextmanager
+def _pytest_build_cache_lock(lock_path: Path):
+    lock_path.parent.mkdir(parents=True, exist_ok=True)
+    try:
+        import fcntl
+    except ImportError:
+        yield
+        return
+
+    with open(lock_path, "a+", encoding="utf-8") as lock_fh:
+        fcntl.flock(lock_fh.fileno(), fcntl.LOCK_EX)
+        yield
+
+
 @pytest.fixture(scope="session")
 def project_root():
     """Return the project root directory."""
@@ -38,14 +90,22 @@ def project_root():
 
 
 @pytest.fixture(scope="session")
-def built_package(tmp_path_factory, project_root):
+def built_package(project_root):
     """Build wheel and sdist once per test session."""
-    build_dir = tmp_path_factory.mktemp("build")
-
-    run(["uv", "build", "--out-dir", str(build_dir)], cwd=project_root)
-
-    wheel_files = list(build_dir.glob("*.whl"))
-    sdist_files = list(build_dir.glob("*.tar.gz"))
+    digest = _packaging_tree_fingerprint(project_root)
+    cache_root = project_root / ".pytest_build_cache"
+    cache_root.mkdir(parents=True, exist_ok=True)
+    build_dir = cache_root / digest
+    lock_path = cache_root / ".build.lock"
+
+    with _pytest_build_cache_lock(lock_path):
+        wheel_files = list(build_dir.glob("*.whl"))
+        sdist_files = list(build_dir.glob("*.tar.gz"))
+        if not wheel_files or not sdist_files:
+            build_dir.mkdir(parents=True, exist_ok=True)
+            run(["uv", "build", "--out-dir", str(build_dir)], cwd=project_root)
+            wheel_files = list(build_dir.glob("*.whl"))
+            sdist_files = list(build_dir.glob("*.tar.gz"))
 
     if not wheel_files:
         pytest.fail(f"No wheel created. Found: {list(build_dir.glob('*'))}")
@@ -75,6 +135,9 @@ def installed_venv(tmp_path_factory, built_package):
 
     run(["uv", "pip", "install", "--python", str(python), str(built_package["wheel"])])
 
+    # Prime imports once here so per-test subprocess timings reflect steady state.
+    run([str(python), "-c", "from mcp_stata.server import main"])
+
     return {
         "venv_path": venv_path,
         "python": python,
diff --git a/tests/installer/test_install_bootstrap.py b/tests/installer/test_install_bootstrap.py
index f55be85..18a33da 100644
--- a/tests/installer/test_install_bootstrap.py
+++ b/tests/installer/test_install_bootstrap.py
@@ -6,6 +6,8 @@ from pathlib import Path
 from types import SimpleNamespace
 import pytest
 
+from install_sh_harness import make_executable
+
 INSTALL_SH = Path(__file__).resolve().parents[2] / "plugin" / "install.sh"
 
 @pytest.fixture
@@ -14,19 +16,21 @@ def test_env(tmp_path):
     home.mkdir()
     bin_dir = home / "bin"
     bin_dir.mkdir()
-    
-    # Mock uv
-    uv_path = bin_dir / "uv"
-    uv_path.write_text("#!/usr/bin/env bash\n"
-                       "if [[ \"$*\" == *\"--version\"* ]]; then echo \"uv 0.1.0\"; exit 0; fi\n"
-                       "echo \"UV RUN: $@\"\n"
-                       "exit 0")
-    uv_path.chmod(0o755)
+
+    # Echo-only uv: install.sh resolves INSTALL_REPO_ROOT to the real checkout, so a
+    # delegating stub would run the real setup_toolkit.py instead of tmp fixtures.
+    make_executable(
+        bin_dir / "uv",
+        "#!/usr/bin/env bash\n"
+        'if [[ "$*" == *"--version"* ]]; then echo "uv 0.1.0"; exit 0; fi\n'
+        'echo "UV RUN: $*"\n'
+        "exit 0\n",
+    )
     
     # Mock curl for telemetry and source download
     telemetry_log = tmp_path / "telemetry.log"
     curl_path = bin_dir / "curl"
-    curl_path.write_text(textwrap.dedent(f"""\
+    curl_script = textwrap.dedent(f"""\
         #!/usr/bin/env bash
         # Capture telemetry
         if [[ "$*" == *"-d"* ]]; then
@@ -45,14 +49,15 @@ def test_env(tmp_path):
             exit 0
         fi
         exit 0
-    """))
-    curl_path.chmod(0o755)
+    """)
+    make_executable(curl_path, curl_script)
     
     env = os.environ.copy()
     env["HOME"] = str(home)
-    env["PATH"] = f"{bin_dir}:/usr/bin:/bin"
+    env["PATH"] = f"{bin_dir}:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
     env["MCP_STATA_TELEMETRY_ENABLED"] = "1"
     env["MCP_STATA_DRY_RUN"] = "1"
+    env.setdefault("PYTHONDONTWRITEBYTECODE", "1")
     
     return SimpleNamespace(home=home, telemetry_log=telemetry_log, env=env)
 
@@ -105,7 +110,7 @@ def test_install_sh_failure_telemetry(test_env):
     
     # Make uv run fail
     uv_path = Path(test_env.env["PATH"].split(":")[0]) / "uv"
-    uv_path.write_text("#!/usr/bin/env bash\nexit 1")
+    make_executable(uv_path, "#!/usr/bin/env bash\nexit 1\n")
     
     result = subprocess.run(
         ["/bin/bash", str(INSTALL_SH), "--dry-run"],
diff --git a/tests/installer/test_install_sh_unit.py b/tests/installer/test_install_sh_unit.py
index 091182f..993ce1d 100644
--- a/tests/installer/test_install_sh_unit.py
+++ b/tests/installer/test_install_sh_unit.py
@@ -12,7 +12,6 @@ from __future__ import annotations
 import json
 import os
 import shutil
-import stat
 import subprocess
 import sys
 import textwrap
@@ -20,6 +19,8 @@ from pathlib import Path
 
 import pytest
 
+from install_sh_harness import install_curl_noop_stub, install_uv_run_stub, make_executable
+
 INSTALL_SH = Path(__file__).resolve().parents[2] / "plugin" / "install.sh"
 pytestmark = pytest.mark.skipif(
     not INSTALL_SH.exists(),
@@ -31,13 +32,6 @@ pytestmark = pytest.mark.skipif(
 # Helpers
 # ---------------------------------------------------------------------------
 
-def _make_executable(path: Path, content: str) -> Path:
-    path.parent.mkdir(parents=True, exist_ok=True)
-    path.write_text(content)
-    path.chmod(path.stat().st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
-    return path
-
-
 def _run(
     args: list[str],
     *,
@@ -46,17 +40,16 @@ def _run(
     check: bool = False,
 ) -> subprocess.CompletedProcess:
     """Run install.sh with an isolated HOME and optional extra env vars."""
-    import shutil
     bin_dir = home / "bin"
     bin_dir.mkdir(parents=True, exist_ok=True)
-    # Symlink system uv/uvx to avoid network downloads in install.sh
-    for tool in ["uv", "uvx"]:
-        tool_path = bin_dir / tool
-        if not tool_path.exists():
-            system_tool = shutil.which(tool)
-            if system_tool:
-                tool_path.write_text(f'#!/bin/bash\nexec "{system_tool}" "$@"\n')
-                tool_path.chmod(tool_path.stat().st_mode | 0o755)
+    install_curl_noop_stub(bin_dir)
+    install_uv_run_stub(bin_dir)
+    tool_path = bin_dir / "uvx"
+    if not tool_path.exists():
+        system_uvx = shutil.which("uvx")
+        if system_uvx:
+            tool_path.write_text(f'#!/bin/bash\nexec "{system_uvx}" "$@"\n')
+            tool_path.chmod(tool_path.stat().st_mode | 0o755)
 
     env = os.environ.copy()
     env["HOME"] = str(home)
@@ -64,6 +57,8 @@ def _run(
     # while keeping essential system binaries and our uv wrapper.
     env["PATH"] = f"{bin_dir}:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
     env["MCP_STATA_PROJECT_ROOT"] = str(home / "project")
+    env.setdefault("MCP_STATA_TELEMETRY_ENABLED", "0")
+    env.setdefault("PYTHONDONTWRITEBYTECODE", "1")
     # Prefer the current Python for uv to avoid redundant downloads
     env["UV_PYTHON"] = sys.executable
     env.pop("STATA_PATH", None)  # ensure clean slate
@@ -88,7 +83,7 @@ def _stub_uvx(bin_dir: Path, stata_path: str = "") -> None:
         fi
         exit 0
     """)
-    _make_executable(bin_dir / "uvx", content)
+    make_executable(bin_dir / "uvx", content)
 
 
 def _stub_uvx_with_stata(bin_dir: Path, stata_path: Path) -> None:
@@ -101,7 +96,7 @@ def _stub_uvx_with_stata(bin_dir: Path, stata_path: Path) -> None:
         fi
         exit 0
     """).replace("tmp_be", "be")
-    _make_executable(bin_dir / "uvx", content)
+    make_executable(bin_dir / "uvx", content)
 
 
 def _stub_agent_cli(bin_dir: Path, name: str, *, succeeds: bool = True) -> None:
@@ -111,13 +106,13 @@ def _stub_agent_cli(bin_dir: Path, name: str, *, succeeds: bool = True) -> None:
         #!/usr/bin/env bash
         exit {exit_code}
     """)
-    _make_executable(bin_dir / name, content)
+    make_executable(bin_dir / name, content)
 
 
 def _fake_stata(tmp_path: Path) -> Path:
     """Create a minimal fake Stata executable."""
     p = tmp_path / "fake-stata" / "stata-mp"
-    _make_executable(p, "#!/usr/bin/env bash\nexit 0\n")
+    make_executable(p, "#!/usr/bin/env bash\nexit 0\n")
     return p
 
 
diff --git a/tests/installer/test_installer_telemetry_e2e.py b/tests/installer/test_installer_telemetry_e2e.py
index 3663698..d6e78c7 100644
--- a/tests/installer/test_installer_telemetry_e2e.py
+++ b/tests/installer/test_installer_telemetry_e2e.py
@@ -17,13 +17,14 @@ from __future__ import annotations
 
 import json
 import os
-import stat
 import subprocess
 import textwrap
 from pathlib import Path
 
 import pytest
 
+from install_sh_harness import make_executable
+
 INSTALL_SH = Path(__file__).resolve().parents[2] / "plugin" / "install.sh"
 
 # This URL must match the literal string the installer uses for the uv
@@ -32,13 +33,6 @@ INSTALL_SH = Path(__file__).resolve().parents[2] / "plugin" / "install.sh"
 ASTRAL_UV_INSTALLER_URL = "https://astral.sh/uv/install.sh"
 
 
-def _make_executable(path: Path, content: str) -> Path:
-    path.parent.mkdir(parents=True, exist_ok=True)
-    path.write_text(content)
-    path.chmod(path.stat().st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
-    return path
-
-
 def _curl_stub(telemetry_log: Path, *, fail_uv_install: bool) -> str:
     """Return a bash script that:
 
@@ -111,16 +105,19 @@ def _run_install(
     bin_dir = home / "bin"
     bin_dir.mkdir(parents=True, exist_ok=True)
 
-    _make_executable(bin_dir / "curl", _curl_stub(telemetry_log, fail_uv_install=fail_uv_install))
+    make_executable(bin_dir / "curl", _curl_stub(telemetry_log, fail_uv_install=fail_uv_install))
     if stub_uv_on_path:
-        _make_executable(bin_dir / "uv", "#!/usr/bin/env bash\necho 'uv 0.1.0'\nexit 0\n")
-    _make_executable(bin_dir / "uvx", "#!/usr/bin/env bash\nexit 0\n")
+        make_executable(bin_dir / "uv", "#!/usr/bin/env bash\necho 'uv 0.1.0'\nexit 0\n")
+    make_executable(bin_dir / "uvx", "#!/usr/bin/env bash\nexit 0\n")
 
     env = os.environ.copy()
     env["HOME"] = str(home)
     env["PATH"] = str(bin_dir) + ":/usr/bin:/bin:/usr/sbin:/sbin"
     env["MCP_STATA_PROJECT_ROOT"] = str(home / "project")
     env["MCP_STATA_TELEMETRY_ENABLED"] = "1"
+    env.setdefault("MCP_STATA_TELEMETRY_RETRIES", "1")
+    env.setdefault("MCP_STATA_TELEMETRY_TIMEOUT_SECS", "1")
+    env.setdefault("PYTHONDONTWRITEBYTECODE", "1")
 
     return subprocess.run(
         ["/bin/bash", str(INSTALL_SH), *args],
@@ -269,8 +266,8 @@ def test_install_failure_log_tail_size_respects_byte_cap(tmp_path: Path) -> None
     env_extra = {"MCP_STATA_LOG_TAIL_BYTES": "512"}
     bin_dir = home / "bin"
     bin_dir.mkdir(parents=True, exist_ok=True)
-    _make_executable(bin_dir / "curl", _curl_stub(telemetry_log, fail_uv_install=True))
-    _make_executable(bin_dir / "uvx", "#!/usr/bin/env bash\nexit 0\n")
+    make_executable(bin_dir / "curl", _curl_stub(telemetry_log, fail_uv_install=True))
+    make_executable(bin_dir / "uvx", "#!/usr/bin/env bash\nexit 0\n")
 
     env = os.environ.copy()
     env.update(env_extra)
@@ -278,6 +275,9 @@ def test_install_failure_log_tail_size_respects_byte_cap(tmp_path: Path) -> None
     env["PATH"] = str(bin_dir) + ":/usr/bin:/bin:/usr/sbin:/sbin"
     env["MCP_STATA_PROJECT_ROOT"] = str(home / "project")
     env["MCP_STATA_TELEMETRY_ENABLED"] = "1"
+    env.setdefault("MCP_STATA_TELEMETRY_RETRIES", "1")
+    env.setdefault("MCP_STATA_TELEMETRY_TIMEOUT_SECS", "1")
+    env.setdefault("PYTHONDONTWRITEBYTECODE", "1")
 
     result = subprocess.run(
         ["/bin/bash", str(INSTALL_SH), "--dry-run"],
