Skip to content

Commit b115847

Browse files
sgwannabeclaude
andcommitted
fix(tests): apply PR #54 R2 (CodeRabbit minor) — set -euo pipefail in 3 new fixtures
CodeRabbit caught: verify-lesson07.sh has `set -u` only at top + later `set +e` / `set -e` wrapping around the hook call. Without errexit on from the start, the wrapping is asymmetric — first iteration silently continues past mktemp/python failures, second iteration onwards has errexit ON. Iteration-dependent behavior. Fix: standardize all 3 new fixture scripts to `set -euo pipefail`. This makes the `set +e` / `set -e` pattern in verify-lesson07.sh behave as intended (suppress errexit only for the hook call). Also catches unset-variable bugs and pipe-failure shadowing in the other two scripts. All 3 still green locally after the change. Refs PR #54 review #3141500203. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 477ef54 commit b115847

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

tests/fixtures/filled-ratio/verify-filled-ratio.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
# Exit 0 = all cases match. Exit 1 = at least one mismatch (CI-blocking).
99

10-
set -u
10+
set -euo pipefail
1111

1212
FIXTURES_DIR="$(cd "$(dirname "$0")" && pwd)"
1313
REPO_ROOT="$(cd "$FIXTURES_DIR/../../.." && pwd)"

tests/fixtures/lesson07-regression/verify-lesson07.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# not on the panel composite_winner — the regression LESSON 0.7
1111
# warns about.
1212

13-
set -u
13+
set -euo pipefail
1414

1515
FIXTURES_DIR="$(cd "$(dirname "$0")" && pwd)"
1616
REPO_ROOT="$(cd "$FIXTURES_DIR/../../.." && pwd)"

tests/fixtures/normalize-constraints/verify-normalize.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# For each case in cases.json, run scripts/normalize-constraints.py with
55
# the input label and assert the output JSON matches expected.
66

7-
set -u
7+
set -euo pipefail
88

99
FIXTURES_DIR="$(cd "$(dirname "$0")" && pwd)"
1010
REPO_ROOT="$(cd "$FIXTURES_DIR/../../.." && pwd)"

0 commit comments

Comments
 (0)