Skip to content

PLAT-2003/ci: run pre-commit in CI - #49

Merged
brtkwr merged 1 commit into
mainfrom
PLAT-2003/style-workflow
Jul 30, 2026
Merged

PLAT-2003/ci: run pre-commit in CI#49
brtkwr merged 1 commit into
mainfrom
PLAT-2003/style-workflow

Conversation

@brtkwr

@brtkwr brtkwr commented Jul 30, 2026

Copy link
Copy Markdown
Member

Context

This repo has a .pre-commit-config.yaml — including the uv-lock hook added in the PLAT-2003 sweep — but nothing runs pre-commit in CI. There is no Style workflow.

So the hooks only fire for developers who happen to have pre-commit installed locally. A PR that introduces lock drift, a formatting regression, or a bandit finding goes green regardless. That makes the hook decoration rather than a guard, which undercuts the point of the sweep: 9 of the 25 repos we added uv-lock to were in this state.

It also produced a false signal during the rollout — two repos with genuine pyproject/uv.lock drift showed green CI, because nothing was checking, not because they were in sync.

Changes

  • Add the standard Style workflow, matching the one already used across the org.

Scope / Non-goals

  • Uses the consolidated two-inc/actions-public/pre-commit action, not the older two-inc/pre-commit-action. The old one sets an unauthenticated PIP_EXTRA_INDEX_URL on the pre-commit step, which makes pip prompt for a username and die with EOFError on a cold hook cache — that is what broke two-avida-client's CI.
  • python-version is pinned to match this repo's requires-python floor.
  • No hook configuration changes. This only means the existing config actually runs.

Validation

  • This PR's own pre-commit run is the validation: it is the first time these hooks have executed in CI for this repo, so a red result here is a real pre-existing finding rather than a regression.

Ticket

🤖 Generated with Claude Code

https://claude.ai/code/session_017VDJqb1XWoNNxZEfGQ8meH

This repo has a .pre-commit-config.yaml, including the uv-lock hook added in
the PLAT-2003 sweep, but nothing runs pre-commit in CI. So the hooks only fire
for developers who have pre-commit installed locally, and a PR that introduces
lock drift or a formatting regression goes green.

Add the same Style workflow the other repos use, on the consolidated
two-inc/actions-public/pre-commit action. The older two-inc/pre-commit-action
sets an unauthenticated PIP_EXTRA_INDEX_URL, which makes pip prompt for
credentials and die with EOFError on a cold hook cache.
@github-actions

Copy link
Copy Markdown

☂️ Code Coverage

current status: ✅

Overall Coverage

Statements Covered Coverage Threshold Status
253 244 96% 0% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: d15c418 by action🐍

@github-actions

Copy link
Copy Markdown

🖌 Pre-commit success 🏆

Details
Downloading virtualenv (5.3MiB)
 Downloaded virtualenv
Installed 11 packages in 10ms
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[WARNING] repo `https://github.com/pre-commit/pre-commit-hooks` uses deprecated stage names (commit, push) which will be removed in a future version.  Hint: often `pre-commit autoupdate --repo https://github.com/pre-commit/pre-commit-hooks` will fix this.  if it does not -- consider reporting an issue to that repo.
[INFO] Initializing environment for https://github.com/astral-sh/ruff-pre-commit.
[INFO] Initializing environment for local.
[INFO] Initializing environment for https://github.com/astral-sh/uv-pre-commit.
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/astral-sh/ruff-pre-commit.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/astral-sh/uv-pre-commit.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
check python ast.....................................(no files to check)Skipped
check for added large files..............................................Passed
check json...........................................(no files to check)Skipped
check for merge conflicts................................................Passed
check toml...........................................(no files to check)Skipped
check yaml...............................................................Passed
detect private key.......................................................Passed
fix end of files.........................................................Passed
pretty format json...................................(no files to check)Skipped
fix requirements.txt.................................(no files to check)Skipped
trim trailing whitespace.................................................Passed
ruff.................................................(no files to check)Skipped
ruff-format..........................................(no files to check)Skipped
uv-lock..............................................(no files to check)Skipped

Exit code: 0

Author ✍️@brtkwr

@Puvendhan Puvendhan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

PLAT-2003 final batch. Verified: group 1 adds only the Style/pre-commit CI workflow (consolidated actions-public/pre-commit, per-repo py pin); lending is project-version-only; webhooks regen matches declared pyproject specifiers (no pydantic-xml present, so the ratatosk break path doesn't apply). Approving.

@brtkwr
brtkwr merged commit bbb7577 into main Jul 30, 2026
2 checks passed
@brtkwr
brtkwr deleted the PLAT-2003/style-workflow branch July 30, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants