From 8393236a5cdb85fe4c83a2d19a533e29a7091007 Mon Sep 17 00:00:00 2001 From: jsboige Date: Tue, 15 Sep 2026 02:06:02 +0200 Subject: [PATCH] Fix: lane_claim step died silent under bash -e before printing its verdict The blocking lane_claim step in always-on-guards.yml runs under the runner's default shell (bash -e -o pipefail); its own `set -uo pipefail` does NOT remove -e. An unguarded `python3 lane_claim_required.py ...` followed by `RC=$?` died immediately on any non-zero exit (1 = legitimate BLOCK, 2 = caller error) -- before the verdict was printed and before the resolution comment (RELEASED / OVERRIDE / 48h) was posted. Every lane collision surfaced as a mute step failure diagnosed by hand (measured on #15846, run of 2026-09-13). Fix: the canonical guard of the sibling gates (variation_prev_guard, variation_adjacency_guard): `&& RC=0 || RC=$?`. Verified by replaying the step core under the exact runner shell with a mock helper: exits 0/1/2 all reach the verdict block now; pass exits 0, block prints ::error with the reason and posts the resolution comment. Sibling gates already had the guard -- lane_claim was the single unguarded occurrence. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/always-on-guards.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/always-on-guards.yml b/.github/workflows/always-on-guards.yml index f527dc380a..eee6e97dec 100644 --- a/.github/workflows/always-on-guards.yml +++ b/.github/workflows/always-on-guards.yml @@ -1077,10 +1077,17 @@ jobs: echo "::warning::closingIssuesReferences fetch failed; falling back to regex finder (#10323)." fi + # Le shell par defaut du runner est `bash -e -o pipefail` ; le + # `set -uo pipefail` ci-dessus n'y retire PAS -e. Sans le guard + # `&& RC=0 || RC=$?` (la convention des gardes freres + # variation_prev_guard / variation_adjacency_guard ci-dessus), un + # exit non nul du helper (1 = BLOCK legitime, 2 = caller error) + # tuait le step AVANT l'affichage du verdict et le commentaire de + # resolution (RELEASED/OVERRIDE/48 h) : blocage muet, diagnostique + # a la main sur #15846. python3 scripts/ci/lane_claim_required.py \ --body-file /tmp/pr_body.txt "${PR_CREFS_ARG[@]}" \ - > /tmp/verdict.json 2>/tmp/verdict.err - RC=$? + > /tmp/verdict.json 2>/tmp/verdict.err && RC=0 || RC=$? if [ -s /tmp/verdict.err ]; then echo "--- helper stderr ---"