fix: harden review and verifier governance
This commit is contained in:
@@ -3,6 +3,7 @@ set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "$ROOT_DIR"
|
||||
source scripts/report_utils.sh
|
||||
|
||||
if [[ -f ".env.local" ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
@@ -14,8 +15,8 @@ if [[ -f ".env" ]]; then
|
||||
fi
|
||||
|
||||
DB_URL="${DATABASE_URL:-host=/var/run/postgresql dbname=llm_intelligence user=long sslmode=disable}"
|
||||
TODAY="$(date +%Y-%m-%d)"
|
||||
REPORT_PATH="reports/daily/daily_report_${TODAY}.md"
|
||||
TODAY="$(report_date_value)"
|
||||
REPORT_PATH="$(report_markdown_path "$TODAY")"
|
||||
|
||||
psql "$DB_URL" -Atqc "select 1;" >/dev/null
|
||||
|
||||
@@ -24,7 +25,7 @@ if [[ -f "$REPORT_PATH" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
LATEST_REPORT="$(find reports/daily -maxdepth 1 -type f -name 'daily_report_*.md' | sort | tail -n 1)"
|
||||
LATEST_REPORT="$(find "$(report_output_dir)" -maxdepth 1 -type f -name 'daily_report_*.md' | sort | tail -n 1)"
|
||||
if [[ -n "$LATEST_REPORT" ]]; then
|
||||
echo "healthcheck: ok (db=up latest_report=$LATEST_REPORT)"
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user