#!/usr/bin/env bash # M3 exit walk: create a real SLAB-UAT-* Woo draft with inference OFF (QUALITY-110). # Run from the UAT host (ubudual5060) after a fresh deploy. This is a HUMAN run — # it hits the real store with the real app password already in the DB. # QUALITY-105: this is NOT a mock; it must create a real draft in the store. set -euo pipefail BASE="${1:-http://127.0.0.1:10881}" SLAB_ID="$(python -c 'import uuid; print(uuid.uuid4())')" SKU="SLAB-UAT-$(date +%H%M%S)" echo "== 0. Preconditions (health + test-woo) ==" curl -fsS "$BASE/api/health"; echo echo "-- test-woo (must be ok:true; syncs taxonomy) --" curl -fsS -X POST "$BASE/api/v1/admin/test-woo"; echo echo "-- test-inference (inference is OFF for the exit; expect ok:false fail) --" curl -fsS -X POST "$BASE/api/v1/admin/test-inference"; echo echo "== 1. Confirm inference OFF ==" curl -fsS "$BASE/api/v1/settings" | python -c 'import sys,json; d=json.load(sys.stdin); print("inference_enabled:", d.get("inference_enabled"), "| content_llm_enabled:", d.get("content_llm_enabled"))' echo "== 2. Create the slab (inference-off, manual content) ==" cat > /tmp/slab.json <UAT practice slab created by the SlabUploader M3 exit walk with inference off.

", "content_source": "manual", "species_confidence": null, "figure_confidence": null, "grade_confidence": null, "inference_status": null, "calibration_photo_id": null } JSON echo "Replace __SPECIES_ID__ / __WOOD_CAT_ID__ / __EDGE_TERM_ID__ / __GRADE_TERM_ID__ / __THICK_TERM_ID__ / __MOIST_TERM_ID__ with ids from the synced taxonomy (GET the taxonomy in the app), then POST the slab. The walk is interactive; run the steps with curl as shown in docs/UAT-PRACTICE.md." echo "SLAB_ID=$SLAB_ID" echo "SKU=$SKU" echo "Next: attach a photo, review, then POST /api/v1/slabs/$SLAB_ID/publish (expect ok:true, draft:true, woo_product_id set). Confirm the draft exists in the Woo store and matches the reviewed set."