#!/usr/bin/env bash # SC2 regression decision — extracted from 99-dryrun.sh so the regression-FAIL detector is independently # unit-testable (5d112cb). Given two SORTED failing-test-NAME files — the standalone extract's set and the # in-repo baseline set — it prints the regressions (standalone failures absent from the baseline) and EXITS # NON-ZERO (1) if any exist. The contract: "standalone failing set ⊆ in-repo failing set" (the extraction # introduced NO new failure; pre-existing in-repo red is the plugin's own concern, not a migration regr). # A missing capture file is a hard ERROR (exit 2), never a silent zero-regression PASS (guards 4044c49). # # Usage: sc2-regression.sh set -u sf="${1:?standalone fails file}" bf="${2:?baseline fails file}" [ -f "$sf" ] && [ -f "$bf" ] || { echo "SC2-REGRESSION ERROR: missing capture file ($sf / $bf)" >&2; exit 2; } regr="$(comm -23 "$sf" "$bf")" if [ -n "$regr" ]; then printf '%s\n' "$regr" exit 1 fi exit 0