From 92d7705524d5be71989ed861aeac534cf436d271 Mon Sep 17 00:00:00 2001 From: Jer Miller Date: Fri, 17 Apr 2026 14:13:59 -0600 Subject: [PATCH] test: route pytest tmp to /var/tmp, drop fixed --basetemp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove --basetemp=/var/tmp/pytest-solstone from pyproject.toml addopts and add TMPDIR=/var/tmp to the Makefile instead. The --basetemp flag pinned every pytest run to one absolute path; pytest wipes that path on startup (documented behavior), so concurrent runs (two hop lodes, or a lode + local make ci) destroyed each other's tmp state mid-test. Symptom was mysterious vanishing-file errors and the need for manual `rm -rf /var/tmp/pytest-solstone` rituals. TMPDIR=/var/tmp gets tests onto disk (preserving the original intent of fb0bba28 — /tmp is tmpfs and filled RAM repeatedly) while pytest's default per-run isolation (/var/tmp/pytest-of-jer/pytest-N/) handles concurrency correctly. Co-Authored-By: Claude Opus 4.7 (1M context) --- Makefile | 6 ++++++ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c9fa2b187..df9d86fdc 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,12 @@ # solstone Makefile # Python-based AI-driven desktop journaling toolkit +# Route pytest tmp dirs to /var/tmp (disk) instead of default /tmp (tmpfs/RAM). +# Combined with pytest's default per-run isolation (/var/tmp/pytest-of-$USER/pytest-N/), +# concurrent test runs don't collide. Do not re-add --basetemp to pyproject — it pins +# all runs to one path and pytest wipes it on startup, destroying concurrent state. +export TMPDIR := /var/tmp + .PHONY: install uninstall test test-apps test-app test-only test-integration test-integration-only test-all format format-check ci clean clean-install coverage watch versions update update-prices pre-commit skills dev all sail upgrade sandbox sandbox-stop install-pinchtab verify-browser update-browser-baselines review verify-api update-api-baselines install-service uninstall-service service-logs gate-agents-rename # Default target - install package in editable mode diff --git a/pyproject.toml b/pyproject.toml index 09e099e1e..b8b4dcb3c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -134,7 +134,7 @@ constraint-dependencies = ["numba>=0.60"] override-dependencies = ["webrtcvad>=99; python_version < '0'"] [tool.pytest.ini_options] -addopts = "--import-mode=importlib --basetemp=/var/tmp/pytest-solstone" +addopts = "--import-mode=importlib" testpaths = ["tests", "apps"] python_files = ["test_*.py"] python_classes = ["Test*"] -- 2.51.2