#!/usr/bin/env bash set -euo pipefail REPORT_PATH="${1:?review report path required}" CONTENT="$(cat "$REPORT_PATH")" if [[ "$CONTENT" != *'runtime-verified'* ]]; then echo "missing truth label: runtime-verified" >&2 exit 1 fi if [[ "$CONTENT" != *'current status'* && "$CONTENT" != *'当前状态'* ]]; then echo "missing truth label: current status" >&2 exit 1 fi if [[ "$CONTENT" == *'历史状态'* || "$CONTENT" == *'historical status'* || "$CONTENT" == *'历史 review'* || "$CONTENT" == *'上一轮 review'* ]]; then if [[ "$CONTENT" != *'历史状态'* && "$CONTENT" != *'historical status'* ]]; then echo "missing truth label: historical status" >&2 exit 1 fi fi echo "REVIEW_TRUTH_GUARD: PASS"