#!/usr/bin/env bash # Contract tests for the PR-4 parity-recovery release gate. Fixtures leave the # production matrix untouched and prove that blocked/unowned rows cannot pass. set -euo pipefail root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" temporary_dir="$(mktemp -d)" trap 'rm -rf "$temporary_dir"' EXIT write_matrix() { local path="$1" local status="$2" local evidence="$3" cat >"$path" <"$log" 2>&1 local status_code=$? set -e if [[ "$status_code" -eq 0 ]]; then echo "parity recovery gate unexpectedly accepted $name" >&2 cat "$log" >&2 exit 1 fi } assert_gate_passes "complete-owned" "replaced" 'PR-4 — `test_fixture.gd`' assert_gate_fails "blocked" "blocked" "PR-4 — pending" assert_gate_fails "unowned" "ported" "" echo "parity recovery gate contracts passed"