From ca058ad9648e3358ac21e2b83c1368035cb53f7f Mon Sep 17 00:00:00 2001 From: Aleksei Sviridkin <3811295@gmail.com> Date: Tue, 18 Aug 2026 15:44:13 +0300 Subject: [PATCH] test(e2e): anchor the phase-warning guard on its own unique phrase The guard located the missing-timeout warning by the first match of "timeout is not on PATH" in the shared library. The bracket-pair captures now write [bounds] notes carrying that same phrase earlier in the file, so the guard read a note as the warning and failed on every run, holding the unit gate red for all pull requests. The node-join copy of this guard was moved to the warning's own phrase for the same reason; this aligns the remaining copy. Assisted-By: Claude Signed-off-by: Aleksei Sviridkin <3811295@gmail.com> --- hack/run-kubernetes-cpu-throttle_test.bats | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hack/run-kubernetes-cpu-throttle_test.bats b/hack/run-kubernetes-cpu-throttle_test.bats index b7c5a9254..55f771670 100644 --- a/hack/run-kubernetes-cpu-throttle_test.bats +++ b/hack/run-kubernetes-cpu-throttle_test.bats @@ -159,7 +159,10 @@ run_capture() { # sentence sends the reader to the opposite conclusion about the one collector # whose behaviour differs, and a comment in the source does not reach them. lib=hack/e2e-chainsaw/_lib/run-kubernetes.sh - warn=$(grep -n 'timeout is not on PATH' "$lib" | head -n 1 | cut -d: -f1) + # Anchored on the phrase unique to the phase warning itself: the bracket-pair + # captures write their own [bounds] notes carrying "timeout is not on PATH", + # so the first match of that phrase is no longer this sentence. + warn=$(grep -n 'run UNBOUNDED' "$lib" | head -n 1 | cut -d: -f1) if [ -z "$warn" ]; then echo "expected the phase to still warn when timeout is missing" >&2 return 1