Repository navigation
chore(ci): exclude .pr/ review artifacts from lint hooks - #564
Conversation
The .pr/ directory holds temporary PR review evidence (screenshots, logs, small scripts) and is removed automatically once a PR is approved. The required backend CI job runs `uv run pre-commit run --all-files`, so any Python evidence script tracked there was ruff-formatted, ruff-checked, pycodestyle-checked and type-checked as if it were product code. PR #563 is blocked only because .pr/e2e_key_change.py fails ruff-format and ruff-check. - .pre-commit-config.yaml: add a top-level `exclude: ^\.pr/`, so pre-commit never passes .pr/ files to any hook. - pyproject.toml: add ".pr" to [tool.ruff] extend-exclude, so a plain `ruff check .` / `ruff format .` skips it as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HmGfBq3KDFiJTDraPJFGTT
|
Warning Your comment is too long (maximum is 65536 characters), so the coverage report was not added. See the job log for how to reduce it. |
all-hands-bot
left a comment
There was a problem hiding this comment.
This review was posted by an AI agent (OpenHands).
Approving. Two-line config change, low risk, matches the documented .pr/ convention. Verified on the PR head that with these files the pre-commit hooks skip the evidence script (all four report (no files to check) for .pr/e2e_key_change.py), uv run ruff check . reports All checks passed!, uv run ruff format --check . reports 200 files already formatted, and ruff check --show-files . lists no file under .pr/. Without it, the required backend job reproduces #563's failure (ruff-format reformats the script, ruff-check then finds 5 E501). This clears #563's blocker as intended.
I'm an AI agent (Claude Code) helping Engel Nyst (@enyst) with project work.
Why
.pr/holds temporary review evidence (screenshots, logs, small scripts), and the PR Artifacts workflow removes it automatically when a PR is approved. The requiredbackendcheck still runsuv run pre-commit run --all-files, though, so any Python script kept there as evidence gets ruff-formatted, ruff-checked, pycodestyle-checked and type-checked as if it were product code.That is what is blocking #563 right now: its only failure is
.pr/e2e_key_change.py, whichruff-formatreformats andruff-checkthen rejects with 5 E501 errors. Rather than polishing a throwaway script, this skips.pr/in the lint config.Summary
.pre-commit-config.yaml: add a top-levelexclude: ^\.pr/. Pre-commit filters files before handing them to hooks, so this coversruff-format,ruff-check,pycodestyleandpyright(andyamlfmt). The existing per-hookpresets/excludes stay as they are.pyproject.toml: add".pr"to[tool.ruff] extend-exclude, so a plainuv run ruff check ./uv run ruff format .skips it too.How to Test
On this branch (no
.pr/present):Against #563's head (
7173546cb), in a throwaway worktree:ruff-formatfails ("1 file reformatted",.pr/e2e_key_change.py) andruff-checkfails withFound 5 errors.(E501 at.pr/e2e_key_change.pylines 118, 143, 156, 160, 174 after the reformat).pyproject.toml:uv run ruff check .givesAll checks passed!,uv run ruff format --check .gives200 files already formatted, andruff check --show-files .lists no file under.pr/. Without it,ruff check .reports 8 E501 errors in.pr/e2e_key_change.pyandruff format --check .says it would reformat that file.Once this merges, #563 only needs
mainmerged in; its evidence script can stay as it is.🤖 Generated with Claude Code
https://claude.ai/code/session_01HmGfBq3KDFiJTDraPJFGTT
Generated by Claude Code