#!/bin/bash # Wave 160 Agent 52: ML Dependencies Verification Script # Verifies that ml crate dependencies are correctly configured set -e echo "========================================" echo "ML Crate Dependencies Verification" echo "========================================" echo "" # 1. Check workspace sqlx configuration echo "[1/5] Checking workspace sqlx configuration..." if grep -q 'sqlx = { version = "0.8.6"' Cargo.toml; then echo "✅ Workspace sqlx configured (v0.8.6)" else echo "❌ Workspace sqlx NOT configured" exit 1 fi echo "" # 2. Check ml crate sqlx reference echo "[2/5] Checking ml/Cargo.toml sqlx reference..." if grep -q 'sqlx.workspace = true' ml/Cargo.toml; then echo "✅ ML crate references workspace sqlx" else echo "❌ ML crate does NOT reference workspace sqlx" exit 1 fi echo "" # 3. Check model_registry module echo "[3/5] Checking model_registry module..." if [ -f "ml/src/model_registry.rs" ]; then echo "✅ model_registry.rs exists ($(wc -l < ml/src/model_registry.rs) lines)" else echo "❌ model_registry.rs NOT found" exit 1 fi echo "" # 4. Check module export in lib.rs echo "[4/5] Checking model_registry export in lib.rs..." if grep -q 'pub mod model_registry' ml/src/lib.rs; then echo "✅ model_registry exported in lib.rs" else echo "❌ model_registry NOT exported in lib.rs" exit 1 fi echo "" echo "========================================" echo "Verification Complete" echo "========================================" echo "" echo "All checks passed! ML crate dependencies are correctly configured." echo "" echo "To compile ml crate:" echo " cargo build -p ml --release" echo "" echo "To run model_registry tests:" echo " cargo test -p ml --lib model_registry -- --nocapture" echo "" echo "Note: 2 tests require PostgreSQL at localhost:5432 and will be ignored."