74 lines
4 KiB
Bash
74 lines
4 KiB
Bash
#!/usr/bin/env bash
|
|
# tests/fix-round-4-5b2-b-red.sh
|
|
# The red proof of fix round 4.5b2, part B (plan
|
|
# .claude/projects/2026-10-31-review-gate-4-5b2/plan.md, Step 16; decisions
|
|
# 129 and 132), as a wrapper over the shared red script
|
|
# tests/helpers/red-round.sh. Every id of the round has tests whose names
|
|
# start with "[id]"; each must fail on an assertion at the round's start point
|
|
# 96fba75, except FXS, whose one case reads a fixture under tests/ that the
|
|
# script copies into the clone and is proven red under its mutation. Kept
|
|
# behaviour is an untagged keep: test or a Control: assertion inside a red
|
|
# tagged test.
|
|
# This wrapper passes the shared script:
|
|
# --base BASE, the full sha of 96fba75;
|
|
# --ids IDS (the round's 20 ids);
|
|
# --other-ids: the ids of fix round 4-5a, of 4-5b part 1, of part 2, of
|
|
# part 3, of part 4 and of 4.5b2 part A, read with sed from the IDS=
|
|
# lines of tests/fix-round-4-5a-red.sh, tests/fix-round-4-5b-red.sh,
|
|
# tests/fix-round-4-5b-part-2-red.sh, tests/fix-round-4-5b-part-3-red.sh,
|
|
# tests/fix-round-4-5b-part-4-red.sh and tests/fix-round-4-5b2-a-red.sh
|
|
# and passed as ONE value, in that order (the shared script keeps only
|
|
# the last --other-ids it is given); a tag on that list is not judged;
|
|
# --mutations tests/fix-round-4-5b2-b-mutations.mjs (one mutation,
|
|
# FXS-fixture);
|
|
# the round's FILES: the twelve new tagged test files. The RLS tests live in
|
|
# tests/lib/review-answers.test.mjs, so tests/scripts/release-check.test.mjs
|
|
# is not listed. The scripts test is untagged and not listed.
|
|
# No --require-sha256: the round has no SHA-256 test.
|
|
# Exit 0 all red, 1 a rule broken (the judge names it), 2 a setup failure
|
|
# (also: no ids on one of the six earlier IDS= lines); never 0 on a setup
|
|
# failure.
|
|
# bash 3.2 compatible, ASCII only, no arrays.
|
|
|
|
set -u
|
|
set -f
|
|
|
|
cd "$(dirname "$0")/.." || { echo "red script: setup failure: cannot cd to the repo root" >&2; exit 2; }
|
|
ROOT="$(pwd -P)"
|
|
|
|
BASE=96fba75996be4fa295d80d7a42c8e3554f7aaae4
|
|
IDS='CAT V12 RAP ANS RLS PRX RND CAP CRY FXL POL ENG CMD DPR MEV PRB RMP PXB FN1 FXS'
|
|
FILES='tests/lib/review-answers.test.mjs tests/lib/review-validator-1-2.test.mjs tests/lib/pre-existing.test.mjs tests/lib/review-rounds.test.mjs tests/lib/review-policy.test.mjs tests/lib/engine-findings-compare.test.mjs tests/lib/claude-md-scope.test.mjs tests/hooks/merge-evidence.test.mjs tests/lib/fix-round-4-5b2-b-prose.test.mjs tests/lib/reviewed-commit-parents.test.mjs tests/lib/pre-existing-bound.test.mjs tests/lib/review-finalized.test.mjs'
|
|
|
|
OTHER_A=$(sed -n "s/^IDS='\(.*\)'\$/\1/p" "$ROOT/tests/fix-round-4-5a-red.sh")
|
|
if [ -z "$OTHER_A" ]; then
|
|
echo "red script: setup failure: no ids on the IDS= line of $ROOT/tests/fix-round-4-5a-red.sh" >&2
|
|
exit 2
|
|
fi
|
|
OTHER_B=$(sed -n "s/^IDS='\(.*\)'\$/\1/p" "$ROOT/tests/fix-round-4-5b-red.sh")
|
|
if [ -z "$OTHER_B" ]; then
|
|
echo "red script: setup failure: no ids on the IDS= line of $ROOT/tests/fix-round-4-5b-red.sh" >&2
|
|
exit 2
|
|
fi
|
|
OTHER_C=$(sed -n "s/^IDS='\(.*\)'\$/\1/p" "$ROOT/tests/fix-round-4-5b-part-2-red.sh")
|
|
if [ -z "$OTHER_C" ]; then
|
|
echo "red script: setup failure: no ids on the IDS= line of $ROOT/tests/fix-round-4-5b-part-2-red.sh" >&2
|
|
exit 2
|
|
fi
|
|
OTHER_D=$(sed -n "s/^IDS='\(.*\)'\$/\1/p" "$ROOT/tests/fix-round-4-5b-part-3-red.sh")
|
|
if [ -z "$OTHER_D" ]; then
|
|
echo "red script: setup failure: no ids on the IDS= line of $ROOT/tests/fix-round-4-5b-part-3-red.sh" >&2
|
|
exit 2
|
|
fi
|
|
OTHER_E=$(sed -n "s/^IDS='\(.*\)'\$/\1/p" "$ROOT/tests/fix-round-4-5b-part-4-red.sh")
|
|
if [ -z "$OTHER_E" ]; then
|
|
echo "red script: setup failure: no ids on the IDS= line of $ROOT/tests/fix-round-4-5b-part-4-red.sh" >&2
|
|
exit 2
|
|
fi
|
|
OTHER_F=$(sed -n "s/^IDS='\(.*\)'\$/\1/p" "$ROOT/tests/fix-round-4-5b2-a-red.sh")
|
|
if [ -z "$OTHER_F" ]; then
|
|
echo "red script: setup failure: no ids on the IDS= line of $ROOT/tests/fix-round-4-5b2-a-red.sh" >&2
|
|
exit 2
|
|
fi
|
|
|
|
exec /bin/bash "$ROOT/tests/helpers/red-round.sh" --base "$BASE" --ids "$IDS" --other-ids "$OTHER_A $OTHER_B $OTHER_C $OTHER_D $OTHER_E $OTHER_F" --mutations "$ROOT/tests/fix-round-4-5b2-b-mutations.mjs" $FILES
|