Write verify_report(claims, export) — the incoming inspection for
an AI-drafted report. Recompute the four metrics from the export:
orders_shipped— row countavg_days— mean ofdayslate_orders— count of rows withdays > 5damage_rate_pct— percent of rows withdamagedtruthy (100 * count / rows)
Then for each (name, claimed) pair in order, compare with
tolerance 0.05:
- within tolerance →
{name}: VERIFIED ({claimed}) - otherwise →
{name}: MISMATCH — report {claimed}, export {actual}
Expected output:
orders_shipped: VERIFIED (5)
avg_days: MISMATCH — report 4.2, export 6.0
late_orders: VERIFIED (2)
damage_rate_pct: VERIFIED (20.0)