mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-13 14:16:46 +00:00
New repository lint catches `Path.read_text(...)` and `Path.read_bytes(...)` calls inside `tests/lint/` test code, which bypass the LRU-cached `utils.cache.files.read_text` and re-read the same project files for every test that scans them. Routing through the cache shares one decoded read per file across the whole pytest session. Per-line opt-out: `# noqa: cache-read` for genuinely out-of-cache reads (tempdirs, synthetic fixtures, files outside the project tree). Documented in docs/contributing/actions/testing/suppression.md alongside the existing `project-walk` marker. All 16 pre-existing violations in 9 lint tests retrofitted onto the cached helper — no opt-out markers used; every site was a legitimate project-tree read. UnicodeDecodeError added to existing OSError except clauses where applicable (the cache helper is UTF-8 strict, replacing the lenient `errors="replace"` of the raw call). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Test guidance 🧪
This directory contains contributor guidance for automated tests. Its scope is how lint, unit, integration, regression, and Playwright coverage should be structured, selected, and validated.