Skip to content

🐛 fix(cooled-prek): run hooks with the caller's environment - #58

Merged
gaborbernat merged 1 commit into
mainfrom
cooled-prek-run-env
Nov 6, 2026
Merged

gaborbernat merged 1 commit into
mainfrom
cooled-prek-run-env

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

The cooled hook run applied the seven-day cutoff to everything prek started, not only to the hook environments it builds. A language: system hook that calls uv run re-resolved its own project under the cutoff, ignoring the project's lock and uv settings, and failed. toml-fmt's README hooks hit this in the new cooled hooks check (toml-fmt#524), and its scheduled maintenance pull requests would hit it too. 🐛

cooled-prek now splits a run in two: it installs the hooks the run names, or every hook when none are named, under the cutoff with the repository's uv settings ignored, then runs them with the caller's environment. Hook environments are built exactly as before, and system hooks behave as they do on a contributor's machine.

cooled_prek.sh exported the seven-day cutoff, UV_NO_CONFIG and the
unset uv settings for the whole prek run, so a `language: system` hook
that calls `uv run` re-resolved its project under the cutoff and failed:
toml-fmt's README hooks could not resolve uv>=0.13.7.

A run now installs the hooks it names (every hook when none are named)
under the cutoff, then runs them with the caller's environment.
@gaborbernat gaborbernat added the bug Something isn't working label Nov 6, 2026
@gaborbernat
gaborbernat merged commit 5bc5502 into main Nov 6, 2026
13 checks passed
@gaborbernat
gaborbernat deleted the cooled-prek-run-env branch November 6, 2026 23:17
This was referenced Nov 6, 2026
gaborbernat added a commit to pytest-dev/pytest-print that referenced this pull request Nov 6, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to pytest-dev/pytest-env that referenced this pull request Nov 6, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to gaborbernat/mdformat-hugo that referenced this pull request Nov 6, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to gaborbernat/pypi-changes that referenced this pull request Nov 6, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to gaborbernat/bump-deps-index that referenced this pull request Nov 6, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to gaborbernat/simplint that referenced this pull request Nov 6, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to pypa/pipx that referenced this pull request Nov 6, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/pre-commit-uv that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/tox-gh that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/pyproject-api that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/mdformat-zola that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/sphinx-argparse-cli that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to pypa/virtualenv that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/platformdirs that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/action-pre-commit-uv that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/python-discovery that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/tox-uv that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/pipdeptree that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/sphinx-autodoc-typehints that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/tox-ini-fmt that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/xml-fmt that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/PyVenvManage that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/devpi-process that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/jetbrains-fish that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/tox that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/turbohtml that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
gaborbernat added a commit to tox-dev/filelock that referenced this pull request Nov 7, 2026
The cooled hook run applied the seven-day cutoff to the hooks
themselves, so a hook that calls `uv run` re-resolved its project under
the cutoff and failed. [github-workflows
6.7.1](tox-dev/github-workflows#58) builds hook
environments under the cutoff and runs the hooks with the normal
environment; this moves the shared workflow pins to it. 🧹
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant