Hexagonal Ingestion Gate & DuckDB Spatial Spine
Alexis King Parse Don't Validate boundary proofs, DuckDB OLAP materialization, and Geodesic K-Means hub synthesis
In This Component
Before formulating stochastic control policies, the orchestrator must establish an uncorrupted empirical spine. Following Alexis King’s “Parse, Don’t Validate” principle, raw dictionaries never cross into the domain core. Every incoming record is parsed at the perimeter into immutable, structurally proven types (ParsedOrder, ParsedOrderLine) verified by hypothesis property-based tests.
High-Performance DuckDB OLAP Materialization
All nine Olist tables totaling 1,550,922 records are ingested into data/aegis_analytics.duckdb in 2.07 seconds behind a strict Hexagonal AnalyticsRepositoryPort. Four normalized analytical views materialize in 0.05 seconds:
| Analytical View | Record Count | Key Engineered Features |
|---|---|---|
v_customer_locations | 99,441 | Hierarchical CEP City State coordinate fallback (0% orphans) |
v_seller_locations | 3,095 | Merchant origin coordinates, historical order throughput, cumulative GMV |
v_orders_clean | 99,441 | purchase_to_approval_hours, carrier_to_customer_days, delivery_delay_days |
v_order_lines | 112,650 | Volumetric weight (), English taxonomy, exact Haversine distance |
Geodesic Fulfillment Hub Topology
Profiling all 3,095 sellers minimizes geodesic Error Sum of Squares () across five primary Brazilian logistics corridors, producing the vectorized Haversine distance tensor across all 14,994 customer postal clusters in 0.156 seconds (median serving distance , mean ).