feat(auditing): pipeline v1.1 — report generation + scripted gate + temporal delta

- report_generate.py: REPORT-final.md + VALIDATION.md from findings + raw
  capture; per-surface status from summary.surfaces_ok; Data Limitations
- report_gate.py: §6 gate scripted (count/evidence/identity/material
  support); non-zero exit blocks delivery
- audit_diff.py: before/after capture comparison -> DELTA.md
- audit_pipeline.sh: 2 steps -> 4; collision-safe capture copy (re-runs
  preserve baseline); relative output dir resolved to absolute
- beta-audit-process.md: locked v1.0 -> v1.1 (+ dated decision record)
- all 9 runs of the 2026-08-15 batch regenerated + gated (9/9 PASS)
- live end-to-end proof: Gilmore re-run, DELTA.md 0 changes (same day)
This commit is contained in:
2026-08-15 16:52:23 +00:00
parent c951f79a18
commit 394d5dae3f
33 changed files with 1681 additions and 228 deletions
+26 -3
View File
@@ -9,6 +9,11 @@ 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:-}"
# cwd-proof: resolve to absolute once, so relative output dirs can't break capture copy
if [ -n "$OUTPUT_DIR" ]; then
mkdir -p "$OUTPUT_DIR"
OUTPUT_DIR="$(cd "$OUTPUT_DIR" && pwd)"
fi
# Temporary working dir for this run
WORK_DIR=$(mktemp -d /tmp/veripath.XXXXXX)
@@ -30,12 +35,30 @@ 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/"
# Required artifact set (locked beta process v1.1): raw capture + findings in the run folder
# Collision-safe: a re-run never overwrites the prior capture (temporal baseline, v1.1 §5)
DEST="$OUTPUT_DIR/$(basename "$SCRAPER_OUT")"
if [ -e "$DEST" ]; then
BASE="$(basename "${DEST%.*}")"; EXT="${DEST##*.}"
DEST="$OUTPUT_DIR/${BASE}__$(date +%Y%m%d-%H%M%S).$EXT"
echo "[WARN] prior capture present — writing $DEST (baseline preserved)"
fi
cp "$SCRAPER_OUT" "$DEST"
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/"
# Step 3: Report + validation (locked process v1.1 §3)
echo "[$(date +%T)] Generating report + validation"
uv run python3 "$SCRIPT_DIR/report_generate.py" "$OUTPUT_DIR"
# Step 4: Pre-delivery consistency gate (v1.1 §6) — FAIL blocks delivery
echo "[$(date +%T)] Consistency gate"
if ! uv run python3 "$SCRIPT_DIR/report_gate.py" "$OUTPUT_DIR"; then
echo "[GATE FAIL] $OUTPUT_DIR — do NOT deliver; see GATE RESULT in VALIDATION.md" >&2
exit 1
fi
echo "[DONE] Findings + raw capture + report + gate written to $OUTPUT_DIR/"
else
echo "[$(date +%T)] Auditing (stdout)"
uv run python3 "$SCRIPT_DIR/audit_engine.py" "$SCRAPER_OUT" "${ENGINE_ARGS[@]}"