From 1700117ee8f7dbbc09cf15c9b0113b2658816359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Guill=C3=A9n?= <284438953+PabloCodes7@users.noreply.github.com> Date: Tue, 14 Jul 2026 12:35:15 +0200 Subject: [PATCH] fix: raise the patchrail floor to 0.5.0 so the action stops annotating wrong answers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The default range was `>=0.3.1,<0.5.0`, so every consumer of this action installs 0.4.0 — the last release that reads a tool the job merely *named* as the cause of death. On real logs that is not rare: a `GRADLE_HOME=` line in a Windows environment table diagnosed a Java build failure in an apache/kafka job that compiled nothing, and pip's `Collecting mypy==1.17.1` diagnosed a type-check failure in a job that never type-checked. This action's whole output is a confident one-line verdict written into someone's pull request, which is the worst possible place to be confidently wrong. patchrail 0.5.0 judges a signal by the line it lands on and answers `unknown` rather than inventing a cause. Floor raised to 0.5.0; the `<0.6.0` cap stays and keeps doing its job — 0.4.0 moved the `ci classes` JSON from v1 to v2 in a minor bump, which is exactly what the cap exists to hold back. Verified against PyPI, not a local build: `patchrail>=0.5.0,<0.6.0` resolves to 0.5.0, the suite passes against it, and `ci explain --format json` still emits `patchrail.ci_result.v1` — the contract annotate.py reads. --- action.yml | 6 +++++- tests/test_schema_guard.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index fd37fc7..82ae815 100644 --- a/action.yml +++ b/action.yml @@ -57,7 +57,11 @@ runs: # into every consumer's CI with no commit here to review it. The # `latest-patchrail` job in .github/workflows/test.yml runs this same # path against the newest release, so the range moves deliberately. - python -m pip install --quiet "patchrail>=0.3.1,<0.5.0" + # + # Floor is 0.5.0: every release below it reads a tool the job merely + # named — a `GRADLE_HOME=` line, a `Collecting mypy` from pip — as the + # cause of death, so it annotates the PR with a confident wrong answer. + python -m pip install --quiet "patchrail>=0.5.0,<0.6.0" fi - name: Explain failure and annotate diff --git a/tests/test_schema_guard.py b/tests/test_schema_guard.py index 2dfe134..5fcd607 100644 --- a/tests/test_schema_guard.py +++ b/tests/test_schema_guard.py @@ -26,7 +26,7 @@ # test agree with any future edit to it, which is the drift it exists to catch. SUPPORTED_SCHEMA = "patchrail.ci_result.v1" -# What patchrail emits today (verified against 0.3.1 and 0.4.0). +# What patchrail emits today (verified against 0.3.1, 0.4.0 and 0.5.0). V1_RESULT = { "schema_version": SUPPORTED_SCHEMA, "failure_class": "python_test_failure",