🔁 End-to-End Flow Validator
Validates every layer of the autonomous pipeline — DB tables, event bus, agent connections, APIs, and item-level workflow states
Dependency-Aware Flow Map
8 dependency layers
Layer 1
Verify Supabase connection is live
Layer 2
Verify Supabase Auth is responding
↳ depends on: db_conn
Check opportunities table exists and is readable
↳ depends on: db_conn
Verify enterprise_events table is operational
↳ depends on: db_conn
Verify products table is accessible
↳ depends on: db_conn
Check suppliers table is accessible
↳ depends on: db_conn
Verify orders table is accessible
↳ depends on: db_conn
Ping /api/autonomous-loop endpoint
↳ depends on: db_conn
Ping /api/system-health endpoint
↳ depends on: db_conn
Layer 3
Check workflow_task_queues table is accessible
↳ depends on: event_bus
Check payments table is accessible
↳ depends on: orders_table
Ping /api/opportunity-discovery/run endpoint
↳ depends on: opportunity_table
Layer 4
Verify agent_connections registry has entries
↳ depends on: workflow_queues
Verify item_workflow_states table for parallel processing
↳ depends on: workflow_queues
Check settlement_records table for financial reconciliation
↳ depends on: payments_table
Layer 5
Check ai_decisions table is writable
↳ depends on: agent_connections
Verify item workflow state machine can create independent pipelines
↳ depends on: item_workflows, agent_connections
Layer 6
Verify truth_records table exists
↳ depends on: ai_decisions
Layer 7
Check quality_gate_log is accessible
↳ depends on: truth_records
Layer 8
Ping /api/quality-gate endpoint
↳ depends on: quality_gate
Dependency-Aware Execution
Each step only runs when its dependencies have passed. Failures cascade correctly — no false positives.
Item-Level Isolation
Validates that item_workflow_states supports independent per-item pipelines — not a single global state.
Event Bus Integrity
Confirms the enterprise_events table is operational so agent-to-agent triggers can fire correctly.
API Reachability
Pings all critical API routes to confirm they respond before the autonomous loop is activated.