Run browser tests locally: Playwright 1.64.1 in .venv, scripts switch to it on their own

The browser tests and screenshot tools now work with plain python3 on a machine whose
system Python refuses pip installs: tools/use_venv.py re-runs them with the repo's .venv.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 16:50:15 -04:00
co-authored by Claude Opus 5.5
parent b270c4e818
commit ce7df82b01
12 changed files with 60 additions and 4 deletions
+19
View File
@@ -4,6 +4,25 @@ What agents have done, newest first. Add an entry for every piece of work: the d
note or request it was for, what changed, the files touched, the tests run, and anything left
open or not verified. Keep each entry short; the git history has the details.
## 2026-10-23: browser tests run locally (Claude Code, with Codex)
Request: get the browser tests, Playwright and Chromium working on the owner's Arch machine
(Python 3.14 refuses a system-wide pip install).
- Playwright 1.64.1 and its Chromium 156 (revision 1248) are in an in-repo `.venv/` made with uv.
- Added `tools/use_venv.py` and called it before Playwright imports in `tools/shot.py`,
`tools/perf.py`, `tools/playthrough.py`, `test/play.py` and `test/t_smooth.py`.
The `sys.prefix` guard prevents an exec loop if the venv lacks Playwright.
- Updated `requirements.txt`, `.gitignore`, `README.md`, `AGENTS.md`, `docs/TESTING.md`
and `docs/PROJECT_MAP.md` for Playwright 1.64.1 and venv setup.
- Checks: regenerated the project map and ran `tools/map.py --check`.
- Tests run with plain `python3`: `test/run_all.py --browser` all passed (11 headless suites,
`play.py` 101 checks, `t_smooth.py` 8 checks) on the newer Chromium; `tools/shot.py` shots
of the stone-uses scene look right in both looks. With `.venv` moved away, `play.py` exits
with the setup message instead of a traceback.
- Open: nothing.
## 2026-10-23: export from claude.ai to a local repository (Claude, in claude.ai)
Request: split the source into small files, deduplicate and tidy a little, test fully, and