diff --git a/bin/test_python_floor.py b/bin/test_python_floor.py index 240d16f4..081b5a4b 100644 --- a/bin/test_python_floor.py +++ b/bin/test_python_floor.py @@ -1,3 +1,4 @@ +import os import pathlib import re import subprocess @@ -5,14 +6,18 @@ import unittest ROOT = pathlib.Path(__file__).resolve().parents[1] FLOOR = re.compile(r"Python (3\.\d+) or newer") +ON_FLOOR = "PYTHON_FLOOR_RUN" class PythonFloor(unittest.TestCase): - def test_every_bin_file_compiles_on_the_python_the_readme_names_as_floor(self): + def test_the_suite_passes_on_the_python_the_readme_names_as_floor(self): + if os.environ.get(ON_FLOOR): + self.skipTest("already running on the floor interpreter") named = FLOOR.search((ROOT / "README.md").read_text(encoding="utf-8")) self.assertIsNotNone(named, "README.md's Install names `Python 3.N or newer`") - tracked = subprocess.run(["git", "ls-files", "-z", "bin"], capture_output=True, check=True, cwd=ROOT, text=True).stdout.split("\0") - self.assertTrue(tracked[0]) - check = "import sys\nfor path in sys.argv[1:]:\n\tcompile(open(path, 'rb').read(), path, 'exec')" - compiled = subprocess.run(["uv", "run", "--no-project", "--python", named.group(1), "python", "-c", check, *filter(None, tracked)], capture_output=True, cwd=ROOT, text=True) - self.assertEqual(compiled.returncode, 0, compiled.stderr) + suite = ["python", "-m", "unittest", "discover", "-s", "bin", "-p", "test_*.py"] + try: + ran = subprocess.run(["uv", "run", "--no-project", "--python", named.group(1), *suite], capture_output=True, cwd=ROOT, env={**os.environ, ON_FLOOR: "1"}, text=True) + except FileNotFoundError: + self.fail("uv on PATH fetches the floor interpreter; see README.md's Test line") + self.assertEqual(ran.returncode, 0, ran.stderr) diff --git a/principles/README.md b/principles/README.md deleted file mode 100644 index 194b7ab2..00000000 --- a/principles/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Principles - -The technical principles the reviewer agents in `../agents/` hold every project to. - -Each applies them through its own lens: -- `../agents/stability-reviewer.md` — enforces them at code level, per PR. -- `../agents/systems-architect.md` — treats them as baseline constraints on every design. -- `../agents/product-owner-reviewer.md` — checks the externally-visible ones (`rest-apis.md`, `frontend.md`, and what surfaces from `technical-principles.md`) from the customer's perspective.