#!/usr/bin/env bash # Run only from a trusted base checkout; HEAD code is inspected as Git objects. set -euo pipefail here=$(cd "$(dirname "$0")" && pwd) base=${1:?BASE}; head=${2:?HEAD}; body=${3:?BODY}; title=${4:?TITLE} [ "$(git rev-parse HEAD)" = "$(git rev-parse "$base")" ] || { echo "refusing: checkout is not the trusted base" >&2; exit 2; } work=$(mktemp -d) trap 'rm -rf "$work"' EXIT mb=$(git merge-base "$base" "$head") bash "$here/post-merge-review-changed.sh" "$mb" "$head" >"$work/changed.bin" bash "$here/changed-go-blobs.sh" "$mb" "$head" "$work/blobs" bash .github/scripts/spec-trace-check.sh "$body" "$work/blobs" .github/model-code-trace.tsv <"$work/changed.bin" bash "$here/public-text-check.sh" "$mb" "$head" "$title" "$body"