Add snapshot, signature, and drift guard support for Vertex AI, Cloudflare Workers AI, and Perplexity API, backed by a queryable audit table and recent-window view. This commit also wires the audit query layer into daily signal materialization and report generation so structure drift becomes a first-class signal instead of a log-only artifact.
29 lines
677 B
Bash
Executable File
29 lines
677 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$ROOT_DIR"
|
|
|
|
if [[ $# -lt 1 ]]; then
|
|
echo "用法: scripts/rebuild_historical_report.sh YYYY-MM-DD" >&2
|
|
exit 1
|
|
fi
|
|
|
|
REPORT_DATE="$1"
|
|
shift || true
|
|
|
|
if [[ -f ".env.local" ]]; then
|
|
# shellcheck disable=SC1091
|
|
source ".env.local"
|
|
fi
|
|
if [[ -f ".env" ]]; then
|
|
# shellcheck disable=SC1091
|
|
source ".env"
|
|
fi
|
|
|
|
REPORT_DATE="$REPORT_DATE" \
|
|
REPORT_RUN_KIND="historical_rebuild" \
|
|
REPORT_TRIGGER_SOURCE="rebuild_script" \
|
|
REPORT_IS_OFFICIAL_DAILY="false" \
|
|
go run -tags llm_script ./scripts/generate_daily_report.go ./scripts/official_import_signature_audit_query_lib.go "$@"
|