Skip to content

chore(ci): exclude .pr/ review artifacts from lint hooks - #564

Merged
enyst merged 1 commit into
mainfrom
claude/exclude-pr-artifacts-from-lint
Oct 5, 2026
Merged

enyst merged 1 commit into
mainfrom
claude/exclude-pr-artifacts-from-lint

Conversation

@enyst

@enyst enyst commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

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 required backend check still runs uv 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, which ruff-format reformats and ruff-check then 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-level exclude: ^\.pr/. Pre-commit filters files before handing them to hooks, so this covers ruff-format, ruff-check, pycodestyle and pyright (and yamlfmt). The existing per-hook presets/ excludes stay as they are.
  • pyproject.toml: add ".pr" to [tool.ruff] extend-exclude, so a plain uv run ruff check . / uv run ruff format . skips it too.

How to Test

On this branch (no .pr/ present):

$ uv run pre-commit run --all-files --show-diff-on-failure
Format YAML files........................................................Passed
Ruff format..............................................................Passed
Ruff lint................................................................Passed
PEP8 style check (pycodestyle)...........................................Passed
Type check with pyright..................................................Passed

Against #563's head (7173546cb), in a throwaway worktree:

  • As is: ruff-format fails ("1 file reformatted", .pr/e2e_key_change.py) and ruff-check fails with Found 5 errors. (E501 at .pr/e2e_key_change.py lines 118, 143, 156, 160, 174 after the reformat).
  • With this PR's two files checked out on top: all five hooks pass.
  • Plain ruff with this PR's pyproject.toml: uv run ruff check . gives All checks passed!, uv run ruff format --check . gives 200 files already formatted, and ruff check --show-files . lists no file under .pr/. Without it, ruff check . reports 8 E501 errors in .pr/e2e_key_change.py and ruff format --check . says it would reformat that file.

Once this merges, #563 only needs main merged in; its evidence script can stay as it is.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HmGfBq3KDFiJTDraPJFGTT


Generated by Claude Code

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
@github-actions github-actions Bot added the type: chore Maintenance / chores label Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Coverage

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 all-hands-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@enyst
enyst merged commit 14df157 into main Oct 5, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: chore Maintenance / chores

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants