From 3250a13359347ac46f94df0a1010a313fe336d09 Mon Sep 17 00:00:00 2001 From: insuffer <237025162+insuffer@users.noreply.github.com> Date: Mon, 21 Sep 2026 12:20:10 +0000 Subject: [PATCH] fix: run ui-web page assembly on the project's pinned Python build-ui assembled the served page with a bare `python3`, which resolves to whatever interpreter is first on PATH. On a stock macOS that is 3.9, where Path.write_text(newline=...) does not exist, so the documented `make build-ui` recipe died with a TypeError at ui-web/build.py line 198 after the vite build had already succeeded. pyproject requires-python is >=3.12 and every other Makefile target already runs its Python through uv; build-ui was the one caller that bypassed the pinned interpreter. Run the script through `uv run --frozen --python $(PYTHON_VERSION)`, matching install.sh, which already documents why the page assembly takes its Python from uv. Verified: reproduced the TypeError with Python 3.9.13 (exit 1); with uv + Python 3.12.7 the exact command builds dist/index.html, the artifact is byte-identical to the pre-change output on 3.12 (sha256 a1068871929266cfe746b5f321eb7faed2158785c8b19d4984783099b4c23181), check-page.mjs and the other page gates pass, and the artifact carries zero CR bytes. ui-web/build.py itself is untouched: its newline="" write needs 3.10+, but that half of the fix sits under the ui-web freeze and stays for maintainers. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 000a238ce..61a4a9921 100644 --- a/Makefile +++ b/Makefile @@ -139,7 +139,7 @@ build-tui: build-ui: npm ci --prefix ui-web npm run --prefix ui-web build - python3 ui-web/build.py + uv run --frozen --python $(PYTHON_VERSION) python ui-web/build.py build-bridge: npm run build --prefix bridge