114ef882e2
- Reviewer decision loop: approve / reject (default Tier 2) / more evidence; decisions recorded in VALIDATION.md - Blocked surfaces: customer-facing block = finding or documented limitation, never a bare marker - Pre-delivery consistency gate: count match, evidence present, identity match - Required artifact set per run; deviations require dated decision record - Gilmore: exec summary corrected 2->3 to match findings; VALIDATION.md added with reviewer dispositions
43 lines
1.6 KiB
Bash
Executable File
43 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# VeriPath Audit Pipeline
|
|
# Usage: ./audit_pipeline.sh "Business Name" "City, ST" [output-dir]
|
|
# Sequence: multi_scraper.py → audit_engine.py → findings + raw capture in target folder
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
BUSINESS="${1:?Usage: ./audit_pipeline.sh \"Business Name\" \"City, ST\" [output-dir]}"
|
|
LOCATION="${2:?Usage: ./audit_pipeline.sh \"Business Name\" \"City, ST\" [output-dir]}"
|
|
OUTPUT_DIR="${3:-}"
|
|
|
|
# Temporary working dir for this run
|
|
WORK_DIR=$(mktemp -d /tmp/veripath.XXXXXX)
|
|
trap 'rm -rf "$WORK_DIR"' EXIT
|
|
|
|
ENGINE_ARGS=("--md")
|
|
|
|
echo "[$(date +%T)] Scraping: $BUSINESS @ $LOCATION"
|
|
|
|
# Step 1: Multi-surface extraction (3rd arg = output DIR; scraper writes <dir>/multi_surface.json/<file>.json)
|
|
uv run python3 "$SCRIPT_DIR/multi_scraper.py" "$BUSINESS" "$LOCATION" "$WORK_DIR"
|
|
SCRAPER_OUT=$(find "$WORK_DIR" -name "*multi_surface*.json" | head -1)
|
|
if [ ! -s "$SCRAPER_OUT" ]; then
|
|
echo "[FAIL] multi_scraper.py produced no output" >&2
|
|
exit 1
|
|
fi
|
|
echo "[OK] Extraction complete: $SCRAPER_OUT"
|
|
|
|
# Step 2: Audit engine
|
|
if [ -n "$OUTPUT_DIR" ]; then
|
|
mkdir -p "$OUTPUT_DIR"
|
|
# Required artifact set (locked beta process v1.0): raw capture + findings in the run folder
|
|
cp "$SCRAPER_OUT" "$OUTPUT_DIR/"
|
|
ENGINE_ARGS+=("--output-dir" "$OUTPUT_DIR")
|
|
echo "[$(date +%T)] Auditing (output: $OUTPUT_DIR)"
|
|
uv run python3 "$SCRIPT_DIR/audit_engine.py" "$SCRAPER_OUT" "${ENGINE_ARGS[@]}"
|
|
echo "[DONE] Findings + raw capture written to $OUTPUT_DIR/"
|
|
else
|
|
echo "[$(date +%T)] Auditing (stdout)"
|
|
uv run python3 "$SCRIPT_DIR/audit_engine.py" "$SCRAPER_OUT" "${ENGINE_ARGS[@]}"
|
|
fi
|