From 1db7779b03f4e63b5dfcfa4ee5912c7b99067b00 Mon Sep 17 00:00:00 2001 From: dan-claude-bot Date: Mon, 20 Jul 2026 20:56:57 +0000 Subject: [PATCH] test: terminate the ci.yml step block at the job boundary too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The monotonic step is the LAST step of its job, so stopping only at the next `- name:` ran the block into the job below and swallowed that job level `if:`. Unanchored `grep -q "if:"` then fired on it — the same bug the scoping was meant to fix, moved from "any step in the file" to "this step plus the head of the next job". Terminates on a new step OR a new job now, and the key is anchored so an `if:` inside a `run:` line is not mistaken for a step condition. Found by claude-bot-andresmgsl on heavy-duty/box#144; this port carried the identical awk. Co-Authored-By: Claude Opus 4.8 --- test/release.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/release.sh b/test/release.sh index d8a4c94..df95703 100644 --- a/test/release.sh +++ b/test/release.sh @@ -441,12 +441,18 @@ check "ci.yml: ...against the PR's base branch" 0 "" \ # an extractor that matched nothing would turn the negative into a tautology # that passes forever, including after someone renames the step and re-adds # the gate. +# Terminates on a new STEP or a new JOB. The job boundary is not optional: the +# monotonic step is the LAST step of its job, so stopping only at the next +# `- name:` runs the block into the job below and swallows that job's +# level `if:` — the same bug this scoping fixed, moved from "any step in the +# file" to "this step plus the head of the next job" (found on box#144). mono_step_block() { awk '/^ - name: no shipped changelog heading/ {f=1; print; next} - f && /^ - name: / {exit} + f && (/^ - / || /^ [^ ]/) {exit} f {print}' "$CIY" } -mono_step_gated() { mono_step_block | grep -q 'if:'; } +# Anchored: an `if:` inside a `run:` line is not a step condition. +mono_step_gated() { mono_step_block | grep -q '^ if:'; } check "ci.yml: the monotonic step itself is NOT pull_request-gated (#98)" 1 "" \ mono_step_gated check "ci.yml: ...and the block was actually found (guards the awk above)" 0 \