Research-Stack/scripts/qc-flag/run_qc_flag.sh
Brandon Schneider 7a20002fc2 feat: eigensolid convergence proof + QC flagging tool + full pass/fail review
Resolves the convergence_to_fixed_point failure by proving the correct
eigensolid statement: stepExact stabilizes all value components (N_7,
N_8, N_11) in one application. The original theorem was mathematically
false (iteration counter is free-running).

QC cleanup sweep across Physics/ (20 files):
- 3 remaining LOW items fixed: h00/h01 factoring, rD->rd, rdDr1/rdDr2 x100
- 6 of 7 sorry theorems proved; 1 explicitly FAILED (convergence)
- Unused imports removed, naming violations fixed, #eval witnesses added
- 210 -> 144 issues remaining (all WARNING/INFO, zero ERROR)

New tooling:
- scripts/qc-flag/lean_qc_flagger.py implemements 5-point inspection protocol
- Outputs structured JSON + Markdown pass/fail reports

DAG receipts at shared-data/data/stack_solidification/qc_*_dag_2026-05-13.md
2026-05-14 00:04:08 -05:00

53 lines
1.7 KiB
Bash
Executable file

#!/usr/bin/env bash
#
# run_qc_flag.sh — Shell wrapper for lean_qc_flagger.py
#
# Usage:
# ./run_qc_flag.sh <target> [options]
#
# Wraps the Python QC flagger, always produces JSON + Markdown in a dated
# output directory, and prints a summary to stdout.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
FLAGGER="${SCRIPT_DIR}/lean_qc_flagger.py"
if [ ! -f "$FLAGGER" ]; then
echo "ERROR: lean_qc_flagger.py not found at $FLAGGER" >&2
exit 1
fi
if [ $# -lt 1 ]; then
echo "Usage: $0 <target> [--verbose]" >&2
echo " target: Lean file or directory to scan" >&2
exit 1
fi
TARGET="$1"
VERBOSE=""
if [ "${2:-}" = "--verbose" ] || [ "${2:-}" = "-v" ]; then
VERBOSE="--verbose"
fi
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
OUTDIR="${SCRIPT_DIR}/reports/${TIMESTAMP}"
mkdir -p "$OUTDIR"
JSON_OUT="${OUTDIR}/qc_flags.json"
MD_OUT="${OUTDIR}/qc_flags.md"
echo "────────────────────────────────────────────"
echo " QC Flag Scan"
echo " Target: ${TARGET}"
echo " Reports: ${OUTDIR}/"
echo "────────────────────────────────────────────"
python3 "$FLAGGER" "$TARGET" --json "$JSON_OUT" --markdown "$MD_OUT" $VERBOSE
echo ""
echo "────────────────────────────────────────────"
echo " Reports saved to ${OUTDIR}/"
echo " JSON: ${JSON_OUT}"
echo " MD: ${MD_OUT}"
echo "────────────────────────────────────────────"