Files
ironclaw/scripts/commit-msg-regression.sh
firat.sertgoz 9faae9c72a feat(testing): add regression promotion loop (#6884)
* feat(testing): add regression promotion loop

* fix(testing): require evidence for live-case retirement

* fix(testing): require newly added regression assertions

* fix(testing): scrub imported fixture metadata

* fix(testing): reject tautological unittest assertions

* fix(webui): gate regression artifact exports (#6884)

* fix(webui): align gated descriptors with routes (#6884)

* ci: exempt declaration-only coverage facades (#6884)

* fix: address regression promotion review findings (#6884)

* fix(ci): safely bootstrap trusted review gate (#6884)

* fix: close final regression review gaps (#6884)

* fix: address final regression promotion review
2026-07-31 10:53:17 +03:00

28 lines
840 B
Bash
Executable File

#!/usr/bin/env bash
# commit-msg hook: require meaningful regression tests for fix commits.
#
# Installed by scripts/dev-setup.sh as .git/hooks/commit-msg.
# A deterministic-reproduction impossibility exemption must include its reason;
# CI still requires an independent approving review before accepting it.
set -euo pipefail
MSG_FILE="$1"
REPO_ROOT=$(git rev-parse --show-toplevel)
FIRST_LINE=$(head -1 "$MSG_FILE")
COMMIT_BODY=$(<"$MSG_FILE")
CHECKER="$REPO_ROOT/scripts/ci/regression-test-check.py"
if [[ ! -f "$CHECKER" ]] || ! command -v python3 >/dev/null 2>&1; then
echo "commit-msg-regression: checker unavailable; CI will enforce." >&2
exit 0
fi
python3 "$CHECKER" \
--repo "$REPO_ROOT" \
--base HEAD \
--head INDEX \
--title "$FIRST_LINE" \
--commit-bodies "$COMMIT_BODY" \
--allow-unreviewed-reasoned-marker