diff --git a/.tangled/workflows/check.yml b/.tangled/workflows/check.yml index 7455ed66..37eb9d11 100644 --- a/.tangled/workflows/check.yml +++ b/.tangled/workflows/check.yml @@ -102,25 +102,22 @@ steps: - name: "spec header hygiene" command: | - set -euo pipefail + set -uo pipefail log=/tangled/workspace/spec-headers.log - { - fail=0 - for f in spec/*.md; do - base=$(basename "$f") - [ "$base" = "README.md" ] && continue - [ "$base" = "meta.md" ] && continue - [ "$base" = "ROADMAP.md" ] && continue - for field in "Status:" "Stage:" "Constitution:" "Depends on:"; do - grep -q "^$field\| $field" "$f" || { echo "FAIL: $f missing '$field'"; fail=1; } - done - grep -qi "acceptance criteria" "$f" || { - echo "FAIL: $f has no acceptance criteria (truncated draft?)"; fail=1; - } + fail=0 + for f in spec/*.md; do + base=$(basename "$f") + [ "$base" = "README.md" ] && continue + [ "$base" = "meta.md" ] && continue + [ "$base" = "ROADMAP.md" ] && continue + for field in "Status:" "Stage:" "Constitution:" "Depends on:"; do + grep -q "^$field\| $field" "$f" || { echo "FAIL: $f missing '$field'" | tee -a "$log"; fail=1; } done - exit "$fail" - } > "$log" 2>&1 - if [ $? -eq 0 ]; then + grep -qi "acceptance criteria" "$f" || { + echo "FAIL: $f has no acceptance criteria (truncated draft?)" | tee -a "$log"; fail=1; + } + done + if [ "$fail" -eq 0 ]; then echo "spec header hygiene: OK" else echo "=== spec header hygiene FAILED ==="