From f1608a6a4fef93aec29260791cb88b08f6c64d98 Mon Sep 17 00:00:00 2001 From: Chaitanya Giri <16ucc028@lnmiit.ac.in> Date: Thu, 17 Sep 2026 19:11:38 +0530 Subject: [PATCH] test(ci): pin the no-visual-change waiver, and say it out loud in the template THE ESCAPE ALREADY EXISTS. `.github/workflows/pr-evidence.yml` has had the `no-visual-change` waiver since the gate shipped, at lines 55 to 59, checked before any parsing and returning early. The bot's own failure comment already tells the author about it, and the label already exists in the repository. I used it on #547 today and the check passed in three seconds. So this change does NOT build the escape. It does the two things that were actually missing. ONE. IT WAS COMPLETELY UNTESTED. A branch that lets a required status check pass, with nothing asserting when it may and may not fire, is the dangerous shape: it can rot in two directions and neither is loud. If it stops working, a CI tweak or a typo has no way through a required check. If it starts always firing, the gate is decorative on every pull request and nobody notices. Eight tests, in the style already in this file: the label name, the ordering and the guard are read OUT of the workflow rather than restated, so editing the workflow carelessly fails here instead of on a contributor's pull request. the label still matches the template and the bot comment the waiver is checked BEFORE the evidence is computed the waiver returns early rather than falling through it FIRES with the label, at any position in the list it is case insensitive, because labels are typed by hand it does NOT fire without the label <- the always-pass guard it needs the WHOLE label, so `needs-no-visual-change` does not walk through All four mutations go red, checked before committing: rename the label in the workflow only 3 tests fail substring match instead of exact membership 6 tests fail remove the early return 1 test fails move the waiver after the evidence parsing 1 test fails TWO. THE TEMPLATE ONLY MENTIONED IT INSIDE AN HTML COMMENT, so it never rendered. There is now a visible note under `## Evidence` naming the label and saying it is the supported way past the check. Two further tests prove that adding visible text changed nothing: an unfilled template still fails, and the note itself is not mistaken for evidence. `.github/workflows/pr-evidence.yml` IS NOT MODIFIED BY THIS COMMIT. WHY 42 PULL REQUESTS ARE STUCK, since that was the reason for the work: not a missing escape. Of 93 open pull requests exactly one carries the label. The escape works and nobody is applying it. Labelling them is a maintainer action and is not in this change. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01PogxmT9ULRQSYbfs1oigLx --- .github/PULL_REQUEST_TEMPLATE.md | 4 + test/pr-evidence-gate.test.cjs | 125 +++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 094d0c704..10c4b030c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -21,6 +21,10 @@ ## Evidence +> Nothing observable to show, such as a CI tweak, a typo or a dependency bump? +> Say so under **What & why** and ask a maintainer for the `no-visual-change` label. +> It is the supported way past this check. Everything else still needs a before and an after. +